Esempio n. 1
0
    def build(self, btor):
        from vsc.visitors.model_pretty_printer import ModelPrettyPrinter
        cond = ExprModel.toBool(btor, self.cond.build(btor))
        true_c = self.true_c.build(btor)

        if self.false_c == None:
            ret = btor.Implies(cond, true_c)
        else:
            false_c = self.false_c.build(btor)
            ret = btor.Cond(cond, true_c, false_c)

        return ret
Esempio n. 2
0
 def build(self, btor):
     return ExprModel.toBool(btor, self.e.build(btor))
Esempio n. 3
0
    def build(self, btor):
        cond = ExprModel.toBool(btor, self.cond.build(btor))
        body = super().build(btor)

        return btor.Implies(cond, body)