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 cutsets smaller in DataLang #1042

Open
myreen opened this issue Aug 9, 2024 · 0 comments
Open

Make cutsets smaller in DataLang #1042

myreen opened this issue Aug 9, 2024 · 0 comments

Comments

@myreen
Copy link
Contributor

myreen commented Aug 9, 2024

@tanyongkiam noticed that cutsets are sometimes too large.

For example, the explorer output reveals:

         (seq
            ...
            (6 := Mult (5 4) (some {4,5}))
            (return 6))

Here 4 and 5 are in the cutset ({4,5}) only because they are used as arguments to Mult. Ideally, the cutset should be empty because 4 and 5 are not used afterMult.

The reason they are in the cutset can be seen in the semantics of DataLang, here:

(evaluate (Assign dest op args names_opt,s) =
if op_requires_names op /\ IS_NONE names_opt then (SOME (Rerr(Rabort Rtype_error)),s) else
case cut_state_opt names_opt s of
| NONE => (SOME (Rerr(Rabort Rtype_error)),s)
| SOME s =>
(case get_vars args s.locals of
| NONE => (SOME (Rerr(Rabort Rtype_error)),s)
| SOME xs => (case do_app op xs s of

This needs to be corrected so that the arguments are read (get_vars) before the cutset is applied (cut_state_opt). With this change data_live can make the cutsets smaller. The data_to_word proofs need updating.

myreen added a commit that referenced this issue Aug 10, 2024
myreen added a commit that referenced this issue Aug 10, 2024
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

No branches or pull requests

1 participant