我在
找到了一个坐着的解算器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);
答案 0 :(得分:5)
我相信这项技术已被整合到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