def printer(self, f): self.openings = 0 self.name_seed = 0 self.names = set( quote(x.symbol_name()) for x in f.get_free_variables()) key = self.walk(f) self.write(key) self.write(")" * self.openings)
def _walk_quantifier(self, operator, formula, args): assert args is None assert len(formula.quantifier_vars()) > 0 sym = self._new_symbol() self.openings += 1 self.write("(let ((%s (%s (" % (sym, operator)) for s in formula.quantifier_vars(): self.write("(") self.write(quote(s.symbol_name())) self.write(" %s)" % s.symbol_type().as_smtlib(False)) self.write(") ") subprinter = SmtDagPrinter(self.stream) subprinter.printer(formula.arg(0)) self.write(")))") return sym
def walk_symbol(self, formula, **kwargs): return quote(formula.symbol_name())
def walk_symbol(self, formula): self.write(quote(formula.symbol_name()))
def walk_symbol(self, formula): self.write(quote(formula.symbol_name(), style="'"))