The algorithm is still incomplete and there are many unused funcs I though would be required.
A + Bmeans ANDA | Bmeans ORA ^ Bmeans XOR!Ameans NOTA | B => C + Dmeans ifAorBare true, thenCandDare also trueX ^ (A | B) => !Kmeans if left side is true, thenKis certainly false=AJKdescribes initial facts, in this caseA,J,Kare true?XYsays that we want to know whetherXandYare true
Example of program input and output:
A => J ^ K
B => X ^ Y
J + !K => !A | C
C => D
=A
?D
( true: A unknown: D )
Using C => D
( true: A unknown: C, D )
Using C => D
No match
Using J + !K => !A | C
( true: A unknown: C, D, J, K )
Using C => D
No match
Using J + !K => !A | C
No match
Using A => J ^ K
2 possible outcomes
Trying with ( true: J false: K )
( true: A, J false: K unknown: C, D )
Using C => D
No match
Using J + !K => !A | C
3 possible outcomes
Trying with ( false: A )
Conflict
Trying with ( true: C )
( true: A, C, J false: K unknown: D )
Using C => D
1 possible outcome
Trying with ( true: D )
( true: A, C, D, J false: K )
Unknown list is empty, returning
Result: ( true: A, C, D, J false: K )