From 97a91a0d6dc00fed084a0dcaa631a1c12010155c Mon Sep 17 00:00:00 2001 From: Chris Cromer Date: Tue, 28 Feb 2023 22:15:01 -0300 Subject: [PATCH] add 2 examples --- examples/multi-fact.obk | 2 ++ examples/obelisk.obk | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 examples/multi-fact.obk create mode 100644 examples/obelisk.obk diff --git a/examples/multi-fact.obk b/examples/multi-fact.obk new file mode 100644 index 0000000..aa86e07 --- /dev/null +++ b/examples/multi-fact.obk @@ -0,0 +1,2 @@ +# this is a comment +fact("chris cromer" and "martin" and "Isabella" can "program" and "speak english"); diff --git a/examples/obelisk.obk b/examples/obelisk.obk new file mode 100644 index 0000000..39dda3f --- /dev/null +++ b/examples/obelisk.obk @@ -0,0 +1,19 @@ +// an incomplete rule, this one stays false +rule("chris" is "happy" if "chris" plays "playstation"); + +// a rule that gets inserted as true right away +fact("this" is "madness"); +rule("this" is "sparta" if "this" is "madness"); + +// a rule that is inserted as false then updated at a later stage +rule("bruce" is "batman" if "the waynes" are "dead"); +fact("the waynes" are "dead"); + +// an action that will be false because the fact doesn't exist, should return ignore +action(if "tom" is "dangerous" then "avoid" else "ignore"); + +// an action that will be true, should return die +action(if "this" is "sparta" then "die" else "live"); + +fact("what" is "love"); +rule("baby" dont "hurt me" if "what" is "love");