Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mehrab-kalantari/cnf-dnf-convertor
Java code to convert every logical formula to conjunctive normal form and disjunctive normal form
https://github.com/mehrab-kalantari/cnf-dnf-convertor
java logic logical-forms logical-formulas logical-foundations
Last synced: about 2 months ago
JSON representation
Java code to convert every logical formula to conjunctive normal form and disjunctive normal form
- Host: GitHub
- URL: https://github.com/mehrab-kalantari/cnf-dnf-convertor
- Owner: Mehrab-Kalantari
- Created: 2023-07-21T10:05:17.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-07-21T10:22:05.000Z (over 1 year ago)
- Last Synced: 2024-10-24T15:52:58.421Z (2 months ago)
- Topics: java, logic, logical-forms, logical-formulas, logical-foundations
- Language: Java
- Homepage:
- Size: 17.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# CNF-DNF-Convertor
Java code to convert every logical formula to conjunctive normal form and disjunctive normal form## Java code
Use simple names for variables like p, q, r.
#####
Use the following characters for operators
* and: &
* or: |
* negation: ~
* implication: ->
* equivalence: <->## Remember to put parentheses around each formula
Correct samples: ((p->q)&p) - (~(p->q))|(p&(~q))
#####
Wrong samples: (p->q)&p - ~(p->q) - p&(~q) - (p&~q)