Beispiel #1
0
    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)
Beispiel #2
0
    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
Beispiel #3
0
 def walk_symbol(self, formula, **kwargs):
     return quote(formula.symbol_name())
Beispiel #4
0
 def walk_symbol(self, formula):
     self.write(quote(formula.symbol_name()))
Beispiel #5
0
 def walk_symbol(self, formula):
     self.write(quote(formula.symbol_name(), style="'"))