001 package aima.logic.demos; 002 003 import aima.logic.propositional.algorithms.DPLL; 004 005 /** 006 * @author Ravi Mohan 007 * 008 */ 009 public class DPLLDemo { 010 private static DPLL dpll = new DPLL(); 011 012 public static void main(String[] args) { 013 displayDPLLSatisfiableStatus("( A AND B )"); 014 displayDPLLSatisfiableStatus("( A AND (NOT A) )"); 015 // displayDPLLSatisfiableStatus("((A OR (NOT A)) AND (A OR B))"); 016 } 017 018 public static void displayDPLLSatisfiableStatus(String query) { 019 if (dpll.dpllSatisfiable(query)) { 020 System.out.println(query + " is (DPLL) satisfiable"); 021 } else { 022 System.out.println(query + " is NOT (DPLL) satisfiable"); 023 } 024 } 025 }