Proposed major changes to ADL syntax (2nd go)

Dear all,

as part of the ongoing work with archetypes in the openEHR community it has become clear that a change to the syntax would be desirable. The change is essentially to convert ADL archetypes from their somewhat idiosyncratic syntax to being regular dADL documents. The semantics would not change, but it would mean that parsers and serialisers could mechanically convert between ADL documents and AOM instance trees. “ADL” would thus cease to be a special syntax, and would instead denote dADL documents whose filenames end in “.adl” (note that I am likely to propose that the names of the subsyntaxes dADL and cADL change in the future as well).

These changes would have a number of benefits. Firstly, it would mean that parsing an ADL file is just parsing a dADL document, where one of the field types happens to be the curly-bracket syntax currently known as cADL. Since dADL is completely mappable to XML (in fact it is a completely regular abstract syntax for well-formed XML), the change will facilitate XML serialisation and deserialisation of archetypes.

It will even be possible in the future to use 100% dADL throughout the archetype, since the cADL section can be serialised as dADL syntax, although it will of course lose its readability as a constraint syntax. This kind of serialisation is what could be used as the first step to XML serialisation, and also coming from XML. (If this paragraph does not make sense to you now, don’t worry!)

Some detailed changes would then be possible in the archetype document structure, to make it match up properly with the Archetype Object Model; mainly to do with the top sections, the language sections (currently in the ontology section); and the revision history section.

Overall, this change will make ADL archetypes processible with simpler software, and easier to process in and out of XML. It will also align it to other syntaxes similar in nature to dADL, such as YATL.

What we would like to know is:

Clearly it would have been nicer if we had worked this out in the beginning, but that is the nature of research: what is clear now has only been arrived at by experimenting with the initial creation. My expectation is that after this change, there will be very few changes required to the syntax indeed; those that are required (e.g. due to a new attribute in a class in the AOM) will have minimal impact on the software, since they will be processible with an already established syntax.

Lastly, human authors of archetypes do not have much to worry about: they will see only minor changes to the tools (e.g. due to the adjustment to the language and translation sections of archetypes), and should otherwise not notice any difference.

  • thomas beale
  • If you have any questions about using this list, please send a message to d.lloyd@openehr.org