示例#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)
示例#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
示例#3
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
示例#4
0
 def walk_symbol(self, formula, **kwargs):
     return quote(formula.symbol_name())
示例#5
0
 def walk_symbol(self, formula):
     self.write(quote(formula.symbol_name()))
示例#6
0
 def walk_function(self, formula, args, **kwargs):
     return self.walk_nary(formula, args,
                           quote(formula.function_name().symbol_name()))
示例#7
0
文件: printers.py 项目: pysmt/pysmt
 def walk_symbol(self, formula):
     self.write(quote(formula.symbol_name(), style="'"))
示例#8
0
 def walk_symbol(self, formula):
     self.write(quote(formula.symbol_name().replace("__", ""), style="'"))
示例#9
0
 def walk_symbol(self, formula):
     self.write(quote(formula.symbol_name(), style='"'))
示例#10
0
 def walk_symbol(self, formula):
     self.write(quote(formula.symbol_name()))
示例#11
0
 def walk_symbol(self, formula, **kwargs):
     return quote(formula.symbol_name())