def include(self, seed, criterion, exclude=False): try: s = self.all_seeds[seed] except KeyError: s = self.all_seeds[seed] = set(), set() s[exclude].add(criterion) self.criteria_bits.setdefault(criterion, 0)
def include(self, seed, criterion, exclude=False): try: s = self.all_seeds[seed] except KeyError: s = self.all_seeds[seed] = set(), set() s[exclude].add(criterion) self.criteria_bits.setdefault(criterion, 0)
def sequential_disjuncts(c): pre = True out = set() for cond in c: out.update(disjuncts(intersect(pre, cond))) pre = intersect(pre, negate(cond)) return list(out)
def sequential_disjuncts(c): pre = True out = set() for cond in c: out.update(disjuncts(intersect(pre, cond))) pre = intersect(pre, negate(cond)) return list(out)
def add_criterion(self, criterion): my_seeds = self.criteria_seeds.setdefault(criterion, set()) self.reseed(criterion) for seed in self.all_seeds: if implies(istype(seed), criterion): self.include(seed, criterion) my_seeds.add(seed) return my_seeds
def add_criterion(self, criterion): my_seeds = self.criteria_seeds.setdefault(criterion, set()) self.reseed(criterion) for seed in self.all_seeds: if implies(istype(seed), criterion): self.include(seed, criterion) my_seeds.add(seed) return my_seeds
def __init__(self, owner, expr): self.constraints = set()
def __init__(self, owner, expr): self.constraints = set()