eyemind 0.6.0 → 0.6.1
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/README.md +5 -1
- package/SPEC.md +1 -1
- package/package.json +1 -1
- package/src/cli.js +9 -8
- package/src/index.js +2 -2
- package/src/version.js +1 -1
package/README.md
CHANGED
|
@@ -548,6 +548,10 @@ eyemind [OPTION ...] [FILE ...]
|
|
|
548
548
|
exclusive. `--json` needs a checking mode. `--goal` reads
|
|
549
549
|
each goal as a data document, with an array denoting conjunction. With
|
|
550
550
|
`--check-proof`, supply the original goals the proof answers.
|
|
551
|
+
An option that takes a value requires it immediately afterward; another
|
|
552
|
+
option, including a short alias such as `-v`, is reported as a missing value.
|
|
553
|
+
With `--goal`, answers default to eyemind terms even for N3 and SRL inputs;
|
|
554
|
+
use `--to` to request another output format.
|
|
551
555
|
|
|
552
556
|
With `--prove-and-check`, reasoning bounds and `--stats` apply to proof
|
|
553
557
|
generation; an invalid check returns 2, otherwise the run's halt code is
|
|
@@ -664,7 +668,7 @@ npm test -- unit examples # these sections, plus W3C
|
|
|
664
668
|
npm test -- -k skolem # only tests whose line contains "skolem"
|
|
665
669
|
EYEMIND_PROPERTY_SCALE=20 npm test -- -k properties # deeper generated tests
|
|
666
670
|
node tools/update-examples.js # regenerate example artifacts after an intended change
|
|
667
|
-
node tools/report.js # the
|
|
671
|
+
node tools/report.js # run the full suite and write REPORT.md
|
|
668
672
|
node tools/notation3tests.js # the cached Notation3 suite
|
|
669
673
|
npm run sync # refresh all three upstream test suites
|
|
670
674
|
node conformance/run.js --command "my-eyemind" # run the conformance suite against another implementation
|
package/SPEC.md
CHANGED
package/package.json
CHANGED
package/src/cli.js
CHANGED
|
@@ -24,8 +24,8 @@ and .srl as a SPARQL 1.2 RL rule set, both compiled to an eyemind program.
|
|
|
24
24
|
--max-inferences N Bound reasoning work (default 1000000)
|
|
25
25
|
--to FORMAT Write the conclusions as turtle, trig, n-triples,
|
|
26
26
|
n-quads, n3 or eyemind (default: n3 for N3, turtle
|
|
27
|
-
for a rule set, eyemind otherwise)
|
|
28
|
-
--all With RDF output, write the given data too
|
|
27
|
+
for a rule set, eyemind otherwise or with --goal)
|
|
28
|
+
--all With RDF or N3 output, write the given data too
|
|
29
29
|
--program Print the program the inputs compile to
|
|
30
30
|
--base IRI Resolve relative IRIs of the inputs against IRI
|
|
31
31
|
--stream-messages Run the rules independently for each RDF Message
|
|
@@ -36,6 +36,7 @@ Exit codes: 0 success, 1 error, 2 invalid proof, 65 contradiction.
|
|
|
36
36
|
`;
|
|
37
37
|
|
|
38
38
|
const LIMITS = { '--max-depth': 'maxDepth', '--max-iterations': 'maxIterations', '--max-inferences': 'maxInferences' };
|
|
39
|
+
const ALIASES = new Map([['-p', '--proof'], ['-c', '--prove-and-check'], ['-v', '--version'], ['-h', '--help']]);
|
|
39
40
|
// N3 and SPARQL 1.2 RL programs run longer than eyemind's defaults allow.
|
|
40
41
|
const COMPILED_LIMITS = { maxDepth: 1000000, maxIterations: 100000, maxInferences: 1000000000 };
|
|
41
42
|
|
|
@@ -66,18 +67,18 @@ export function main(argv, io) {
|
|
|
66
67
|
let streamMessages = false;
|
|
67
68
|
const filePositions = new Set();
|
|
68
69
|
for (let i = 0; i < argv.length; i++) {
|
|
69
|
-
const arg = argv[i];
|
|
70
|
-
if (arg === '--help'
|
|
70
|
+
const arg = ALIASES.get(argv[i]) ?? argv[i];
|
|
71
|
+
if (arg === '--help') {
|
|
71
72
|
stdout(HELP);
|
|
72
73
|
return 0;
|
|
73
74
|
}
|
|
74
|
-
if (arg === '--version'
|
|
75
|
+
if (arg === '--version') {
|
|
75
76
|
stdout(`eyemind v${VERSION}\n`);
|
|
76
77
|
return 0;
|
|
77
78
|
}
|
|
78
|
-
if (arg === '--proof'
|
|
79
|
+
if (arg === '--proof') {
|
|
79
80
|
options.proof = true;
|
|
80
|
-
} else if (arg === '--prove-and-check'
|
|
81
|
+
} else if (arg === '--prove-and-check') {
|
|
81
82
|
proveAndCheck = true;
|
|
82
83
|
} else if (arg === '--stats') {
|
|
83
84
|
stats = true;
|
|
@@ -98,7 +99,7 @@ export function main(argv, io) {
|
|
|
98
99
|
// An option in the value's place means the value was left out, as in
|
|
99
100
|
// --check-proof --json proof.js; reading the option as a file
|
|
100
101
|
// name would only fail later with a puzzling message.
|
|
101
|
-
if (/^--./.test(value) ||
|
|
102
|
+
if (/^--./.test(value) || ALIASES.has(value)) {
|
|
102
103
|
throw new UsageError(`${arg} needs a value right after it, not the option ${value}`);
|
|
103
104
|
}
|
|
104
105
|
if (arg === '--check-proof') {
|
package/src/index.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
//
|
|
3
3
|
// Facts and rules are JavaScript. Forward rules materialize conclusions until
|
|
4
4
|
// a fixpoint, backward rules are decided when a goal asks for them, and every
|
|
5
|
-
// answer can come with a proof that a separate checker verifies
|
|
6
|
-
// program,
|
|
5
|
+
// certifiable answer can come with a proof that a separate checker verifies
|
|
6
|
+
// against the program, using its call tables and recorded firings.
|
|
7
7
|
export { VERSION } from './version.js';
|
|
8
8
|
export { Result, run, unusedClauses } from './engine.js';
|
|
9
9
|
export { readGoal } from './goals.js';
|
package/src/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// The release this checkout is; ./release keeps it in step with package.json.
|
|
2
|
-
export const VERSION = '0.6.
|
|
2
|
+
export const VERSION = '0.6.1';
|