Ampersand
Ampersand copied to clipboard
`IDENT` statement is not implemented as the RULE it is syntax sugar for.
Using Ampersand-v3.16.0 [feature/578-navbar:c3acfc3d1], there is no problem in compiling the following script:
CONTEXT "Issue #950"
IDENT BFs: BF(bfOrg,bfName)
bfOrg :: BF * Org [UNI]
bfName :: BF * Name [UNI]
POPULATION BF CONTAINS [ "BF_Fin", "BF_V1622" ]
ENDCONTEXT
I would expect that after installation, the IDENT
statement would produce an invariant error, because both BFs, i.e. BF_Fin
and BF_V1622
, have the same (missing) Org
and the same (missing) Name
, as is shown when inspecting the database:
Notes:
- Adding the rule
RULE "Ident BFs": bfOrg<>bfOrg~ /\ bfName<>bfName~ |- I[BF]
to the script results in the actual production of the error I expected. This means that the code generated forIDENT
and for the rule that it is syntax sugar for, are different. - I wonder what this says about our software development street. I'm pretty sure we have been at this point with the
IDENT
statement years before. And even if not, before now I was confident that basic situations as these would be caught by the sentinel. How stable are we?