Skip to content

Commit

Permalink
Some renamings and wrapping up
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulKlint committed Mar 11, 2024
1 parent abfc738 commit 6549275
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 10 deletions.
2 changes: 2 additions & 0 deletions .settings/org.eclipse.core.resources.prefs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
eclipse.preferences.version=1
encoding//src/org/rascalmpl/core/library=UTF-8
encoding//target/generated-test-resources=UTF-8
encoding//target/generated-test-sources=UTF-8
encoding/<project>=UTF-8
encoding/src=UTF-8
encoding/test=UTF-8
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@
<dependency>
<groupId>org.rascalmpl</groupId>
<artifactId>typepal</artifactId>
<version>0.10.1-SNAPSHOT</version>
<version>0.10.0</version>
</dependency>
<dependency>
<groupId>io.usethesource</groupId>
Expand Down
2 changes: 1 addition & 1 deletion src/org/rascalmpl/core/library/CompileTestSources.rsc
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ void compileTestSources(PathConfig pcfg) {
println("PathConfig for compiling test sources:\n");
iprintln(testConfig);

testCompilerConfig = rascalCompilerConfig(testConfig);
testCompilerConfig = getRascalCoreCompilerConfig(testConfig);
total = 0;

println(readFile(|lib://rascal/META-INF/MANIFEST.MF|));
Expand Down
2 changes: 1 addition & 1 deletion src/org/rascalmpl/core/library/GenerateTestSources.rsc
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ void generateTestSources(PathConfig pcfg) {
libs = [ ]
);

testCompilerConfig = getRascalCompilerConfigForDev(testConfig);
testCompilerConfig = getRascalCoreCompilerConfig(testConfig);

map[str,int] durations = ();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,8 @@ public RascalCompilerConfig getRascalCoreCompilerConfig(){
return rascalCompilerConfig(getRascalCorePathConfig())[verbose = true][forceCompilationTopModule = true][logWrittenFiles = true];
}

public RascalCompilerConfig getRascalCompilerConfigForDev(PathConfig pcfg){
return rascalCompilerConfig(pcfg);
public RascalCompilerConfig getRascalCoreCompilerConfig(PathConfig pcfg){
return rascalCompilerConfig(pcfg)[verbose = true][forceCompilationTopModule = true][logWrittenFiles = true];
}

@synopsis{a path config for testing type-checking of the standard library in the rascal project}
Expand Down Expand Up @@ -425,7 +425,7 @@ tuple[TModel, ModuleStatus] rascalTModelComponent(set[str] moduleNames, ModuleSt
}
jobStart("RascalCompiler");
jobStep("RascalCompiler", "Checking <modelName>"); // TODO: monitor
if(compilerConfig.verbose) println("Checking <modelName>");
if(compilerConfig.verbose) println("Checking ... <modelName>");

c = newCollector(modelName, namedTrees, compilerConfig);
c.push(key_pathconfig, pcfg);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ list[Message] compile1(str qualifiedModuleName, lang::rascal::\syntax::Rascal::M
}

jobStep("RascalCompiler", "Compiling <qualifiedModuleName>");// TODO: monitor
if(compilerConfig.verbose) println("Compiling <qualifiedModuleName>");
if(compilerConfig.verbose) println("Compiling .. <qualifiedModuleName>");

<tm, muMod> = r2mu(M, tm, compilerConfig);

Expand Down Expand Up @@ -116,13 +116,15 @@ list[Message] compile(str qualifiedModuleName, RascalCompilerConfig compilerConf
jobStart("RascalCompiler");// TODO: monitor
start_comp = cpuTime();
ms = rascalTModelForNames([qualifiedModuleName], compilerConfig, compile1);

//iprintln(ms.tmodels[qualifiedModuleName]);

comp_time = (cpuTime() - start_comp)/1000000;
jobStep("RascalCompiler", "Compiled <qualifiedModuleName> in <comp_time> ms");// TODO: monitor
jobEnd("RascalCompiler");// TODO: monitor
if(compilerConfig.verbose) println("Compiled <qualifiedModuleName> in <comp_time> ms");
if(compilerConfig.verbose) println("Compiled ... <qualifiedModuleName> in <comp_time> ms");
return ms.messages[qualifiedModuleName] ? [];
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,20 @@
module lang::rascalcore::compile::Examples::Tst5

import util::Maybe;

//list[str] x = "x":
&T testFunction(Maybe[&T] _, &T x) = x;

value main() = testFunction(just(3), 5);

//value edits(value x: ![]) {return x;}
//
//value main(){
// return ![] :=
// [1];
//}


data F (int x = "a", bool b = 3) = f(list[str] x = "x");
//MH
//public rel[str s, int n] filterRelBroken(rel[str s, int n] inRel, set[str] relFilter) {
// return { t | t:< s, n > <- inRel, s in relFilter };
//}

0 comments on commit 6549275

Please sign in to comment.