https://github.com/knowledgeonwebscale/eyelet
eye reasoning in prolog
https://github.com/knowledgeonwebscale/eyelet
Last synced: 12 months ago
JSON representation
eye reasoning in prolog
- Host: GitHub
- URL: https://github.com/knowledgeonwebscale/eyelet
- Owner: KNowledgeOnWebScale
- License: mit
- Created: 2025-04-25T09:32:35.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-06-23T21:49:17.000Z (12 months ago)
- Last Synced: 2025-06-23T22:40:49.377Z (12 months ago)
- Language: Prolog
- Homepage: https://knowledgeonwebscale.github.io/eyelet/
- Size: 2.07 MB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# eyelet
## eye reasoning in prolog
- besides top-down reasoning with `conclusion :- premise` rules, eyelet also supports bottom-up reasoning with `conclusion :+ premise` rules
- variables are interpreted universally except for `conclusion :+ premise` conclusion-only variables which are interpreted existentially
- linear implication is done with `becomes(from_conjunction, to_conjunction)`
- bottom-up reasoning can use `stable(n)` to fail if the deductive closure at level `n` is not yet stable
- bottom-up reasoning steps are performed as `step((conclusion :+ premise), premise_inst, conclusion_inst)`
- queries are posed as `true :+ premise` and answered as `answer(premise_inst)`
- inference fuses are defined as `false :+ premise` and blown as `fuse(premise_inst)` with return code 2
## Rationale for bottom-up reasoning
- conclusion can be a conjunction
- conclusion can be `false` to blow an inference fuse
- conclusion can be `true` to pose a query
- conclusion-only variables are existentials
- performing bottom-up proof steps `step/3`
- avoiding loops that could occur with top-down reasoning
## Testing
- install [SWI-Prolog](https://www.swi-prolog.org/Download.html)
- run [./test](./test) to go from [./input/](./input/) to [./output/](./output/)
__or__
- install [Trealla Prolog](https://github.com/trealla-prolog/trealla?tab=readme-ov-file#building)
- run [./test-trealla](./test-trealla) to go from [./input/](./input/) to [./output-trealla/](./output-trealla/)
__or__
- install [Scryer Prolog](https://github.com/mthom/scryer-prolog?tab=readme-ov-file#installing-scryer-prolog)
- run [./test-scryer](./test-scryer) to go from [./input/](./input/) to [./output-scryer/](./output-scryer/)