Example #1
0
 def build(self, env):
     type_ = env.types[self.type_id]
     for decl in self.decls:
         inst = type_.instantiate(env)
         env.init(decl.id, inst)
         for id, rhs in decl.params:
             LC.equate(inst.mapping[id], rhs.evaluate(env))
Example #2
0
 def build(self, env):
     type_ = env.types[self.type_id]
     for decl in self.decls:
         inst = type_.instantiate(env)
         env.init(decl.id, inst)
         for id, rhs in decl.params:
             LC.equate(inst.mapping[id], rhs.evaluate(env))
Example #3
0
 def evaluate(self, env):
     type_ = tuple_types[len(self.exprs)]
     inst = type_.instantiate(env)
     for v, expr in zip(type_.fields, self.exprs):
         LC.equate(inst.mapping[v], expr.evaluate(env))
     return inst
Example #4
0
 def build(self, env):
     for lhs, rhs in self.equations:
         LC.equate(lhs.evaluate(env), rhs.evaluate(env))
Example #5
0
 def evaluate(self, env):
     type_ = tuple_types[len(self.exprs)]
     inst = type_.instantiate(env)
     for v, expr in zip(type_.fields, self.exprs):
         LC.equate(inst.mapping[v], expr.evaluate(env))
     return inst
Example #6
0
 def build(self, env):
     for lhs, rhs in self.equations:
         LC.equate(lhs.evaluate(env), rhs.evaluate(env))