Aline Lima
Hiaggo Bezerra
Leonardo Machado
Computer Science Graduation
Federal Fluminense University
Niteroi, 2020
This project was developed for the discipline of Programming Language from Federal Fluminense University - UFF.
- Haskell - Functional programming language
- Visual Code - MS text editor
- Stack - build tool
- Polish Notation
- Sentential Logic
It generates a truth table with subformulas given a formula in polish notation.
If you want to evaluate (a^b)->(a ν ¬c), you'll have to write it as polish notation, which will lead to a formula like this: CKabAaNc
If you want to know how to write a sentential logic formula using Polish Notation, click here!
Example of input: CKabAaNc
Output:
It will give you the symbols, subformulas and whether it's tautology, satisfiable or contradiction.
This app requires Stack to run.
How to install:
For Windows Environment
$ https://get.haskellstack.org/stable/windows-x86_64-installer.exe
$ Double click and install it
For Linux Environment
$ curl -sSL https://get.haskellstack.org/ | sh
To build the app:
$ cd app
$ stack build
To run the app:
$ cd app
$ stack exec TruthTableGenerator-exe
You can combine both commands in one line:
$ stack build && stack exec TruthTableGenerator-exe
- CNaKbc
- KNAbcKbc
- CKabAaNc
- Ead
- CNaKbc is equivalent to (~a -> (b & c))
- KNAbcKbc is equivalent to ¬(b ν c) Λ (b Λ c)
- CKabAaNc is equivalent to (a Λ b)-> (a ν ¬c)
- Ead is equivalent to (a <-> d)
@machadodev @Hiaggo @Alines009
Balburdia!