From 5ba62215b5bd74245df5db88e26e0752b7b7b744 Mon Sep 17 00:00:00 2001 From: Zoltan Ujhelyi Date: Wed, 9 Mar 2022 15:29:00 +0100 Subject: [PATCH] Finalize release 2.7 This change adds a missing artifact to archive by the builds and adds a few minor documentation updates. --- Jenkinsfile | 1 + .../src/main/asciidoc/query-language.asciidoc | 5 ++++- .../src/main/asciidoc/releases/viatra-2.7.adoc | 8 +++++--- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 76c56db80c..97619f4bfc 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -90,6 +90,7 @@ pipeline { archiveArtifacts artifacts: 'releng/org.eclipse.viatra.update/target/org.eclipse.viatra.update-*.zip' archiveArtifacts artifacts: 'query/tests/org.eclipse.viatra.query.rcptt/org.eclipse.viatra.query.rcptt.tests/target/results/**' archiveArtifacts artifacts: 'releng/org.eclipse.viatra.docs/target/reference/api/**' + archiveArtifacts artifacts: 'query/tests/org.eclipse.viatra.query.runtime.cps.tests/BasicCpsTest_coverage.html' javadoc javadocDir: 'releng/org.eclipse.viatra.docs/target/reference/api', keepAll: false junit testResults: '**/tests/**/target/surefire-reports/*.xml' } diff --git a/documentation/org.eclipse.viatra.documentation.help/src/main/asciidoc/query-language.asciidoc b/documentation/org.eclipse.viatra.documentation.help/src/main/asciidoc/query-language.asciidoc index cb72020e01..836ab1e76d 100644 --- a/documentation/org.eclipse.viatra.documentation.help/src/main/asciidoc/query-language.asciidoc +++ b/documentation/org.eclipse.viatra.documentation.help/src/main/asciidoc/query-language.asciidoc @@ -107,6 +107,7 @@ The most basic pattern constraints are type declarations: use EClasses, ERelatio 4. In the above constraints, wherever you could reference a variable in a pattern body, you can also use: * Constant literals of primitive types, such as `10`, or `"Hello World"`. * Constant literals of enumeration types, such as `MyEEnum::MY_LITERAL` + * Java constants, more specifically, public static final fields can be represented after the java keyword, such as `java Integer::MAX_VALUE`. * Aggregation of multiple matches of a called pattern into a single value, in a syntax analogous to negative pattern calls: * The simplest case is match counting: `howManyNeighbors == count find neighborPattern(myEntityVariable, _);` * Since v1.4, we provide additional out-of-the-box aggregators. `sum` computes the sum of numbers. `min`/`max` select the smallest / greatest of a nonempty bag of number, date or string values. Unlike match counting, these aggregators require a marker symbol `#` to indicate which parameter of the called pattern shall be aggregated (e.g. summed). @@ -114,7 +115,9 @@ The most basic pattern constraints are type declarations: use EClasses, ERelatio * Attribute expression evaluation: the `eval()` construct lets you compute values by Java (actually https://www.eclipse.org/xtend/[Xbase]) expressions referencing variables of EDataTypes and java values. * `qualifiedName == eval(parentName + "." + simpleName);` * The Java types of variables are inferred based on the EMF Ecore specification (using the generated Java classes) - * `eval unwind (...)` lets you compute values for each member of a Set object + * `eval unwind (...)` lets you compute values for each member of a Set object (available since version 2.7) + * The returned set *should not* contain duplicate values. Adding duplicate values would not cause duplicate results in the match set of the pattern but increases processing time. + * As of version 2.7 the functionality was not tested with large sets returned. If such cases result in slow query evaluation, please open a bug report with as much details as possible to help finetuning the responsible algorithms. 5. Additional attribute constraints using the check() construct, similarly to eval(): * `check(aNumberVariable > aStringVariable.length());` * Semantically equivalent to `true == eval(aNumberVariable > aStringVariable.length());` diff --git a/documentation/org.eclipse.viatra.documentation.help/src/main/asciidoc/releases/viatra-2.7.adoc b/documentation/org.eclipse.viatra.documentation.help/src/main/asciidoc/releases/viatra-2.7.adoc index a7db84615d..ff0427dc18 100644 --- a/documentation/org.eclipse.viatra.documentation.help/src/main/asciidoc/releases/viatra-2.7.adoc +++ b/documentation/org.eclipse.viatra.documentation.help/src/main/asciidoc/releases/viatra-2.7.adoc @@ -5,12 +5,14 @@ ifndef::imagesdir[:imagesdir: {rootdir}/../images] = VIATRA 2.7 -Release date:: 2022-03-xx +Release date:: 2022-03-16 More information:: https://projects.eclipse.org/projects/modeling.viatra/releases/2.7.0 == New and Noteworthy -In addition to bugfixes, VIATRA 2.7 introduces a new language feature: now it is possible to reference Java constants, more precisely, public static final fields of Java classes from pattern specifications. +In addition to bugfixes, VIATRA 2.7 introduces two new language features: the capability to reference *Java constants*, and the use of *eval unwinding*. + + For the first case, Java constants more precisely, public static final fields of Java classes from pattern specifications everywhere where variables or constant literals can be used. [source,vql] ---- @@ -19,7 +21,7 @@ pattern maxInteger(value : java Integer) { } ---- -Another new language feature in version 2.7 is eval unwinding: it is now possible to return multiple different values from any given attribute value. This feature is useful for extracting data from otherwise unstructured information, e.g. multiple URLs from a specific documentation field. +Eval unwinding allows the processing of collections inside pattern bodies: by writing a specific eval expression with the marked with the `unwind` keyword, the returned Set is processed one by one (as separate matches). This feature is useful for extracting data from otherwise unstructured information, e.g. multiple URLs from a specific documentation field. [source,vql] ----