Last active
June 8, 2017 14:56
-
-
Save maacl/a7c37b672c81d6fd5d72f52a9c8fdf68 to your computer and use it in GitHub Desktop.
precept expression reuse
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(rule discretion-exercised-timely | |
[[?e0 :event/timestamp ?dt]] | |
[[?e0 :event/action ?action]] | |
[[?e1 :discretion/action ?action]] | |
[[?e1 :discretion/time-windows ?tws]] | |
[:test (dt-within-tws? ?dt ?tws)] | |
=> | |
(insert! [?e1 :discretion/status :exercised-timely])) | |
(rule discretion-exercised-untimely | |
[[?e0 :event/timestamp ?dt]] | |
[[?e0 :event/action ?action]] | |
[[?e1 :discretion/action ?action]] | |
[[?e1 :discretion/time-windows ?tws]] | |
[:test (dt-outside-tws? ?dt ?tws)] | |
=> | |
(insert! [?e1 :discretion/status :exercised-untimely])) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment