Code Monkey home page Code Monkey logo

jsrule-engine's Introduction

jsrule-engine

backward chaining object oriented typescript inference rules engine

the rules engine can now interpret/run prolog!

see the first demo of it running in a web page here:

http://jsfiddle.net/xp_prg/ZZrdy/5/

see the improved demo that uses jison to interpret real prolog statements:

http://plnkr.co/edit/namb3X1j6ZNBgVRRmj5u?p=preview

<iframe style="width: 100%; height: 300px" src="http://jsfiddle.net/xp_prg/ZZrdy/5/embedded/" allowfullscreen="allowfullscreen" frameborder="0"></iframe>

You can also run it on the command line with node.js.

Quickstart:

cd typescript
make
node raw.js

Goal:

To make a very simple, fast, ood, backward chaining inference rules engine using a small amount of code.

Background:

Javascript is everywhere!!!! I hate regular javascript and want modules, objects, type checking, etc... closure work arounds be damned. Typescript offers this, bugs or not, I will take it :>

I want to use rules with backchaining, why is it sooo hard to find in a small javascript library that does this?!!! Everything is forward chaining and not easy to work with or uses some intermediate scripting language that makes it impossible or difficult to work with the underlying objects.

Examples of this: drools nools (closest I could find) using emscripten to convert swi prolog c/c++ code to js (gigantic mess) jools

Thanks to a genius named RLa, he has created an actual prolog to js transpiler!!

Check it out here: https://gist.github.com/3869174

It is my hope to adapt this to my more ood simplistic approach

Tools used:

node js node js modules: typescript nodeunit

Support: come to #prolog and talk to xp_prg (me) or email me at [email protected]

jsrule-engine's People

Contributors

wheath avatar rla avatar anniepoo avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.