Propositional logic, also known as sentential logic or Boolean logic, is the branch of logic that studies ways of joining and/or modifying entire propositions, statements or sentences to form more complicated propositions, statements or sentences. It is widely used in Computer Science, Mathematics, Linguistics, and Philosophy among other fields.
The Propositional Logic Assistant
is a command-line tool developed as part of the CSC510 DISCRETE STRUCTURES course. The tool's primary purpose is to simplify the understanding and application of propositional logic concepts. It offers a hands-on, interactive way for users to practice and grasp various facets of propositional logic, thus serving as a helpful aid for students, educators, and enthusiasts in the respective fields.
The Propositional Logic Assistant delivers the following functionalities:
-
Calculator Mode: In this mode, users can manually input logical propositions, and the tool computes and displays the resulting truth value. It comprehends all basic logic operations, including NOT (¬), AND (∧), OR (∨), IMPLIES (→), and IF AND ONLY IF (⟷).
-
Quiz Mode: This mode engages users with a set of questions aimed at testing their understanding of propositional logic. It provides an effective way to apply learned concepts and measure progress.
-
Truth Tables: To further aid comprehension, the tool generates truth tables for each logical operation. This visual representation can be instrumental in conceptualizing the results of logical operations.
To use this tool, you need to have a C++ compiler installed on your machine. After confirming the installation, clone this repository to your local machine.
main.cpp
- This file contains the main function which drives the entire program.LogicOperations
- This is a class that encapsulates all the logic operations used in propositional logic.