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

Make evaluate preserve vector immutability #244

Merged
merged 1 commit into from
Oct 17, 2022
Merged

Make evaluate preserve vector immutability #244

merged 1 commit into from
Oct 17, 2022

Conversation

anishathalye
Copy link
Contributor

Prior to this patch, the following returned an immutable vector:

(define empty-model (solve (void)))
(evaluate (vector-immutable 1) empty-model)

However, the following returned a mutable vector, even though evaluate is given an immutable vector (containing no symbolics):

(define-symbolic* b boolean?)
(define model (solve (assert b)))
(evaluate (vector-immutable 1) model)

With this patch, both examples above return an immutable vector.

Prior to this patch, the following returned an immutable vector:

    (define empty-model (solve (void)))
    (evaluate (vector-immutable 1) empty-model)

However, the following returned a _mutable_ vector, even though
`evaluate` is given an immutable vector (containing no symbolics):

    (define-symbolic* b boolean?)
    (define model (solve (assert b)))
    (evaluate (vector-immutable 1) model)

With this patch, both examples above return an immutable vector.
@anishathalye anishathalye changed the title Make vector immutability preserved under evaluate Make evaluate preserve vector immutability Oct 15, 2022
@emina emina merged commit 7e69613 into emina:master Oct 17, 2022
@emina
Copy link
Owner

emina commented Oct 17, 2022

Thank you!

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.

2 participants