Skip to content

Commit

Permalink
made the benchmark:// scheme superfluous and replaced it with a norma…
Browse files Browse the repository at this point in the history
…l source folder configured in RASCAL.MF. Also used findResources to get access to resources in the source folders to run the RSF benchmarks
  • Loading branch information
jurgenvinju committed Sep 12, 2023
1 parent 309e333 commit faa93cf
Showing 7 changed files with 9 additions and 20 deletions.
2 changes: 1 addition & 1 deletion META-INF/RASCAL.MF
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Project-Name: rascal
Source: src/org/rascalmpl/library
Source: src/org/rascalmpl/library,test/org/rascalmpl/benchmark
Courses: src/org/rascalmpl/courses


Original file line number Diff line number Diff line change
@@ -66,8 +66,7 @@ public void contributePaths(List<ISourceLocation> l) {
try {
l.add(vf.sourceLocation("std","",""));
l.add(vf.sourceLocation("testdata","",""));
l.add(vf.sourceLocation("test-modules","",""));
l.add(vf.sourceLocation("benchmarks","",""));
l.add(vf.sourceLocation("test-modules","",""));
}
catch (URISyntaxException e) {
assert false;
@@ -76,7 +75,7 @@ public void contributePaths(List<ISourceLocation> l) {

@Override
public String toString() {
return "[std://, testdata://, test-modules://, benchmarks://]";
return "[std://, testdata://, test-modules://]";
}

@Override
4 changes: 3 additions & 1 deletion src/org/rascalmpl/test/infrastructure/TestFramework.java
Original file line number Diff line number Diff line change
@@ -63,7 +63,9 @@ public class TestFramework {
evaluator.addRascalSearchPathContributor(StandardLibraryContributor.getInstance());

evaluator.addRascalSearchPath(URIUtil.rootLocation("test-modules"));
evaluator.addRascalSearchPath(URIUtil.rootLocation("benchmarks"));

RascalJUnitTestRunner.configureProjectEvaluator(evaluator, RascalJUnitTestRunner.inferProjectRoot(TestFramework.class));

try {
assert (false);
throw new RuntimeException("Make sure you enable the assert statement in your run configuration ( add -ea )");
9 changes: 0 additions & 9 deletions src/org/rascalmpl/uri/libraries/BenchmarkURIResolver.java

This file was deleted.

1 change: 0 additions & 1 deletion src/org/rascalmpl/uri/resolvers.config
Original file line number Diff line number Diff line change
@@ -15,6 +15,5 @@ org.rascalmpl.uri.file.CWDURIResolver
org.rascalmpl.uri.file.SystemPathURIResolver
org.rascalmpl.uri.libraries.TestDataURIResolver
org.rascalmpl.uri.libraries.MemoryResolver
org.rascalmpl.uri.libraries.BenchmarkURIResolver
org.rascalmpl.uri.libraries.RascalLibraryURIResolver
org.rascalmpl.shell.ManifestURIResolver
7 changes: 3 additions & 4 deletions test/org/rascalmpl/benchmark/RSF/RSFCalls.rsc
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@ module RSF::RSFCalls
import Relation;
import util::Math;
import Set;
import analysis::graphs::Graph;
import analysis::graphs::Graph;
import lang::rsf::IO;
import IO;
import util::Benchmark;
@@ -29,11 +29,10 @@ public bool measureOne(){
}

public bool measure(list[str] names){

loc p = |benchmarks:///RSF/|;
loc p = {loc x} := findResources("RSF") ? x : |not-found:///|;

for(str name <- names){
map[str, rel[str,str]] values = readRSF(p[path= p.path + name]);
map[str, rel[str,str]] values = readRSF(p + name);
rel[str,str] CALL = values["CALL"];
n = size(CALL);
println("<name>: CALL contains <n> tuples");
Original file line number Diff line number Diff line change
@@ -36,7 +36,6 @@ private static Evaluator freshEvaluator() {
var evaluator = new Evaluator(ValueFactoryFactory.getValueFactory(), System.in, System.err, System.out, root, heap);
evaluator.addRascalSearchPathContributor(StandardLibraryContributor.getInstance());
evaluator.addRascalSearchPath(URIUtil.rootLocation("test-modules"));
evaluator.addRascalSearchPath(URIUtil.rootLocation("benchmarks"));

evaluator.setTestResultListener(new ITestResultListener() {
@Override

0 comments on commit faa93cf

Please sign in to comment.