Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/trismegiste/inferencebundle
An inference engine in PHP with an embed Prolog interpreter
https://github.com/trismegiste/inferencebundle
Last synced: 2 months ago
JSON representation
An inference engine in PHP with an embed Prolog interpreter
- Host: GitHub
- URL: https://github.com/trismegiste/inferencebundle
- Owner: Trismegiste
- License: bsd-2-clause
- Created: 2012-06-17T08:53:50.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2012-06-27T06:31:37.000Z (over 12 years ago)
- Last Synced: 2023-03-15T19:06:13.941Z (almost 2 years ago)
- Language: PHP
- Homepage: http://en.wikipedia.org/wiki/Prolog
- Size: 467 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# InferenceBundle
## An inference engine for PHP
This is a library for a Prolog Interpreter. Planned for a Symfony2 Bundle.
-- CURRENTLY UNDER HEAVY REFACTORING --
Nevertheless : [![Build Status](https://secure.travis-ci.org/Trismegiste/InferenceBundle.png)](http://travis-ci.org/Trismegiste/InferenceBundle)
Prolog is an old language, frankly almost obsolete, and it has very limited use but it
can simplify some problems with few lines. Its secrets ? It embeds an inference engine with
forward chaining and unification.Wikipedia says:
Prolog has its roots in first-order logic, a formal logic, and unlike many
other programming languages, Prolog is declarative: the program logic is
expressed in terms of relations, represented as facts and rules. A computation
is initiated by running a query over these relations.For example, to implement some business intelligence algorithms, you can avoid
big boring sequences of if-else-switch or a big bunch of Chain of Responsability
in PHP with a limited (and readable) set of rules and predicates in Prolog.This is a port from a (dead) js version https://github.com/crcx/chrome_prolog
(kept by respect for its author)Planning :
* classify all this bunch of functions : in progress
* refactor the model to be more PHP-like and not js-like : remove some weird
objects and bizarre closures to protect access to internal methods.
* namespacing the classes
* using getters and setters (maybe not : perfs ?)
* create a builder to easily construct atom & term without parsing (really usefull ? )
* make a bundle for symfony2 because it is the most advance and mature framework for PHP