VARCN: archetype concept validity. The *node_id* of the root object of the archetype must be of the form id1{.1}*, where the number of .1 components equals the specalisation depth, and must be defined in the terminology. (which has a spelling-error in “specalisation”, it should be “specialisation”)
My first question:
How can the parser know the specialization-depth?
When I look at the grammar, it seems not possible to layer the specializationSection
So it can only check that it is a specialization.
Or am I overseeing something
My second question:
There is another thing, only small, thing, not very important, but I thought, I mention it anyway.
In the grammar specialization is spelled in the US way ( in specialization_section : SYM_SPECIALIZE archetype_ref ;), while in the error-messages specialisation is spelled in the UK-way (in VASID).
Is there a preferred spelling for when handling texts which belong to software-definitions?
In AOM/ADL 2 this is not true anymore, so I fear we have lost the only way to know the specialization depth of an archetype (without navigating through all its parents).
I am afraid then we must say that there is a not very effective error-specification in http://www.openehr.org/releases/AM/latest/docs/AOM2/AOM2.html#_validity_rules
Because it is not always possible to check the specialization-depth, getting no error cannot always be trusted as meaning the archetype is valid.
I think it would be good if there came a solution for this. I am now doubting if I should implement that error-detection/message.
Thanks Diego, for pointing this out, I checked it in RM 1.0.3 ArchetypeId, and there is indeed a specialization-numbering in the archetype identifier.
So this information will become redundant in the archetype, available in the concept/root-node id, and in the archetype id.
This is not good, according to many programming standards which advise to not have redundant information.
Because it adds nothing, and if it differs, it is not trustworthy.
Also, we lost the track of archetypes from where was specialized, we only know the last archetype, and if that is not available, then it is not possible to have that information.
As far as I understand, this seems a lost of information and a redundancy added in the new AOM/RM combination.
But maybe I do not oversee everything.
I think it is best to wait for an official reaction of the openehr chief architect.
in ADL2 you can know the specialisation depth of the archetype by looking at the root node code, e.g.
id1 → depth = 0
id1.1 → depth = 1
etc
For US/international English spelling, we tend to use International English for all natural language, and where we can, accommodate US English in the formal spec. Thus, an ADL parser has to be able to parse specialise | specialize. The error texts probably are not consistent.
Bert, can you create a PR for ‘ADL2/AOM2 documentation errors’ or similar in the main PR tracker. If you find a number of them, it wold be preferable to include them all in the description of the one PR, rather than create a proliferation of PRs, for obvious reasons.
An official release of AOM2/ADL2 is around the corner and we’ll include fixes for any errors you find.
I write, as you suggest, from now on the errors/remarks in the PR tracker, I had not used it for some years, but I found it, and also my login credentials again. As you say, I create one single PR for all my errors/remarks, which are probably not very many. The problem is only important for keywords in a definition language, it is cumbersome to let a parser check several spelling-forms in keywords. The problem I found, however was in a data-string (an error-message), and in that case, it is possible to have more languages, which can be changed and do not effect the parser. So, I take back my remark on this. Bert