Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/luissimas/analytic_tableaux
An analytic tableaux method implementation in Elixir.
https://github.com/luissimas/analytic_tableaux
Last synced: about 2 months ago
JSON representation
An analytic tableaux method implementation in Elixir.
- Host: GitHub
- URL: https://github.com/luissimas/analytic_tableaux
- Owner: luissimas
- Created: 2021-07-20T17:58:28.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2023-11-17T12:28:31.000Z (about 1 year ago)
- Last Synced: 2023-11-18T14:10:54.076Z (about 1 year ago)
- Language: Elixir
- Size: 61.5 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Analytic Tableaux
An implementation of the [Analytic Tableaux](https://en.wikipedia.org/wiki/Method_of_analytic_tableaux) proof method.``` elixir
iex(1)> Tableaux.prove "p->q, t |- q"
{:invalid, [t: true, p: false]}iex(2)> Tableaux.prove "p->q, p |- q"
{:valid, []}
```There is also a `ProblemGenerator` module, capable of generating of PHP logical problems. Those arguments are always valid.
``` elixir
iex(3)> ProblemGenerator.generate(:php, 2)
"((p1_1|p1_2)&(p2_1|p2_2)&(p3_1|p3_2)) |- ((p1_1&p2_1)|(p1_1&p3_1)|(p2_1&p3_1)|(p1_2&p2_2)|(p1_2&p3_2)|(p2_2&p3_2))"iex(4)> ProblemGenerator.generate(:php, 2) |> Tableaux.prove()
{:valid, []}
```## Generating an executable
The project provides a executable using [escript](https://www.erlang.org/doc/man/escript.html). To generate the executable, run:``` sh
mix escript.build
```The generated executable receives an logical argument as the first command-line argument. For example:
``` sh
./analytic_tableaux "p->q, p |- q"
```