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

ModuloTheories not generating enough assumptions about equality #68

Open
leoqiao18 opened this issue Dec 1, 2023 · 3 comments
Open

Comments

@leoqiao18
Copy link

An issue in a spec that came from @w14 :

#LIA
always guarantee {
    y = 0 -> X y = 0;
    true -> [y <- 0];
}

This should be realizable by always assigning 0 to y. But tsl synthesize fails at the ltlsynt step.

The problem comes from a lack of assumptions generated by the ModuloTheories step. Running tsl theorize gives the following theorized spec:

always assume {
G !((eq y int0()) && ((eq y int0()) && (!(eq y int0()) && !(eq y int0()))));
G !((eq y int0()) && ((eq y int0()) && !(eq y int0())));
G !((eq y int0()) && ((eq y int0()) && !(eq y int0())));
G !((eq y int0()) && (!(eq y int0()) && !(eq y int0())));
G !((eq y int0()) && !(eq y int0()));
G !((eq y int0()) && !(eq y int0()));
G !((eq y int0()) && (!(eq y int0()) && !(eq y int0())));
G !((eq y int0()) && !(eq y int0()));
G !((eq y int0()) && !(eq y int0()));
}
always guarantee {
((eq y int0()) -> (X (eq y int0())));
((true) -> [y <- int0()]);
}

Notice that the ModuloTheories step only adds a bunch of repeated points about how y cannot be equal to 0 and not be equal to 0 at the same time. It did not add anything about how assigning 0 to y causes y to be equal to 0 in the next time step.

This might be related to the issue that @santolucito talked about in #64

@santolucito
Copy link
Member

Ya I think we'll need to look at the sygus logs to figure out what queries are being made, and why we aren't getting the right assumptions added

santolucito added a commit that referenced this issue Dec 23, 2023
@santolucito
Copy link
Member

Looks like we need to try to schedule a call with @wonhyukchoi to fix this issue

We need

/* G (((eq y int0()) && [y <- int0()]) -> X (eq y int0())); */

and it seems we don't have support for this in the new implementation of TSL-MT (I am pretty sure it was there in the old implementation that @wonhyukchoi made for the PLDI paper though)

"((p x) & [x <- x]) -> X (p x) type assumptions not yet supported."

@santolucito
Copy link
Member

Also, I'm actually thinking, at least as a hack for now, just brute force generating all the assumptions of this particular form. Would be fairly easy and this is the most common equality+temporal form we need

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

2 participants