vsadowski307 / aima-python

Automatically exported from code.google.com/p/aima-python
0 stars 0 forks source link

logic.to_cnf is not working properly #13

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
import logic
logic.to_cnf("A | (B | (C | (D & E)))")

What is the expected output? What do you see instead?
expected: (D | A | B | C) & (E | A | B | C)
got this instead: (A | B | C | (D & E))
i.e. no effect except that that Nary correctly raised the '|' operations.

What version of the product are you using? On what operating system?
latest as of Oct 5th 2009
running on ubuntu linux, but it's likely  not related to my OS.

Please provide any additional information below.
The issue is likely in the distribute_and_over_or procedure.
to_cnf("A | (B | (C & D))") produces the correct output, so it's not
properly recursing.

Original issue reported on code.google.com by john.a.f...@gmail.com on 6 Oct 2009 at 1:49

GoogleCodeExporter commented 8 years ago
Also, I noticed that to_cnf does not deal with xor at all.
>>>to_cnf("A ^ B")
A ^ B
which is not CNF form.

Original comment by john.a.f...@gmail.com on 6 Oct 2009 at 3:03

GoogleCodeExporter commented 8 years ago
This issue was closed by revision r83.

Original comment by wit...@gmail.com on 4 Oct 2011 at 4:14