llvm_compositional_extract
: surprising lack of return type detection
#2091
Labels
subsystem: crucible-llvm
Issues related to LLVM bitcode verification with crucible-llvm
type: bug
Issues reporting bugs or unexpected/unwanted behavior
Milestone
Consider this simple C function, which does nothing but return the value
42
:The goal is to extract
f
to aTerm
(which should also return the value42
) using the various LLVM-related extraction commands. Here is a script which demonstrates them all:Surprisingly, not all of the
f
-relatedTerm
s return42
:f_extracted_term
(which is extracted usingllvm_extract
) andf_compositional_extracted_term_2
(which is extracted usingllvm_compositional_extract
) both return42
, as expected.f_compositional_extracted_term_1
, on the other hand, returns()
instead of42
! This is very surprising, considering thatf_spec_1
is only a minor variation onf_spec_2
, and it's arguably more natural to writef_spec_1
thanf_spec_2
.SAW's
:help
output for thellvm_compositional_extract
function has this to say:I suppose there is some ambiguity about what "return parameter" means in this context. Nevertheless, I would argue that
llvm_return (llvm_term {{ 42 : [32] }})
should appear in the return type of the extractedTerm
. This would be far less surprising and would be more consistent with the behavior ofllvm_extract
.The text was updated successfully, but these errors were encountered: