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

Implement COW semantics for state objects #1093

Closed
yan opened this issue Aug 28, 2018 · 2 comments
Closed

Implement COW semantics for state objects #1093

yan opened this issue Aug 28, 2018 · 2 comments

Comments

@yan
Copy link
Contributor

yan commented Aug 28, 2018

We currently rely on deep-copying when generating derived states, and use ad-hoc context managers to maintain them. We should implement COW semantics for all shared state data structures.

(This issue is a superset of #166)

@yan
Copy link
Contributor Author

yan commented Sep 12, 2018

From earlier issue, describing enter/exit protocol updates:

All objects in State need to implement a temporary copy on write mechanism over we could do a fork.

current_state = State()
with current_state as new_state:
#new_state here most be a COW copy of current state.
#every action over new_state must not affect current_state
#current_state must be inmutable during this with-statement
#after we do operations over new_state we can save it or forget it.
#As after the with statement new_state disappears then current state can be mutable again

Currently this is only implemented for the ConstraintSet and State (not all the objects used in State)

@ehennenfent
Copy link
Contributor

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

No branches or pull requests

3 participants