-
Notifications
You must be signed in to change notification settings - Fork 46
/
Copy pathprintf.txt
21 lines (14 loc) · 909 Bytes
/
printf.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
The printf function is available for use in verifiable computations for
debugging purposes. Using printf in a verifiable computation causes the
compiler to emit at PRINTF statement in the prover worksheet, which the prover
interprets when solving the constraints.
The implementation has the following limitations and known bugs:
- Only integer types can be printed. (When solving the constraints, the prover
uses arbitrary precision integers for all types and Pepper's printf is
implemented by passing these directly to gmp's printf.)
- The %Zd format specifier should be used for all integer types.
- All printf calls will always be printed, even if they are in conditionals
which resolve to false at runtime. The execption is conditionals which can
be resolved to false at compile time.
-printf calls inside conditionals nested in loops fail to compile.
- printf accepts up to 10 arguments.