Compile and run Constraint Handling Rules (CHR) in JavaScript.
warning: this code is alphaware and shouldn't be used in production environments.
- Speed comparable to SWI-prolog (sometimes)
- Trampoline to avoid stack limits
- Close integration with javascript
- Easy to add clauses or inspect the store from javascript
- Transpile javascript files containing CHR in browser and from command line (using node)
- Slightly different syntax
- Much of it is untested
- No documentation yet
https://snowlionai.github.io/jschr/
on linux
- Clone or download the repository
- Ensure node and npm are installed
- Add javascript parser and generator dependencies: a. npm install -g esprima b. npm install -g escodegen c. npm install -g esrecurse d. npm install -g esutils
- Add node commandline compiler dependencies: a. npm install -g fs b. npm install -g path c. npm install -g minimist
on other systems No documentation yet, but if node runs, it shouldn't be too different from a linux installation.
To compile the runtime system after changes in de src directory, run the following command from command line: ./browsify.sh
To compile user files you have to adjust compiler.sh file according to your situation and run it from the command line: ./compiler.sh