Skip to content

Reduce optimization breaks variable order in import #5

Description

@ondrik

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions