예제 #1
0
파일: nfexpr.py 프로젝트: rbarzic/pyeda
 def satisfy_one(self, algorithm='dpll'):
     if algorithm == 'backtrack':
         return backtrack(self)
     elif algorithm == 'dpll':
         return dpll(self)
     else:
         raise ValueError("invalid algorithm")
예제 #2
0
파일: expr.py 프로젝트: rbarzic/pyeda
 def satisfy_one(self, algorithm='backtrack'):
     if algorithm == 'backtrack':
         return sat.backtrack(self)
     elif algorithm == 'dpll':
         if self.is_cnf():
             return sat.dpll(self)
         else:
             raise TypeError("expression is not a CNF")
     else:
         raise ValueError("invalid algorithm")