see-lang
v3.0.6
Published
SEE (Structured English Entailer): a small reasoning language for entailed answers and readable proofs.
Maintainers
Readme
SEE — Structured English Entailer
SEE stands for Structured English Entailer. It is a small reasoning language and entailer that turns Structured English facts and rules into entailed answers and readable proofs.
SEE deliberately uses a non-predicate-punctuation surface syntax. There are no predicate parentheses, comma-separated goals, final fact dots, or rule markers. SEE input and output are both Structured 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 --warnings test/conformance/warnings/negation/unstratified_mutual.see
printf 'works holds for stdin and true if eq holds for ok and ok
' | node bin/see.js ---proof and -p print a full indented proof tree after each derived answer.
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.seeTo install the checkout's see command on your PATH, use npm's package link:
npm link
see --versionJavaScript API
import { run, Program, Solver } from 'see-lang';
const result = run(`
show facts for answer with 1 values
answer holds for ok if eq holds for 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.htmlTests
npm test
npm run test:conformance
npm run conformance:report
npm run test:examples
npm run test:regression