Skip to content
This repository has been archived by the owner on Jul 11, 2019. It is now read-only.

Basic rule evaluation #4

Merged
merged 19 commits into from
Apr 14, 2016
Merged

Basic rule evaluation #4

merged 19 commits into from
Apr 14, 2016

Conversation

pieterbos
Copy link
Member

Basic rule evaluation. Evaluates:

  • arithmetic operators
  • boolean operators
  • constants
  • variable declarations, expression typed (not yet builtin or queries)
  • variable references
  • model references with absolute paths
  • stores assertion results so error messages can be displayed

Interprets everything as a list, so if you do

simple_check: /data[id5]/items[id2]/value[id4]/magnitude * 3 > 5

And the ModelReference/adl_path returns two values (very very possible in the RM!), it will do both the computation and the assertion twice. If one of the two checks fail, the assertion will have failed.

The individual check results remain, so if one succeeds and one fails, the assertion result will be:

"result": false,
"rawResult": [false, true],
"ag": "simple_check"

It would be great to store all object references used in every computation, so in a UI you could show which exact fields make this assertion fail, and which are fine.

Assertion labels/tags are still odd: you can add them, and they do help, but there's no way to add to the terminology yet. I think there should be, so you can add error messages that make sense.

@pieterbos pieterbos merged commit 6a23143 into master Apr 14, 2016
@pieterbos pieterbos deleted the rule_evaluation branch May 6, 2016 14:27
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant