-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Transition from DTD/EBNF to RELAX NG Compact schema #18
Conversation
Syntax highlighting will be provided in upcoming Pygments 2.2 |
A good tutorial for reviewers of this PR: http://relaxng.org/compact-tutorial-20030326.html |
cd84231
to
7005a26
Compare
The work on conversion to RELAX NG Compact (RNC) is complete. Thanks to excellent tutorials of the RNC and its self-descriptiveness, Following the Single Point of Truth (SPOT) principle, Moreover, there's a requirement for all the schemas in the specification To bomb the last Appendix with the full schema of the MEF, This work removes a lot of accidental complexity out of the standardization process. This PR is ready to be merged. |
The resulting html/pdf can be seen at https://rakhimov.github.io/mef-rnc/ |
357b721
to
e8a3ef1
Compare
As presented at the workshop, RelaxNG Compact (RNC) is a modern and convenient schema language capable of fully describing features of the MEF unlike the DTD. The RNC syntax is very much the BNF-like readable, leveraging regular expression operators. The transition from the DTD to the RNC should ease introduction of new MEF features. The MEF schema in the RNC language is already provided thanks to the early effort in the SCRAM project. Only work necessary was to swap the schema in the Appendix B, and update the wording in Chapter 2: Introduction. The only current minor-drawback is that syntax highlighter Pygments doesn't yet provide support for RNC, so it looks like a plain text or the EBNF. Closes open-psa#11
An excellent tutorial is provided by the specification community. There's no need for the MEF to have any redundant material, wasting its effort. Besides, the RNC language is very self-descriptive.
This is no longer as the representation moves to the RNC.
The RNC is worded to be the presentation language for the constructs. The appendix is redundant since the schema is already available for the whole MEF.
Start separating the schema snippets into files in schema subdirectory.
The RNC schemas for fault tree and formula are separated into two files. The schema is full including other yet-undefined constructs.
CCF group and substitution definitions are placed into separate schema files.
Initiating events, event tree, instructions are separated into RNC files.
- Consequence groups - Missions and phases - Models The redundant representation/grouping of all containers is removed. It can be referenced and available in respective parts. This approach simplifies the management of schemas. Should it be required in future, the grouping could be reintroduced.
- Sum of products - Statistical measure - Curves
- Boolean operations - Built-ins - Conditional operations - Expressions - Numerical operations - Test events - Stochastic layer - Random deviates
This schema combines all the schemas into the start grammar. This major schema can be used for validation of input files. Note that this major schema leverages RELAX NG include feature instead of performing simple textual inclusion. This allow a modular development of the schema and provides conformance to SPOT principle.
This schema can be in various formats can be obtained from the schemas repository. Since now the specification contains full schemas (no more sketches or drafts in the formal specification!), the specification text itself already contains the full schema that can be cherry-picked by the implementers. The Appendix is redundant.
The schemas are all contained within this repository. They will be the up-to-date standard schema following the changing in this repository. The external 'schemas' repository is only provided for schemas in various other formats.
This tests validate that the schema successfully converts to RNG and XSD. In addition, a some test runs on example input files from the mef-examples repository.
This archive can be downloaded from the website. It includes the contents of the mef/schema directory.
The lower-boundary expression was omitted in the schema.
Requires Pygments 2.2 version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is Ok for me. Thanks
Thanks @mhibti ! |
As presented at the workshop,
RelaxNG Compact (RNC) is a modern and convenient schema language
capable of fully describing features of the MEF
unlike the DTD.
The RNC syntax is very much the BNF-like readable,
leveraging regular expression operators.
The transition from the DTD to the RNC
should ease introduction of new MEF features.
The MEF schema in the RNC language is already provided
thanks to the early effort in the SCRAM project.
Only work necessary was to swap the schema in the Appendix B,
and update the wording in Chapter 2: Introduction.
The only current minor-drawbackis that syntax highlighter Pygments
doesn't yet provide support for RNC,
so it looks like a plain text or the EBNF.
(Available with Pygments 2.2)
Closes #11