Error "could not create uninterpreted type for Prelude.Nat" when using crucible_fresh_pointer
#806
Labels
needs test
Issues for which we should add a regression test
subsystem: crucible-llvm
Issues related to LLVM bitcode verification with crucible-llvm
type: bug
Issues reporting bugs or unexpected/unwanted behavior
Milestone
Issues GaloisInc/cryptol-verifier#13 and GaloisInc/cryptol-verifier#31 both noted problems that arised when trying to do proofs about LLVM programs with specs that used
crucible_fresh_pointer
. Here is the small example program listed in GaloisInc/cryptol-verifier#31 (thanks to @ChrisEPhifer):and the saw-script spec:
This example no longer causes a panic, but it does cause an error:
As I mentioned in GaloisInc/cryptol-verifier#13, the
crucible_fresh_pointer
statement introduces aNat
-typed variable that represents the block ID of the symbolic pointer. (For an allocated pointer, the block ID would be a concrete number.) The saw-core proof backends (e.g.z3
) are not designed to handle symbolic variables of typeNat
, so they fail.To fix this, we could either extend the saw-core backends to properly support symbolic values of type
Nat
, or else we could modify the behavior ofcrucible_fresh_pointer
to avoid generating a variable of typeNat
(perhaps by using typeInteger
instead).The text was updated successfully, but these errors were encountered: