npm.io
3.0.2 • Published 22h agoCLI

see-lang

Licence
MIT
Version
3.0.2
Deps
0
Size
25.6 MB
Vulns
0
Weekly
0
Stars
1

SEE

npm version DOI

SEE stands for Symbolic English Engine. It is a small reasoning language for turning Symbolic English facts and rules into answers and proof data.

SEE deliberately uses a non-predicate-punctuation surface syntax. There are no predicate parentheses, comma-separated goals, final fact dots, or rule markers. Engine input and engine output are both Symbolic English statements.

Install and run

SEE has no runtime npm dependencies and no build step. From a source checkout, run the CLI directly with Node.js 18 or newer:

node bin/see.js examples/ancestor.see
node bin/see.js --proof examples/socrates.see
node bin/see.js --proof=tree examples/socrates.see
node bin/see.js --proof=full examples/socrates.see
node bin/see.js --warnings test/conformance/warnings/negation/unstratified_mutual.see
printf 'works has stdin and true when eq has ok and ok
' | node bin/see.js -

--proof prints compact readable why has "..." summaries. Use --proof=tree for an indented human proof tree, or --proof=full when you need the complete nested SEE proof data.

For one-off local CLI use from the checkout, npm can run the package bin without a manual symlink:

npm exec -- see --version
npm exec -- see examples/ancestor.see

To install the checkout's see command on your PATH, use npm's package link:

npm link
see --version

JavaScript API

import { run, Program, Solver } from 'see-lang';

const result = run(`
show answer with 1
answer has ok when eq has ok and ok
`);
console.log(result.stdout);

Documentation

For local browser use, serve the checkout first so the playground can load ES modules and example files:

python3 -m http.server
# then open http://localhost:8000/playground.html

Tests

npm test
npm run test:conformance
npm run conformance:report
npm run test:examples
npm run test:regression

Keywords