sphinx a user-friendly assertion language
DESCRIPTION
Sphinx a user-friendly assertion language. David North Senior Developer, CoreFiling Eurofiling Workshop, Luxembourg, December 2013. What is Sphinx?. Domain-specific language for making assertions about XBRL facts High-level, semantic, based on an n-dimensional world Not XML - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: Sphinx a user-friendly assertion language](https://reader036.vdocument.in/reader036/viewer/2022062316/56816859550346895dde8ac5/html5/thumbnails/1.jpg)
Sphinx a user-friendly assertion language
David NorthSenior Developer, CoreFilingEurofiling Workshop, Luxembourg, December 2013
![Page 2: Sphinx a user-friendly assertion language](https://reader036.vdocument.in/reader036/viewer/2022062316/56816859550346895dde8ac5/html5/thumbnails/2.jpg)
What is Sphinx?• Domain-specific language for making
assertions about XBRL facts• High-level, semantic, based on an n-
dimensional world• Not XML• Designed for humans to write and
edit directly• Proprietary
![Page 3: Sphinx a user-friendly assertion language](https://reader036.vdocument.in/reader036/viewer/2022062316/56816859550346895dde8ac5/html5/thumbnails/3.jpg)
History• 2009 – first prototypes• 2011 – stable language reaches 1.0• 2012 – version 2.0 incorporating real-
world feedback requiring breaking changes
• 2013 – (later abandoned) attempt to offer the Sphinx IP to XBRL International
![Page 4: Sphinx a user-friendly assertion language](https://reader036.vdocument.in/reader036/viewer/2022062316/56816859550346895dde8ac5/html5/thumbnails/4.jpg)
The requirements Sphinx grew from• XBRL US (XUSI) – development of the
XBRL US Consistency Checks for quality/consistency of SEC filings
• CIMA – regulator needing to check quality/consistency of incoming instances
• Replaced a stopgap spreadsheet-based solution
![Page 5: Sphinx a user-friendly assertion language](https://reader036.vdocument.in/reader036/viewer/2022062316/56816859550346895dde8ac5/html5/thumbnails/5.jpg)
Who uses it?• XUSI• CIMA• HMRC
![Page 6: Sphinx a user-friendly assertion language](https://reader036.vdocument.in/reader036/viewer/2022062316/56816859550346895dde8ac5/html5/thumbnails/6.jpg)
Proprietary: Disadvantages• Not an XII standard• Fewer options for implementations• Difficult for a regulator to mandate
its usage by filers• Can't be part of DTS
![Page 7: Sphinx a user-friendly assertion language](https://reader036.vdocument.in/reader036/viewer/2022062316/56816859550346895dde8ac5/html5/thumbnails/7.jpg)
Proprietary: Advantages• High quality tools available from
CoreFiling• Fast evolution of the language in
response to customer feedback
![Page 8: Sphinx a user-friendly assertion language](https://reader036.vdocument.in/reader036/viewer/2022062316/56816859550346895dde8ac5/html5/thumbnails/8.jpg)
What can it be used for?• Rapid creation of business and
accounting rules• Typical checks might include:– X must be reported– Co-constraints (if X is reported, Y must
be too)– Comparing data across dimensions
![Page 9: Sphinx a user-friendly assertion language](https://reader036.vdocument.in/reader036/viewer/2022062316/56816859550346895dde8ac5/html5/thumbnails/9.jpg)
The language• Based on item expressions• The most basic: [ ]• Represents the table of all items in
the instance. Operations on it apply to every cell in turn
• Restrict by axes (“aspects” in XBRL formula)– FooConcept[ ] – restriction to facts with
FooConcept– [Geography=UK, Product=Cheese] –
restricts dimensions
![Page 10: Sphinx a user-friendly assertion language](https://reader036.vdocument.in/reader036/viewer/2022062316/56816859550346895dde8ac5/html5/thumbnails/10.jpg)
Lining up
How is the following expression evaluated?
Revenue[ ] = SalesRevenue[ ] + RentRevenue[ ]
![Page 11: Sphinx a user-friendly assertion language](https://reader036.vdocument.in/reader036/viewer/2022062316/56816859550346895dde8ac5/html5/thumbnails/11.jpg)
ExamplesPlease refer to accompanying file “Sphinx Examples.txt”
![Page 12: Sphinx a user-friendly assertion language](https://reader036.vdocument.in/reader036/viewer/2022062316/56816859550346895dde8ac5/html5/thumbnails/12.jpg)
Tools• Rules authored in SpiderMonkey,
potentially alongside taxonomy development– Can test against instances here
• Can plug authored “rulebase” into other CoreFiling tools both for GUI-based instance validation and command-line/web based validation (e.g. filter gateway).
![Page 13: Sphinx a user-friendly assertion language](https://reader036.vdocument.in/reader036/viewer/2022062316/56816859550346895dde8ac5/html5/thumbnails/13.jpg)
Sphinx vs XBRL formula• Sphinx does lining up (implicit
filtering) by default• Sphinx cannot do fact creation• Sphinx cannot use XPath• User-defined Sphinx functions are in-
language only (no ability to make them implementation-defined)
![Page 14: Sphinx a user-friendly assertion language](https://reader036.vdocument.in/reader036/viewer/2022062316/56816859550346895dde8ac5/html5/thumbnails/14.jpg)
Questions?