示例#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")