-
Notifications
You must be signed in to change notification settings - Fork 2
Formula type refactoring #251
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Formula type refactoring #251
Conversation
This exact case could also be resolved by changing the new constructor names to: data Literal
= Positive { letter :: Char} -- ^ positive sign
| Negative { letter :: Char} -- ^ negative sign instead of data Literal
= Pos { letter :: Char} -- ^ positive sign
| Neg { letter :: Char} -- ^ negative sign |
Does this also still warrant some action here? logic-tasks/src/Formula/Util.hs Lines 42 to 45 in b453da2
|
And yes, |
About this part:
Where does the uncertainty come from? That piece of code seems to be semantically equivalent to what it was before. Do you suspect there was a semantic error so far? |
What appears from looking through the code here is also that there seem to be further cases in the code where "literal" vs. "atom" is confused, not caught by #239 (maybe because the code search there was for "literal" rather than also possible variations of it). For example, in here: logic-tasks/src/LogicTasks/Semantics/Min.hs Lines 104 to 108 in e7a0424
corLits should be correctAtoms .
And here: logic-tasks/src/Formula/Types.hs Lines 597 to 607 in e7a0424
|
I was wondering if a simple |
I will address this in a separate pull request. |
I'll merge this PR here, then open a separate issue related to that point. There is actually a subtlety about the implementation of resolution I was not aware of before. |
Closes #248
This also includes the change from "literals" to "atomics" at the
Table
type (there might be an overlap with #239 here).Some tasks need to be adapted on the Autotool-side after this gets merged.
One thing I'm not sure about is the usage of
atomics
here: https://github.com/nimec01/logic-tasks/blob/e57f1cd58cbc39c649fd50618ebbc192997be86b/src/Formula/Resolution.hs#L50-L57There also might be more renaming to consider since there are still name overlaps in
UniversalParser
,Formula.Types
(and potentiallyTrees.Types
).Example:
Neg
-Constructor ofLiteral
andNeg
-Constructor ofNeg
(atUniversalParser
)