def alloc_pointsto_buffer_readonly(spec: Contract, length: int, data: SetupVal) -> SetupVal: buf = alloc_buffer_aligned_readonly(spec, length) spec.points_to(buf, struct(int_to_64_cryptol(length)), check_target_type=None) return buf
def oneptr_update_func(c: Contract, ty: LLVMType, fn_name: str) -> None: """Updates contract ``c`` to declare calling it with a pointer of type ``ty`` updates that pointer with the result, which is equal to calling the Cryptol function ``fn_name``.""" (x, x_p) = ptr_to_fresh(c, ty) c.execute_func(x_p) c.points_to(x_p, cry(fn_name)(x)) c.returns(void) return None