We're updating the issue view to help you get more done.Learn more

ADL2: type refinement example contains typos

I am currently working on the flattener in archie, to incorporate the examples in the ADL2-specification in test so we better adhere to the flattener spec.

The type redefinition example has some problems. I do not understand how the flattener should work in this case. So I input the example in the ADL workbench:

Parent:

{code}
 value ∈ {
        DV_AMOUNT[id4] ∈ {
            accuracy ∈ {|-0.05..0.05|}
        }
    }
{code}

specialization:

{code}
/value ∈ {
        DV_QUANTITY[id4] ∈ {
            magnitude ∈ {|2.0..10.0|}
            units ∈ {"mmol/ml"}
        }
        DV_PROPORTION[id5] ∈ {
            numerator ∈ {|2.0..10.0|}
            type ∈ {pk_unitary}
        }
    }
{code}

First parsing of the pk_unitary token fails - that should be 'matches {1}'. So I fixed that. Then the workbench now parses, but fails validation because the differential archetype introduces new node identifiers at a wrong level - it can add [id0.5] or [id4.2], but [id5] is the wrong level and does not match anything in the parent. Also I cannot think of a single way how to flatten this example.

So, should these node identifiers be id4.1, id4.2, etc? Or is the workbench implementation incorrect? If it's id4.1 etc, the example is clear. If it should be id5, id6 etc, how should a flattener deal with such a case, and how to determine which parent nodes to override?

Status

Assignee

Thomas Beale

Reporter

Pieter Bos

Components

Priority

Major