aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorMarcos Magueta <maguetamarcos@gmail.com>2026-07-12 18:43:23 -0300
committerMarcos Magueta <maguetamarcos@gmail.com>2026-07-12 18:43:23 -0300
commit19ba625e0345a88da6c29ab91a3ba2d7a8462065 (patch)
tree19b8e96faa439683a230b8e2436f169f22b1076e /examples
parent27e9ddee53b8fa43725f951434404691d8012190 (diff)
downloadSOL-19ba625e0345a88da6c29ab91a3ba2d7a8462065.tar.gz
SOL-19ba625e0345a88da6c29ab91a3ba2d7a8462065.zip
lsp gains hover, definition and completion from a text-level symbol scan
Diffstat (limited to 'examples')
-rw-r--r--examples/#family.sol#29
1 files changed, 29 insertions, 0 deletions
diff --git a/examples/#family.sol# b/examples/#family.sol#
new file mode 100644
index 0000000..200b0af
--- /dev/null
+++ b/examples/#family.sol#
@@ -0,0 +1,29 @@
+% Relations, facts, rules, joins and negation.
+
+Relation named: Person schema: #(
+ [name domain: String]
+ [age domain: Integer]
+)
+
+[Person name: "Marcos" age: 30]
+[Person name: "Ana" age: 12]
+[Person name: "Rui" age: 70]
+
+Rule name: "an adult is a person of age at least 18"
+ head: [Adult name: N]
+ body: [Person name: N age: A] :and
+ [GreaterEqual left: A right: 18]
+
+% Everyone stored.
+Query expression: [Person name: N age: A]
+
+% The rule, joined through the shared variable N.
+Query expression: [Adult name: N]
+
+% Decidable denial: people who are not adults.
+Query expression: ([Person name: N age: A]) :not [Adult name: N]
+
+% The specification's negation form, scoped by the universe.
+Query expression: [World] :not [Adult name: "Ana"]
+
+World \ No newline at end of file