Closed stefjoosten closed 2 years ago
I traced the generation of Atlas population to the file ConceptStructure.hs
, where the mistake was staring me in the face:
Is clear from the violations (see screenshot above) that the rules generated by
enforceRules
are missing. Instead, the code uses ctxEnforces
, which only provides the expressions in the script but not the expressions that are generated.
This was a software error.
I'll fix it and close this issue if I have proved the analysis right.
The analysis is spot on. Nice catch. A workaround for the student could be to remove the patterns. But the fix shouldn't be to hard to bring to production soon.
The analysis is spot on. Nice catch. A workaround for the student could be to remove the patterns. But the fix shouldn't be too hard to bring to production soon.
The workaround doesn't work. The reason is that the function ctxEnforces
does not yield the generated rules, both inside and outside of a pattern. I verified this experimentally by removing all PATTERN
statements from my script to promote every enforce statement to the top level. I got exactly the same errors.
As expected, the solution works. The errors have vanished.
What happened
I got an error in RAP (see screenshot below) indicating that some rules in the RAP atlas were ignored by the meatgrinder. These are precisely the rules that are generated as a result of an ENFORCE statement.
What I expected
I expected this script to fly without mistakes.
Version of Ampersand that was used
Ampersand-v4.4.0 [83d056aab482032f468d54b93c117d68d443ad95], build time: 16-Sep-21
Steps to reproduce
Screenshot / Video
Context / Source of ampersand script