├── .babelrc ├── .gitignore ├── .npmignore ├── .travis.yml ├── LICENSE ├── README.md ├── gulpfile.js ├── jsconfig.json ├── jsdoc.json ├── package.json ├── src ├── EventEmitter.ts ├── agenda.ts ├── compile.ts ├── compile │ ├── compile.ts │ ├── constraint.ts │ ├── index.ts │ ├── nodes.ts │ ├── parser │ │ ├── constraint.ts │ │ ├── constraint │ │ │ ├── grammar.ts │ │ │ └── parser.d.ts │ │ ├── parse.ts │ │ ├── tokens.ts │ │ └── util.ts │ ├── pattern.ts │ └── rule.ts ├── conflict.ts ├── constraint-matcher.ts ├── constraint.ts ├── context.ts ├── execution-strategy.ts ├── facts │ ├── fact.ts │ └── initial.ts ├── flow-container.ts ├── flow.ts ├── index.ts ├── interfaces.ts ├── lang.ts ├── leafy │ ├── andersson-tree.ts │ ├── avl-tree.ts │ ├── binary-tree.ts │ ├── red-black-tree.ts │ └── tree.ts ├── linked-list.ts ├── next-tick.ts ├── nodes.ts ├── nodes │ ├── alias-node.ts │ ├── beta-node.ts │ ├── equality-node.ts │ ├── exists-from-node.ts │ ├── exists-node.ts │ ├── from-node.ts │ ├── from-not-node.ts │ ├── join-node.ts │ ├── join-reference-node.ts │ ├── left-adapter-node.ts │ ├── misc │ │ ├── get-memory.ts │ │ ├── memory.ts │ │ ├── table.ts │ │ └── tuple-entry.ts │ ├── node.ts │ ├── not-node.ts │ ├── property-node.ts │ ├── right-adapter-node.ts │ ├── root-node.ts │ ├── terminal-node.ts │ └── type-node.ts ├── pattern.ts ├── runtime.ts ├── runtime │ ├── compile.ts │ ├── constraint.ts │ ├── nodes.ts │ ├── pattern.ts │ └── rule.ts └── working-memory.ts ├── tests ├── 001-helloworld.dot ├── 001-helloworld.test.js ├── 002-fileuntilhalt.test.js ├── 003-agendagroups.test.js ├── 004-auto-focus.test.js ├── 005-salience.test.js ├── 006-scope.test.js ├── 007-not.test.js ├── 008-or.test.js ├── 009-not-or.test.js ├── 010-from.test.js ├── 013-exists.test.js ├── 014-global.test.js ├── 015-fibonacci.dot ├── 015-fibonacci.test.js ├── json2dot.js └── karma.unit.js └── tsconfig.json /.babelrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoqf/nools-ts/HEAD/.babelrc -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoqf/nools-ts/HEAD/.gitignore -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoqf/nools-ts/HEAD/.npmignore -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoqf/nools-ts/HEAD/.travis.yml -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoqf/nools-ts/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoqf/nools-ts/HEAD/README.md -------------------------------------------------------------------------------- /gulpfile.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoqf/nools-ts/HEAD/gulpfile.js -------------------------------------------------------------------------------- /jsconfig.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoqf/nools-ts/HEAD/jsconfig.json -------------------------------------------------------------------------------- /jsdoc.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoqf/nools-ts/HEAD/jsdoc.json -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoqf/nools-ts/HEAD/package.json -------------------------------------------------------------------------------- /src/EventEmitter.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoqf/nools-ts/HEAD/src/EventEmitter.ts -------------------------------------------------------------------------------- /src/agenda.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoqf/nools-ts/HEAD/src/agenda.ts -------------------------------------------------------------------------------- /src/compile.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoqf/nools-ts/HEAD/src/compile.ts -------------------------------------------------------------------------------- /src/compile/compile.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoqf/nools-ts/HEAD/src/compile/compile.ts -------------------------------------------------------------------------------- /src/compile/constraint.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoqf/nools-ts/HEAD/src/compile/constraint.ts -------------------------------------------------------------------------------- /src/compile/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoqf/nools-ts/HEAD/src/compile/index.ts -------------------------------------------------------------------------------- /src/compile/nodes.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoqf/nools-ts/HEAD/src/compile/nodes.ts -------------------------------------------------------------------------------- /src/compile/parser/constraint.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoqf/nools-ts/HEAD/src/compile/parser/constraint.ts -------------------------------------------------------------------------------- /src/compile/parser/constraint/grammar.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoqf/nools-ts/HEAD/src/compile/parser/constraint/grammar.ts -------------------------------------------------------------------------------- /src/compile/parser/constraint/parser.d.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoqf/nools-ts/HEAD/src/compile/parser/constraint/parser.d.ts -------------------------------------------------------------------------------- /src/compile/parser/parse.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoqf/nools-ts/HEAD/src/compile/parser/parse.ts -------------------------------------------------------------------------------- /src/compile/parser/tokens.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoqf/nools-ts/HEAD/src/compile/parser/tokens.ts -------------------------------------------------------------------------------- /src/compile/parser/util.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoqf/nools-ts/HEAD/src/compile/parser/util.ts -------------------------------------------------------------------------------- /src/compile/pattern.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoqf/nools-ts/HEAD/src/compile/pattern.ts -------------------------------------------------------------------------------- /src/compile/rule.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoqf/nools-ts/HEAD/src/compile/rule.ts -------------------------------------------------------------------------------- /src/conflict.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoqf/nools-ts/HEAD/src/conflict.ts -------------------------------------------------------------------------------- /src/constraint-matcher.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoqf/nools-ts/HEAD/src/constraint-matcher.ts -------------------------------------------------------------------------------- /src/constraint.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoqf/nools-ts/HEAD/src/constraint.ts -------------------------------------------------------------------------------- /src/context.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoqf/nools-ts/HEAD/src/context.ts -------------------------------------------------------------------------------- /src/execution-strategy.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoqf/nools-ts/HEAD/src/execution-strategy.ts -------------------------------------------------------------------------------- /src/facts/fact.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoqf/nools-ts/HEAD/src/facts/fact.ts -------------------------------------------------------------------------------- /src/facts/initial.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoqf/nools-ts/HEAD/src/facts/initial.ts -------------------------------------------------------------------------------- /src/flow-container.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoqf/nools-ts/HEAD/src/flow-container.ts -------------------------------------------------------------------------------- /src/flow.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoqf/nools-ts/HEAD/src/flow.ts -------------------------------------------------------------------------------- /src/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoqf/nools-ts/HEAD/src/index.ts -------------------------------------------------------------------------------- /src/interfaces.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoqf/nools-ts/HEAD/src/interfaces.ts -------------------------------------------------------------------------------- /src/lang.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoqf/nools-ts/HEAD/src/lang.ts -------------------------------------------------------------------------------- /src/leafy/andersson-tree.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoqf/nools-ts/HEAD/src/leafy/andersson-tree.ts -------------------------------------------------------------------------------- /src/leafy/avl-tree.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoqf/nools-ts/HEAD/src/leafy/avl-tree.ts -------------------------------------------------------------------------------- /src/leafy/binary-tree.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoqf/nools-ts/HEAD/src/leafy/binary-tree.ts -------------------------------------------------------------------------------- /src/leafy/red-black-tree.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoqf/nools-ts/HEAD/src/leafy/red-black-tree.ts -------------------------------------------------------------------------------- /src/leafy/tree.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoqf/nools-ts/HEAD/src/leafy/tree.ts -------------------------------------------------------------------------------- /src/linked-list.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoqf/nools-ts/HEAD/src/linked-list.ts -------------------------------------------------------------------------------- /src/next-tick.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoqf/nools-ts/HEAD/src/next-tick.ts -------------------------------------------------------------------------------- /src/nodes.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoqf/nools-ts/HEAD/src/nodes.ts -------------------------------------------------------------------------------- /src/nodes/alias-node.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoqf/nools-ts/HEAD/src/nodes/alias-node.ts -------------------------------------------------------------------------------- /src/nodes/beta-node.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoqf/nools-ts/HEAD/src/nodes/beta-node.ts -------------------------------------------------------------------------------- /src/nodes/equality-node.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoqf/nools-ts/HEAD/src/nodes/equality-node.ts -------------------------------------------------------------------------------- /src/nodes/exists-from-node.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoqf/nools-ts/HEAD/src/nodes/exists-from-node.ts -------------------------------------------------------------------------------- /src/nodes/exists-node.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoqf/nools-ts/HEAD/src/nodes/exists-node.ts -------------------------------------------------------------------------------- /src/nodes/from-node.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoqf/nools-ts/HEAD/src/nodes/from-node.ts -------------------------------------------------------------------------------- /src/nodes/from-not-node.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoqf/nools-ts/HEAD/src/nodes/from-not-node.ts -------------------------------------------------------------------------------- /src/nodes/join-node.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoqf/nools-ts/HEAD/src/nodes/join-node.ts -------------------------------------------------------------------------------- /src/nodes/join-reference-node.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoqf/nools-ts/HEAD/src/nodes/join-reference-node.ts -------------------------------------------------------------------------------- /src/nodes/left-adapter-node.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoqf/nools-ts/HEAD/src/nodes/left-adapter-node.ts -------------------------------------------------------------------------------- /src/nodes/misc/get-memory.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoqf/nools-ts/HEAD/src/nodes/misc/get-memory.ts -------------------------------------------------------------------------------- /src/nodes/misc/memory.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoqf/nools-ts/HEAD/src/nodes/misc/memory.ts -------------------------------------------------------------------------------- /src/nodes/misc/table.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoqf/nools-ts/HEAD/src/nodes/misc/table.ts -------------------------------------------------------------------------------- /src/nodes/misc/tuple-entry.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoqf/nools-ts/HEAD/src/nodes/misc/tuple-entry.ts -------------------------------------------------------------------------------- /src/nodes/node.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoqf/nools-ts/HEAD/src/nodes/node.ts -------------------------------------------------------------------------------- /src/nodes/not-node.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoqf/nools-ts/HEAD/src/nodes/not-node.ts -------------------------------------------------------------------------------- /src/nodes/property-node.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoqf/nools-ts/HEAD/src/nodes/property-node.ts -------------------------------------------------------------------------------- /src/nodes/right-adapter-node.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoqf/nools-ts/HEAD/src/nodes/right-adapter-node.ts -------------------------------------------------------------------------------- /src/nodes/root-node.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoqf/nools-ts/HEAD/src/nodes/root-node.ts -------------------------------------------------------------------------------- /src/nodes/terminal-node.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoqf/nools-ts/HEAD/src/nodes/terminal-node.ts -------------------------------------------------------------------------------- /src/nodes/type-node.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoqf/nools-ts/HEAD/src/nodes/type-node.ts -------------------------------------------------------------------------------- /src/pattern.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoqf/nools-ts/HEAD/src/pattern.ts -------------------------------------------------------------------------------- /src/runtime.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoqf/nools-ts/HEAD/src/runtime.ts -------------------------------------------------------------------------------- /src/runtime/compile.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoqf/nools-ts/HEAD/src/runtime/compile.ts -------------------------------------------------------------------------------- /src/runtime/constraint.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoqf/nools-ts/HEAD/src/runtime/constraint.ts -------------------------------------------------------------------------------- /src/runtime/nodes.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoqf/nools-ts/HEAD/src/runtime/nodes.ts -------------------------------------------------------------------------------- /src/runtime/pattern.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoqf/nools-ts/HEAD/src/runtime/pattern.ts -------------------------------------------------------------------------------- /src/runtime/rule.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoqf/nools-ts/HEAD/src/runtime/rule.ts -------------------------------------------------------------------------------- /src/working-memory.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoqf/nools-ts/HEAD/src/working-memory.ts -------------------------------------------------------------------------------- /tests/001-helloworld.dot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoqf/nools-ts/HEAD/tests/001-helloworld.dot -------------------------------------------------------------------------------- /tests/001-helloworld.test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoqf/nools-ts/HEAD/tests/001-helloworld.test.js -------------------------------------------------------------------------------- /tests/002-fileuntilhalt.test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoqf/nools-ts/HEAD/tests/002-fileuntilhalt.test.js -------------------------------------------------------------------------------- /tests/003-agendagroups.test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoqf/nools-ts/HEAD/tests/003-agendagroups.test.js -------------------------------------------------------------------------------- /tests/004-auto-focus.test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoqf/nools-ts/HEAD/tests/004-auto-focus.test.js -------------------------------------------------------------------------------- /tests/005-salience.test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoqf/nools-ts/HEAD/tests/005-salience.test.js -------------------------------------------------------------------------------- /tests/006-scope.test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoqf/nools-ts/HEAD/tests/006-scope.test.js -------------------------------------------------------------------------------- /tests/007-not.test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoqf/nools-ts/HEAD/tests/007-not.test.js -------------------------------------------------------------------------------- /tests/008-or.test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoqf/nools-ts/HEAD/tests/008-or.test.js -------------------------------------------------------------------------------- /tests/009-not-or.test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoqf/nools-ts/HEAD/tests/009-not-or.test.js -------------------------------------------------------------------------------- /tests/010-from.test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoqf/nools-ts/HEAD/tests/010-from.test.js -------------------------------------------------------------------------------- /tests/013-exists.test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoqf/nools-ts/HEAD/tests/013-exists.test.js -------------------------------------------------------------------------------- /tests/014-global.test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoqf/nools-ts/HEAD/tests/014-global.test.js -------------------------------------------------------------------------------- /tests/015-fibonacci.dot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoqf/nools-ts/HEAD/tests/015-fibonacci.dot -------------------------------------------------------------------------------- /tests/015-fibonacci.test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoqf/nools-ts/HEAD/tests/015-fibonacci.test.js -------------------------------------------------------------------------------- /tests/json2dot.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoqf/nools-ts/HEAD/tests/json2dot.js -------------------------------------------------------------------------------- /tests/karma.unit.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoqf/nools-ts/HEAD/tests/karma.unit.js -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taoqf/nools-ts/HEAD/tsconfig.json --------------------------------------------------------------------------------