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

Variable leakage in EPL #13

Open
kolovos opened this issue Nov 26, 2022 · 0 comments
Open

Variable leakage in EPL #13

kolovos opened this issue Nov 26, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@kolovos
Copy link
Contributor

kolovos commented Nov 26, 2022

In this example, referring to p1 in the TaskLeader pattern should throw an exception but it doesn't because presumable the variable leaks from the Collaborators pattern.

// Find pairs of people that work
// on at least one common task
pattern Collaborators
	p1, p2 : Person {

	match: Task.all.exists(t|t.effort.person.
		includesAll(Sequence{p1, p2}))
}

// Pair tasks with their leaders
pattern TaskLeader 
	t : Task,
	p : Person from: t.effort.person {

	match: t.effort.sortBy(e|-e.percentage).
		first()?.person = p1 
}
@kolovos kolovos added the bug Something isn't working label Nov 26, 2022
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

No branches or pull requests

1 participant