Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,22 @@ jobs:
- name: Test with Maven
run: mvn -B --update-snapshots -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn compile test

- name: Publish Test Reports
if: ${{ !cancelled() }}
uses: ctrf-io/github-test-reporter@v1
with:
report-path: 'target/rascal-test-reports/*.json'
github-report: true
file-report: true
pull-request-report: true
summary-delta-report: true
insights-report: true
fail-rate-report: true
slowest-report: true
upload-artifact: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Attach artifact
id: build-artifact
uses: SWAT-engineering/maven-full-artifacts-action@v1
Expand Down
43 changes: 10 additions & 33 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven-version>3.9.9</maven-version>
<maven.compiler.release>11</maven.compiler.release>
<rascal-version>0.43.0-RC1</rascal-version>
<rascal-maven.version>0.31.0</rascal-maven.version>
<rascal-version>0.43.0</rascal-version>
<rascal-maven.version>0.32.2</rascal-maven.version>
</properties>

<build>
Expand Down Expand Up @@ -89,7 +89,7 @@
<plugin>
<groupId>org.rascalmpl</groupId>
<artifactId>rascal-maven-plugin</artifactId>
<version>0.30.0-RC29</version>
<version>0.32.0-RC7</version>
<configuration>
<bin>${project.build.outputDirectory}</bin>
<srcs>
Expand All @@ -104,6 +104,13 @@
<goal>compile</goal>
</goals>
</execution>
<execution>
<id>default-test</id>
<phase>test</phase>
<goals>
<goal>test</goal>
</goals>
</execution>
<execution>
<id>default-package</id>
<phase>prepare-package</phase>
Expand Down Expand Up @@ -132,31 +139,6 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.5.2</version>
<executions>
<execution>
<id>default-test</id>
<phase>test</phase>
<goals>
<goal>test</goal>
</goals>
</execution>
</executions>
<configuration>
<argLine>
-ea
-Xmx1G
-Xss128m
-Dfile.encoding=UTF-8
</argLine>
<includes>
<include>**/RunTests.java</include>
</includes>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
Expand Down Expand Up @@ -222,11 +204,6 @@
<version>0.6.0</version>
</dependency>
<!-- Regular POM Dependencies -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.2</version>
</dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
Expand Down
16 changes: 8 additions & 8 deletions src/lang/java/m3/Core.rsc
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ These are the kinds of logical names that can be found in a Java M3 model:
* `unresolved:///` is from general M3 and means a name was tried to be resolved, but this was unsuccessful. Typically this means either the Java source code was statically incorrect, or the _classpath_ for configuring AST or M3 extraction was incomplete.
* `java+class:///` is a fully resolved and qualified class name
* `java+interface:///` is a fully resolved and qualified interface name
* `java+classOrInterface:///` is the fully qualified name of an external class or interface that has not been resolved (since it is not on the classpath but it is used).
* `java+classorinterface:///` is the fully qualified name of an external class or interface that has not been resolved (since it is not on the classpath but it is used).
* `java+module:///` the root scheme points to _any or all_ modules and when it has a qualified name it is a specific module (a la Java 9's module system).
* `java+compilationUnit:///` is the name of a file that contains an entire Java compilationUnit. The path name starts from the root of the source path for the current analysis run, or from the jar file that contains the .class bytecode currently under analysis. Typically a source compilation unit has one class member in the `containment` relation, but this is not required. There could be more private or protected classes in the same unit.
* `java+compilationunit:///` is the name of a file that contains an entire Java compilationUnit. The path name starts from the root of the source path for the current analysis run, or from the jar file that contains the .class bytecode currently under analysis. Typically a source compilation unit has one class member in the `containment` relation, but this is not required. There could be more private or protected classes in the same unit.
* `java+constructor:///` is the fully qualified constructor method of class (including parameter types to distinguish it from the other constructors)
* `java+method:///` is the fully qualified constructor method of class (including parameter types to distinguish it from the other constructors)
* `java+initializer:///` unique address of an initializer expression for a field or variable.
Expand All @@ -67,13 +67,13 @@ These are the kinds of logical names that can be found in a Java M3 model:
* `java+field:///` unique address for fields of classes and interfaces.
* `java+enum:///` is a fully resolved and qualified name of an enum class.
* `java+array:///` is the name of an array type
* `java+typeVariable:///` is the unique address of an open type variable (of a class or method)
* `java+wildcardType:///` is the address of an anonymous type variable.
* `java+enumConstant:///` is the unique address of one of the constants of an `enum` type.
* `java+typevariable:///` is the unique address of an open type variable (of a class or method)
* `java+wildcardtype:///` is the address of an anonymous type variable.
* `java+enumconstant:///` is the unique address of one of the constants of an `enum` type.
* `java+field:///` is the unique address of a field in a class, interface or enum.
* `java+arrayLength:///` is the singleton address for the length field of all arrays in Java.
* `java+primitiveType:///` is used when type resolution points to a builtin primitive in Java. These names also often occur
* `java+anonymousClass:///` uniquely labels anonymous classes, however since indexing is used the names are not stable between different versions of the same code, or between binary and source extractions.
* `java+arraylength:///` is the singleton address for the length field of all arrays in Java.
* `java+primitivetype:///` is used when type resolution points to a builtin primitive in Java. These names also often occur
* `java+anonymousclass:///` uniquely labels anonymous classes, however since indexing is used the names are not stable between different versions of the same code, or between binary and source extractions.
as elements of other schemes, for example to uniquel encode parameter types of methods.
}
@benefits{
Expand Down
4 changes: 2 additions & 2 deletions src/lang/java/m3/internal/BindingsResolver.java
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ private ISourceLocation resolveFieldAccess(FieldAccess node) {

if (tb != null && tb.isArray() && "length".equals(node.getName().getIdentifier())) {
ISourceLocation arrayType = resolveBinding(tb);
return makeBinding("java+arrayLength", arrayType.getAuthority(), arrayType.getPath());
return makeBinding("java+arraylength", arrayType.getAuthority(), arrayType.getPath());
}

return resolveBinding(node.resolveFieldBinding());
Expand Down Expand Up @@ -246,7 +246,7 @@ private ISourceLocation resolveQualifiedName(QualifiedName node) {

if (tb != null && tb.isArray() && "length".equals(node.getName().getIdentifier())) {
ISourceLocation arrayType = resolveBinding(tb);
return makeBinding("java+arrayLength", arrayType.getAuthority(), arrayType.getPath());
return makeBinding("java+arraylength", arrayType.getAuthority(), arrayType.getPath());
}

return resolveBinding(node.getName(), false);
Expand Down
2 changes: 1 addition & 1 deletion src/lang/java/m3/internal/SourceConverter.java
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ public boolean visit(QualifiedName node) {
insert(fieldAccess, getParent(), ownValue);
}

if (((ISourceLocation) ownValue).getScheme().equals("java+arrayLength")) {
if (((ISourceLocation) ownValue).getScheme().equals("java+arraylength")) {
insert(fieldAccess, getParent(), ownValue);
}

Expand Down
23 changes: 0 additions & 23 deletions src/lang/java/tests/RunTests.java

This file was deleted.

Loading