runtimeverification / runtimeverification/haskell-backend
Z3 doesn't handle some #Not (#Exists ...) predicates
Open
@ana-pantilie is already working on this.
Since Jan 18, 2023.
feature
- Dominant language
- Haskell
- Stars
- 224
- Forks
- 43
- PR merge metrics
- No merged PRs in 30d
Description
High priority
Z3 is unable to refute predicates like:
#Not (
#Exists ITER_COUNT_F:Int .
{ VV6__data_3c5818c8:Bytes [ 32 *Int ?ITER_COUNT_F:Int .. #sizeByteArray ( VV6__data_3c5818c8:Bytes ) -Int 32 *Int ?ITER_COUNT_F:Int ] #Equals VV6__data_3c5818c8:Bytes [ 32 *Int ITER_COUNT_F:Int .. #sizeByteArray ( VV6__data_3c5818c8:Bytes ) -Int 32 *Int ITER_COUNT_F:Int ] }
#And { true #Equals 0 <=Int ITER_COUNT_F:Int }
#And { true #Equals 32 *Int ITER_COUNT_F:Int <Int #sizeByteArray ( VV6__data_3c5818c8:Bytes ) }
#And { true #Equals #sizeByteArray ( VV6__data_3c5818c8:Bytes ) <=Int 32 *Int ITER_COUNT_F:Int +Int 32 }
#And { true #Equals -9 <Int #sizeByteArray ( VV6__data_3c5818c8:Bytes ) }
)
...
#And { true #Equals 0 <=Int ?ITER_COUNT_F:Int }
#And { true #Equals 32 *Int ?ITER_COUNT_F:Int <Int #sizeByteArray ( VV6__data_3c5818c8:Bytes ) }
#And { true #Equals #sizeByteArray ( VV6__data_3c5818c8:Bytes ) <=Int 32 *Int ?ITER_COUNT_F:Int +Int 32 }
...
@PetarMax suggests a heuristic which looks for witnesses in the free variables of the predicate.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.