@josd/eyecode 0.0.0-stage → 0.1.3
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/LICENSE.md +9 -0
- package/README.md +36 -2
- package/SPEC.md +921 -0
- package/bin/eyecode.js +28 -0
- package/package.json +43 -4
- package/src/arith.js +432 -0
- package/src/builtins.js +185 -0
- package/src/cli.js +126 -0
- package/src/common.js +120 -0
- package/src/engine.js +867 -0
- package/src/goals.js +44 -0
- package/src/index.js +15 -0
- package/src/lang.js +476 -0
- package/src/node.js +21 -0
- package/src/program.js +278 -0
- package/src/proof.js +679 -0
- package/src/reader.js +396 -0
- package/src/terms.js +502 -0
- package/src/version.js +2 -0
- package/src/writer.js +261 -0
package/LICENSE.md
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# MIT License
|
|
2
|
+
|
|
3
|
+
### Copyright 2026 Jos De Roo, KNoWS office of IDLab, Ghent University - imec
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
|
+
|
|
7
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,37 @@
|
|
|
1
|
-
#
|
|
1
|
+
# <img src="assets/eye.png" alt="" width="48" height="48" align="absmiddle"> eyecode
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://doi.org/10.5281/zenodo.23824021)
|
|
4
|
+
[](https://www.npmjs.com/package/@josd/eyecode)
|
|
5
|
+
|
|
6
|
+
eyecode is a **JavaScript rule language** with forward and backward reasoning
|
|
7
|
+
and checkable proofs. You write facts and rules in plain JavaScript; eyecode
|
|
8
|
+
draws conclusions, and every conclusion can come with a proof that a separate
|
|
9
|
+
checker verifies against your program. It runs as a command-line program, a
|
|
10
|
+
JavaScript library, and a browser application, with no dependencies.
|
|
11
|
+
|
|
12
|
+
- **[Playground](https://eyereasoner.github.io/eyecode/playground)**: run
|
|
13
|
+
programs in your browser.
|
|
14
|
+
- **[Guide](https://eyereasoner.github.io/eyecode/GUIDE)**: run programs,
|
|
15
|
+
write rules, check proofs, use the library, and develop eyecode.
|
|
16
|
+
- **[Specification](https://eyereasoner.github.io/eyecode/SPEC)**: the
|
|
17
|
+
language, its canonical text, the proof format, and the C1–C7 checks.
|
|
18
|
+
- **[Examples](examples/)**: 63 runnable programs, with their conclusions,
|
|
19
|
+
proofs and check reports, and a
|
|
20
|
+
[card deck](https://eyereasoner.github.io/eyecode/examples/deck/) for each.
|
|
21
|
+
- **[Conformance suite](conformance/)**: 321 cases that test any
|
|
22
|
+
implementation of the specification through its command line.
|
|
23
|
+
|
|
24
|
+
```js
|
|
25
|
+
fact(type('socrates', 'human'))
|
|
26
|
+
fact(subclass_of('human', 'mortal'))
|
|
27
|
+
implies([type(S, A), subclass_of(A, B)], type(S, B))
|
|
28
|
+
query(type(X, Y))
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
```sh
|
|
32
|
+
node bin/eyecode.js examples/socrates.js
|
|
33
|
+
node bin/eyecode.js --proof examples/socrates.js > /tmp/proof.js
|
|
34
|
+
node bin/eyecode.js --check-proof /tmp/proof.js examples/socrates.js
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
MIT licensed; see [LICENSE.md](LICENSE.md).
|