write_goal
only writes the last proof goal to a file, unlike other goal-writing proof scripts
#2160
Labels
subsystem: saw-core
Issues related to the saw-core representation or the saw-core subsystem
type: bug
Issues reporting bugs or unexpected/unwanted behavior
Milestone
Consider this C program and corresponding proof script:
Note that the proof script in the call to
llvm_verify
useswrite_goal
, with the intent that it will write each proof goal to a file. In this particular example, we would expect to see two proof goals written: one when checking the safety assertion thatx + 1
will not produce signed integer overflow, and other when checking that the return value in the simulator actually equalsx + 1
on the Cryptol side. Despite this, if we run this SAW on it:Then we only see a single file
goal
written:This contains goal number 1, which is the second proof goal (note that goal numbers are zero-indexed within SAW). Contrast this to a different proof script, which writes SMT-LIB proof goals to files:
This will write two files, one for each proof goal:
Note that the names of each file reflect which goal type and number they encode. In this sense,
write_goal
is the unusual one, as it is (as far as I can tell) the only proof-goal-writingProofScript
that does not disambiguate its files with a similar naming convention. As such, it will write each proof goal to the same file name, clobbering the results of previous goals.I propose that we alter
write_goal
to use a similar file naming convention asoffline_w4_unint_z3
and friends. I believe something like this would suffice:The same code is shared among all
ProofScript
s that write proof goals to files, however, so we should consider factoring it out.The text was updated successfully, but these errors were encountered: