def specification(self): (x, x_p) = ptr_to_fresh(self, ty.array(2, ty.i32), "x") p = self.alloc(ty.alias('struct.s'), points_to=struct(x_p)) self.execute_func(p) self.returns(p)
def specification(self): tp = self.alloc(ty.alias('struct.t')) b = self.fresh_var(ty.i32, "b") self.points_to(field(field(tp, "n"), "b"), b) self.execute_func(tp) self.returns(b)
def specification(self): (_, x_p) = ptr_to_fresh(self, ty.array(2, ty.i32), "x") p = self.alloc(ty.alias('struct.s'), points_to=struct(x_p)) self.execute_func(p) self.points_to(p, struct(x_p)) self.points_to(x_p, cryptol('[0, 0] : [2][32]')) self.returns(void)
def setup_hash_state(c: Contract, pstate: SetupVal) -> Tuple[Any, FreshVar]: alg0 = c.fresh_var(ty.i32, "alg") h0 = c.fresh_var(ty.array(8, ty.i64), "h0") Nl0 = c.fresh_var(ty.i64, "Nl") Nh0 = c.fresh_var(ty.i64, "Nh") u0 = c.fresh_var(ty.array(16, ty.i64), "u") num0 = c.fresh_var(ty.i32, "h0") is_ready_for_input0 = c.fresh_var(ty.i8, "is_ready_for_input") currently_in_hash0 = c.fresh_var(ty.i64, "currently_in_hash") md_len0 = c.fresh_var(ty.i32, "md_len") (_, pimpl) = ptr_to_fresh(c, ty.alias('struct.s2n_hash'), "impl", read_only=True) c.points_to( pstate, struct(pimpl, alg0, is_ready_for_input0, currently_in_hash0, struct(struct(struct(h0, Nl0, Nh0, struct(u0), num0, md_len0)))))