4

我在

http://code.google.com/p/aima-java/

我尝试了以下代码来使用 dpllsolver 解决表达式

输入是

(A <=> B) AND (C => D) AND (A AND C) AND (NOT (B AND D)) AND (NOT (B AND D AND E))

CNF 变压器将其转换为

 (  (  ( NOT A )  OR B ) AND  (  ( NOT B )  OR A ) )

它不考虑逻辑的其他部分,只考虑第一项,如何使其正常工作?

如果其他卫星求解器可以做到,请建议我

PEParser parser = new PEParser();
CNFTransformer transformer=new CNFTransformer();
Sentence and;
Sentence transformedAnd;
DPLL dpll = new DPLL();

Sentence sentence = (Sentence) parser.parse("(A <=> B) AND (C => D) AND (A AND C) AND (NOT (B AND D)) AND (NOT (B AND D AND E))");
transformedAnd = transformer.transform(sentence);

System.out.println(transformedAnd.toString());
boolean satisfiable = dpll.dpllSatisfiable(transformedAnd);

System.out.println(satisfiable);
4

1 回答 1

5

试试这个: http: //www.sat4j.org/

我相信这项技术已被纳入 Eclipse Provisioning System P2 以解决插件依赖性。http://blog.mancoosi.org/index.php/2008/06/01/4-edos-offspring-1-eclipse-p2-will-include-sat-solver-technology-for-managing-plugins

于 2010-10-24T21:36:47.617 回答