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

GIPSL: Remove implicit variable multiplication in the mapping context #195

Closed
maxkratz opened this issue Dec 19, 2024 · 0 comments · Fixed by #213
Closed

GIPSL: Remove implicit variable multiplication in the mapping context #195

maxkratz opened this issue Dec 19, 2024 · 0 comments · Fixed by #213
Labels
enhancement New feature or request

Comments

@maxkratz
Copy link
Member

As of now, GIPSL implicitly multiplies the mapping's binary ILP variable to the terms given in, for example, a constraint with the mapping context. Example:

mapping m with someGtRule;

constraint -> mapping::m {
    <some constraint>
}

The problem arises that because of this, no other mappings can be accessed in a constraint with a mapping context because this would result in a quadratic equation. Hence, the following example is currently not possible:

mapping n with someOtherGtRule;
constraint -> mapping::m {
    <some constraint on self> <=> mappings.n->[...]
}

The current workaround is to use the pattern/rule of the mapping as context and overlap it completely within the filter expression as such:

constraint -> pattern::someGtRule {
    mappings.m->filter(match | match.nodes().x == self.nodes().x & [...])[...]
}

This results in a very "wordy" specification because a large amount of filter specification code is just used to get the one mapping that corresponds to the match of the pattern context.
As a result, this issue proposes to remove the implicit variable multiplication for the mapping context.

I will open another issue for another solution to the problem of "wordiness", but the implicit multiplication should nevertheless be remove IMO.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant