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

Ordered edges by index #1

Open
eclipse-viatra-bot opened this issue Mar 11, 2024 · 5 comments
Open

Ordered edges by index #1

eclipse-viatra-bot opened this issue Mar 11, 2024 · 5 comments
Labels
bugzilla Issues migrated from Eclipse bugzilla. Query Issues related to the query component of VIATRA, including runtime or pattern language issues.
Milestone

Comments

@eclipse-viatra-bot
Copy link

eclipse-viatra-bot commented Mar 11, 2024

| --- | --- |
| Bugzilla Link | 398737 |
| Status | NEW |
| Importance | P3 normal |
| Reported | Jan 22, 2013 08:42 EDT |
| Modified | Apr 19, 2016 05:25 EDT |
| Version | oldinquery |
| Reporter | Istvan Rath |

Description

Cloned from: 99: Ordered edges by index
https://github.com/ujhelyiz/EMF-IncQuery/issues/issue/99

Support ordered edge index path expressions, such as:

pattern myPattern() 
{
  Type.refType[X](Src,Trg);
}

where X would be the index variable (that can be replaced by a constant if necessary.)

@eclipse-viatra-bot eclipse-viatra-bot added bugzilla Issues migrated from Eclipse bugzilla. legacy Query Issues related to the query component of VIATRA, including runtime or pattern language issues. labels Mar 11, 2024
@eclipse-viatra-bot
Copy link
Author

By Istvan Rath on May 20, 2013 04:35

I'm setting version to "unspecified" as we currently do not (firmly) know when these future ideas will be addressed.

@eclipse-viatra-bot
Copy link
Author

By Zoltan Ujhelyi on May 31, 2013 04:19

Henshin has now something similar, see corresponding blog post: http://www.ckrause.org/2013/05/henshin-098-working-with-lists.html

@eclipse-viatra-bot
Copy link
Author

By Abel Hegedus on Apr 19, 2016 05:25

Updating to correct milestone.

@bergmanngabor
Copy link
Contributor

Probably the simplest solution would be to introduce a constraint in the language and a new inputkey for a binary relation (element, valueList) identified by a structural feature, where each element is associated with the list of values that eGet() would return. IT is easy for the EMFScope to maintain such relations (if indexed, which should happen on demand), and it is possible to process such lists further in VQL: eval() could call e.g. head, while eval unwind could call a helper method to transform the list to a set of index-value pairs (similar to IterableExtensions.forEach).

Path.steps[](path, stepList);
lastStep == eval(stepList.tail);

Open question: semantics of this relation for elements where the result list is empty.

@bergmanngabor
Copy link
Contributor

The original syntax suggestion is probably better:

  • more straightforward type inference in the language (no generics, no mixing between EObject-valued and scalar variables)
  • fewer VQL lines / simpler syntax in most use cases, with the exception of tail
  • there is no difficult semantic question of whether empty lists are to be matched

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from Eclipse bugzilla. Query Issues related to the query component of VIATRA, including runtime or pattern language issues.
Projects
None yet
Development

No branches or pull requests

3 participants