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

Refactor the memory model in preparation for tracking block IDs #174

Closed
wants to merge 15 commits into from

Conversation

travitch
Copy link
Contributor

The main goals of the refactor are to:

  1. Separate the core memory model data structure from the implementation of
    primitive crucible support operations (only the former need to be augmented for
    the memory model improvements)
  2. Remove unnecessary duplication (e.g., the symbolic sequence has a shared
    implementation in crucible)
  3. Clarify semantics
  4. Document interfaces

Note that this is a work in progress

The main goals of the refactor are to:

1. Separate the core memory model data structure from the implementation of
primitive crucible support operations (only the former need to be augmented for
the memory model improvements)
2. Remove unnecessary duplication (e.g., the symbolic sequence has a shared
implementation in crucible)
3. Clarify semantics
4. Document interfaces

Note that this is a work in progress
They are all exported, so make it clear that they can be used in many places
There are no more undefined cases, I think, but this draft does not account for
the pointer validity checks. The next commit will restore those, but factored
out so that they are configurable.
There is now less implied code sharing, but this approach will reduce
complexity.  Now, the `ValidityPolicy` validates and returns the validated
term (whatever that means for the backend).  All of the logic for term creation
is now thus in the `ValidityPolicy`.

There are two policies right now:

1. The unsafe policy that just assumes that every operation works out
2. The "conservative" policy that injects undefined pointer terms (as undefined
   functions) as the original memory model did

This paves the way for the future optimistic memory model that generates
assertions that must be proved to safely use the simple terms, but would also
enable a fallback to the conservative terms when necessary.

The major improvements of this are:

1. Removing any direct dependency on the undefined pointers in the crucible
extension for macaw
2. Providing a new (and simpler) mechanism for identifying the undefined
operations that a term depends on (see notes in the code for the rationale and
function)
@thebendavis
Copy link
Member

out of date / subsumed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants