sphinx a user-friendly assertion language

14
Sphinx a user-friendly assertion language David North Senior Developer, CoreFiling Eurofiling Workshop, Luxembourg, December 2013

Upload: plato

Post on 25-Feb-2016

35 views

Category:

Documents


0 download

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 Presentation

TRANSCRIPT

Page 1: Sphinx  a  user-friendly assertion language

Sphinx a user-friendly assertion language

David NorthSenior Developer, CoreFilingEurofiling Workshop, Luxembourg, December 2013

Page 2: Sphinx  a  user-friendly assertion language

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

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

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

Who uses it?• XUSI• CIMA• HMRC

Page 6: Sphinx  a  user-friendly assertion language

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

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

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

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

Lining up

How is the following expression evaluated?

Revenue[ ] = SalesRevenue[ ] + RentRevenue[ ]

Page 11: Sphinx  a  user-friendly assertion language

ExamplesPlease refer to accompanying file “Sphinx Examples.txt”

Page 12: Sphinx  a  user-friendly assertion language

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

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

Questions?