Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add hooks to memory reads about memory offsets #104

Closed
fortunac opened this issue Dec 4, 2019 · 1 comment
Closed

Add hooks to memory reads about memory offsets #104

fortunac opened this issue Dec 4, 2019 · 1 comment
Assignees
Labels
enhancement New feature or request WP Involves the Weakest Precondition computation

Comments

@fortunac
Copy link

fortunac commented Dec 4, 2019

Related to #93. We initially expressed memory offsets as quantifiers added to the hypothesis, but this created a slowdown with Z3.

Instead, we should be adding hooks to memory reads (currently unsure if we need writes) for both the stack and heap in the form of the constraints:

Heap(x) => init_mem_orig[x] == init_mem_mod[x + d]

and

Stack(x) => init_mem_orig[x] == init_mem_mod[x]

where d is some offset that can be inputted as a parameter.

init_mem_orig and init_mem_mod are fresh variables generated prior to running wp, and init_mem_orig == mem_orig and init_mem_mod == mem_mod should be added to the hypothesis. The user should also be able to use #101 to express precondition about the initial memory.

We still need to assert that Stack(SP) is pointing to a valid location on the stack. It is unclear whether we should say that SP is at the top of the stack, in the top region of the stack, or any other notion of it being valid.

@fortunac fortunac added enhancement New feature or request WP Involves the Weakest Precondition computation labels Dec 4, 2019
@fortunac fortunac self-assigned this Dec 4, 2019
@fortunac
Copy link
Author

fortunac commented Jan 9, 2020

Handled in #107

@fortunac fortunac closed this as completed Jan 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request WP Involves the Weakest Precondition computation
Projects
None yet
Development

No branches or pull requests

1 participant