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

eMoflon::IBeX 2.0: parametrized patterns/rules only work with api.getGTEngine().setAlwaysUpdatePrior(true); #429

Open
maxkratz opened this issue Sep 4, 2024 · 0 comments
Labels

Comments

@maxkratz
Copy link
Member

maxkratz commented Sep 4, 2024

At least in some cases, parametrized patterns/rules do not work as expected unless api.getGTEngine().setAlwaysUpdatePrior(true); is set.

Example rule:

rule findItemByName(name: EString) {
	[=] recipe: Recipe {
		[=] -item -> items
	}

	[=] items: Item {
	}
	[#] items.name == parameter.name;
};

If there is an element in the model, that is of type Item and has the name abc, this assert fails:

[...]
assertEquals(1, api.findItemByName("abc").countMatches());

On the other hand, this assert succeeds:

[...]
api.getGTEngine().setAlwaysUpdatePrior(true);
assertEquals(1, api.findItemByName("Flour").countMatches());
@maxkratz maxkratz added the bug label Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant