Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/avan1235/oop-logics
https://github.com/avan1235/oop-logics
Last synced: about 10 hours ago
JSON representation
- Host: GitHub
- URL: https://github.com/avan1235/oop-logics
- Owner: avan1235
- Created: 2022-04-26T20:20:44.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2022-05-06T14:11:29.000Z (over 2 years ago)
- Last Synced: 2023-03-03T23:35:58.851Z (over 1 year ago)
- Language: Java
- Size: 58.6 KB
- Stars: 0
- Watchers: 1
- Forks: 15
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Logical Expressions
Your task is to design the model for logical expressions which can represent
propositional logic formulas which uses `and`, `or`, `not`, `implies`, `iff`,
constants `true` and `false`, and named variables like `x`, `y`, `z`.You have to design your model in such an approach, to allow user to evaluate
your expression in some specified valuation which will assign values to named
variables. After designing your model, let's fill the `FormulaFactory` with
valid implementation and use it in samples/tests building.Your classes need to be able to convert themselves to readable representation
which should be presented in `Main` class.Your second goal is to write brute-force solver for your formulas' model.
Your solver should at first collect data about all variables that appear
in formula and then try all assignments of `true`/`false` to these variables,
looking for first assignment for which formula evaluates to `true`.
It should be implemented as `Solver` class.Last step is to write a few (at least three) interesting (not trivial) unit tests
that will be readable by human and will check if found valuation by `Solver` is
a valid one. If you need some template, how to write unit tests in Java, take a look
at your [queue tests code](https://github.com/avan1235/oop-queue/blob/master/src/test/java/pl/edu/mimuw/queue/FIFOTest.java).