default to fastboolean eval

This commit is contained in:
Marcell Vazquez-Chanlatte 2017-02-28 13:32:54 -08:00
parent a34e4c2b0e
commit a8e84a3761
4 changed files with 17 additions and 6 deletions

View file

@ -6,6 +6,10 @@ from bitarray import bitarray
import stl.ast
from stl.boolean_eval import eval_terms, op_lookup
def pointwise_sat(stl):
f = pointwise_satf(stl)
return lambda x, t: bool(int(f(x, [t]).to01()))
@singledispatch
def pointwise_satf(stl):
raise NotImplementedError
@ -57,7 +61,7 @@ def _(stl):
@pointwise_satf.register(stl.Neg)
def _(stl):
return lambda x,t: ~pointwise_satf(arg)(x, t)
return lambda x,t: ~pointwise_satf(stl.arg)(x, t)
@pointwise_satf.register(stl.AtomicPred)