def constrainVariable(maxValue): if maxValue is not None: ymax = None if maxValue == SymbolTable.MAXTIME: ymax = Terms.get_by_name(SymbolTable.MAXTIME) else: ymax = YicesSignature.integer(maxValue) yterms = [ Terms.arith_leq_atom(YicesSignature.integer(0), self.yices_term), Terms.arith_leq_atom(self.yices_term, ymax) ] return Terms.yand(yterms) return Terms.arith_leq_atom(YicesSignature.integer(0), self.yices_term)
def toYicesTermNondecreasing(self, height): retval = [] args = [] varlist = self.varlist[0:height] for v in varlist: yv = v.toYicesTerm() args.append(yv) for i, yarg in enumerate(args): if i > 0: yterm = Terms.arith_leq_atom(args[i - 1], yarg) assert yterm is not None retval.append(yterm) return Terms.yand(retval)