Skip to content

guiIher-me/propositional-logic-interpreter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Propositional Logic Interpreter

A Propositional Logic Interpreter written in Node.js

demo.mp4

💻 Prerequisites

  • Node.js
  • NPM

🚀 How to Execute

  1. Download the repository;
  2. In the terminal, access the backend directory, install the necessary dependencies and then start the server:
cd backend
npm install
node .
  1. Open the frontend/public/index.html file using a modern web browser
  2. Enjoy!

📖 Grammar

The grammar used by the interpreter can be expressed by the following Extended Backus-Naur Form (EBNF):

<E> = <T>
<T> = <F> { ( '^' | 'v' | '->' | '<->' ) <F> }
<F> = {'~'} ( '(' <E> ')' | <ID> )
<ID> = 'A' | 'B' | 'C' | 'D' | 'E' | 'F'

Examples of accepted languages:

1. A
2. AvB
3. A^~B
4. (AvB)^~(~C)

Examples of not accepted languages:

5. Av
6. A~B
7. ((A)

📜 License

This project is licensed under MIT. See the LICENSE file for more details.