-
-
Save rntz/9fcab35ba7baa428c5f1 to your computer and use it in GitHub Desktop.
expression-oriented syntax for imp/datalog
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
?an:id can fly | |
= ?an is a bird | |
- ?an is a penguin | |
+ ?an is Harry the Rocket Penguin | |
// nb. left-associative; a - b + c = (a - b) + c. | |
safe path from ?a to ?c | |
= edge from ?a to ?c | |
+ (edge from ?a to ?b | |
- ?b is dangerous | |
& safe path from ?b to ?c) | |
?p:text works at alice corp but not evil eve studios | |
= ?p works at "alice corp" for _ USD | |
- ?p works at "evil eve studios" for _ USD | |
?p:text only works at alice corp | |
= ?p works at "alice corp" for _ USD | |
- (?p works at ?c for _ USD | |
& ?c != "alice corp") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment