eclipse-viatra / org.eclipse.viatra

Main components of the VIATRA framework
https://eclipse.dev/viatra
Eclipse Public License 2.0
0 stars 1 forks source link

Invalid example query #182

Closed eclipse-viatra-bot closed 1 month ago

eclipse-viatra-bot commented 6 months ago

| --- | --- | | Bugzilla Link | 581638 | | Status | REOPENED | | Importance | P3 normal | | Reported | Mar 07, 2023 04:55 EDT | | Modified | Mar 07, 2023 08:50 EDT | | Version | 2.8.0 | | See also | Gerrit change 200375, Git commit d422bcc6 | | Reporter | Gabor Bergmann |

Description

In the documentation on VQL: https://www.eclipse.org/viatra/documentation/query-language.html

Sec 3.4.1 has this code snippet:

pattern qualifiedName(node : Node, name) {\ // for a child element, compose from parents qualified name\ find parent(node, parentNode);\ Node.simpleName(node, simpleName);\ find qualifiedName(parent, parentName); // recursive call\ name == eval (parentName + "." + simpleName);\ } or {\ // for a root element, just use the simple name\ neg find parent(node, _anyParent); // has no parents\ Node.simpleName(node, name);\ }

Instead, line 5 should read:

find qualifiedName(parentNode, parentName); // recursive call

Thanks to Mária Bekő for identifying the problem

eclipse-viatra-bot commented 6 months ago

Mar 07, 2023 07:49

New Gerrit change created: https://git.eclipse.org/r/c/viatra/org.eclipse.viatra/+/200375

eclipse-viatra-bot commented 6 months ago

Mar 07, 2023 08:16

Gerrit change https://git.eclipse.org/r/c/viatra/org.eclipse.viatra/+/200375 was merged to [master].\ Commit: http://git.eclipse.org/c/viatra/org.eclipse.viatra.git/commit/?id=d422bcc626a99c4640c0d13931f393ccea0d2326

eclipse-viatra-bot commented 6 months ago

By Gabor Bergmann on Mar 07, 2023 08:43

The doc was fixed in https://git.eclipse.org/r/c/viatra/org.eclipse.viatra/+/200375

eclipse-viatra-bot commented 6 months ago

By Zoltan Ujhelyi on Mar 07, 2023 08:50

Reopening as the website is not updated automatically, it needs to be done manually.