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

Reduce optimization breaks variable order in import #5

Open
ondrik opened this issue Aug 26, 2018 · 0 comments
Open

Reduce optimization breaks variable order in import #5

ondrik opened this issue Aug 26, 2018 · 0 comments

Comments

@ondrik
Copy link

ondrik commented Aug 26, 2018

When import is called such that the order of variables is to be reversed (unavoidable in some cases), e.g. when computing composition of two transducers:

var2 x, y;
ex2 z: import("rel1.dfa", t0 -> x, t1 -> z) & import("rel2.dfa", t0 -> z, t1 -> y)

when using the code optimisation ("-o1", turned on by default), even the technique from MONA manual does not work (note that it is required that the order of variables in the imported DFA and the order of variables assigned in their place need to match):

var2 x, y;
ex2 z, w: import("rel1.dfa", t0 -> x, t1 -> z) & import("rel2.dfa", t0 -> z, t1 -> w) & w = y

because the optimiser reassigns t1 back to t1 -> y in the second import and MONA crashes. As far as I could tell from my example (attached), setting -o0 when calling MONA works, or removing this line works, but the second solution is very ad-hoc I'm not sure whether it really fixes the problem.

mona-import-order-error.zip

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