eyeprolog 1.1.4 → 1.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/examples/output/snaf.pl +1 -0
- package/examples/proof/snaf.pl +20 -0
- package/examples/snaf.pl +12 -0
- package/package.json +1 -1
- package/playground.html +1 -0
- package/test/run-examples.mjs +1 -0
- package/the-art-of-eyeprolog.md +3 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
hates(alice, nobody).
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
hates(alice, nobody).
|
|
2
|
+
why(
|
|
3
|
+
hates(alice, nobody),
|
|
4
|
+
proof(
|
|
5
|
+
goal(hates(alice, nobody)),
|
|
6
|
+
by(rule("snaf.pl", clause(3))),
|
|
7
|
+
bindings([binding("X", bob)]),
|
|
8
|
+
uses([
|
|
9
|
+
proof(
|
|
10
|
+
goal(person(bob)),
|
|
11
|
+
by(fact("snaf.pl", clause(2)))
|
|
12
|
+
),
|
|
13
|
+
proof(
|
|
14
|
+
goal('\\+'(hates(alice, bob))),
|
|
15
|
+
by(builtin('\\+', 1))
|
|
16
|
+
)
|
|
17
|
+
])
|
|
18
|
+
)
|
|
19
|
+
).
|
|
20
|
+
|
package/examples/snaf.pl
ADDED
package/package.json
CHANGED
package/playground.html
CHANGED
package/test/run-examples.mjs
CHANGED
package/the-art-of-eyeprolog.md
CHANGED
|
@@ -6212,9 +6212,9 @@ Review questions:
|
|
|
6212
6212
|
</figure>
|
|
6213
6213
|
|
|
6214
6214
|
The [examples directory](https://github.com/eyereasoner/eyeprolog/tree/main/examples/) is the book's executable companion. The
|
|
6215
|
-
top-level directory contains **
|
|
6215
|
+
top-level directory contains **190 self-contained runnable programs**. Every
|
|
6216
6216
|
source program has an exact answer file under
|
|
6217
|
-
[examples/output](https://github.com/eyereasoner/eyeprolog/tree/main/examples/output/), and **
|
|
6217
|
+
[examples/output](https://github.com/eyereasoner/eyeprolog/tree/main/examples/output/), and **61 selected programs** have a checked
|
|
6218
6218
|
explanation under [examples/proof](https://github.com/eyereasoner/eyeprolog/tree/main/examples/proof/). The thematic tables below link every top-level program and open the program
|
|
6219
6219
|
itself rather than merely naming it.
|
|
6220
6220
|
|
|
@@ -6297,6 +6297,7 @@ studies.
|
|
|
6297
6297
|
| [Herbrand witnesses](https://github.com/eyereasoner/eyeprolog/blob/main/examples/herbrand-witnesses.pl) | Functional witness terms make existential structure and syntactic identity visible in both answers and derivations. | [answers](https://github.com/eyereasoner/eyeprolog/blob/main/examples/output/herbrand-witnesses.pl) · [proof](https://github.com/eyereasoner/eyeprolog/blob/main/examples/proof/herbrand-witnesses.pl) |
|
|
6298
6298
|
| [Reusable built-ins](https://github.com/eyereasoner/eyeprolog/blob/main/examples/reusable-builtins.pl) | Arithmetic, strings, lists, and term inspection compose through ordinary variables. | [answers](https://github.com/eyereasoner/eyeprolog/blob/main/examples/output/reusable-builtins.pl) · [proof](https://github.com/eyereasoner/eyeprolog/blob/main/examples/proof/reusable-builtins.pl) |
|
|
6299
6299
|
| [Skolem Functions](https://github.com/eyereasoner/eyeprolog/blob/main/examples/skolem-functions.pl) | Skolem functional terms in rule heads. | [answers](https://github.com/eyereasoner/eyeprolog/blob/main/examples/output/skolem-functions.pl) |
|
|
6300
|
+
| [SNAF](https://github.com/eyereasoner/eyeprolog/blob/main/examples/snaf.pl) | Negation as failure establishes that Alice does not hate Bob before deriving that she hates Nobody. | [answers](https://github.com/eyereasoner/eyeprolog/blob/main/examples/output/snaf.pl) · [proof](https://github.com/eyereasoner/eyeprolog/blob/main/examples/proof/snaf.pl) |
|
|
6300
6301
|
| [Socrates](https://github.com/eyereasoner/eyeprolog/blob/main/examples/socrates.pl) | A fact and one rule turn the classical syllogism into a ground derivation. | [answers](https://github.com/eyereasoner/eyeprolog/blob/main/examples/output/socrates.pl) · [proof](https://github.com/eyereasoner/eyeprolog/blob/main/examples/proof/socrates.pl) |
|
|
6301
6302
|
| [UUID](https://github.com/eyereasoner/eyeprolog/blob/main/examples/uuid.pl) | `uuid/3` reproducibly creates one version 4 UUID atom from explicit random state; the example validates its canonical shape. | [answers](https://github.com/eyereasoner/eyeprolog/blob/main/examples/output/uuid.pl) |
|
|
6302
6303
|
| [Witch](https://github.com/eyereasoner/eyeprolog/blob/main/examples/witch.pl) | Burn the witch, adapted from Eyeling's examples/witch.n3. | [answers](https://github.com/eyereasoner/eyeprolog/blob/main/examples/output/witch.pl) · [proof](https://github.com/eyereasoner/eyeprolog/blob/main/examples/proof/witch.pl) |
|