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

Possible bug: Missing matches in some tests of gipsl.all.build.filter #61

Closed
maxkratz opened this issue Sep 8, 2022 · 3 comments · Fixed by #65
Closed

Possible bug: Missing matches in some tests of gipsl.all.build.filter #61

maxkratz opened this issue Sep 8, 2022 · 3 comments · Fixed by #65
Assignees
Labels
bug Something isn't working

Comments

@maxkratz
Copy link
Member

maxkratz commented Sep 8, 2022

See: https://github.com/Echtzeitsysteme/gips-tests/blob/main/gipsl.all.build.filter/src/gipsl/all/build/filter/Model.gipsl

Sometimes, the test testMap2to1NoIsDoubled() (https://github.com/Echtzeitsysteme/gips-tests/blob/main/test.suite.gips/src/test/suite/gipsl/all/build/GipslAllBuildFilterTest.java#L46-L56) fails because some of the matches are missing.

ILP solver output if test passes:

\ LP format - for model browsing. Use MPS format to capture full model detail.
Maximize
  n2n#0 + n2n#1
Subject To
 PatternConstraint1OnvnodeNotMapped_0: n2n#0 = 1
 PatternConstraint1OnvnodeNotMapped_1: n2n#1 = 1
 PatternConstraint0OnvnodeNotMapped_0: n2n#0 + n2n#1 = 1
 PatternConstraint0OnvnodeNotMapped_1: n2n#0 + n2n#1 = 1
Bounds
Binaries
 n2n#0 n2n#1
End

ILP solver output if test fails:

\ LP format - for model browsing. Use MPS format to capture full model detail.
Maximize
  n2n#0 + n2n#1
Subject To
 PatternConstraint0OnvnodeNotMapped_0: n2n#0 + n2n#1 = 1
 PatternConstraint0OnvnodeNotMapped_1: n2n#0 + n2n#1 = 1
Bounds
Binaries
 n2n#0 n2n#1
End

AFAIK, this behaviour is independent from the used pattern matcher (I've also tested it with Democles) and the used ILP solver (GUROBI and GLPK show the same error).

@maxkratz maxkratz added the bug Something isn't working label Sep 8, 2022
@maxkratz maxkratz self-assigned this Sep 8, 2022
@maxkratz
Copy link
Member Author

maxkratz commented Sep 9, 2022

Should be unrelated to eMoflon/emoflon-ibex-updatesite@3515a60.

@Flipy91
Copy link
Contributor

Flipy91 commented Sep 29, 2022

I also observed this behavior - it seems to be a concurrency issue in the GipslEngine l.37:

constraints.values().parallelStream().forEach(constraint -> constraint.buildConstraints());

Workaround is building the constraints serial instead of parallel:

constraints.values().stream().forEach(constraint -> constraint.buildConstraints());

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants