diff --git a/pom.xml b/pom.xml index 62348c7e093..fd70088efc0 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ org.rascalmpl rascal - 0.40.8-SNAPSHOT + 0.40.9-SNAPSHOT jar @@ -32,7 +32,7 @@ org.rascalmpl.shell.RascalShell 2 11 - 0.28.1 + 0.28.2 diff --git a/src/org/rascalmpl/library/lang/rascal/tests/basic/Functions.rsc b/src/org/rascalmpl/library/lang/rascal/tests/basic/Functions.rsc index 1816d93b6c3..fec17b3fa7d 100644 --- a/src/org/rascalmpl/library/lang/rascal/tests/basic/Functions.rsc +++ b/src/org/rascalmpl/library/lang/rascal/tests/basic/Functions.rsc @@ -568,6 +568,7 @@ test bool innerAndOuterFunctionUseSameParameterName2(){ return outer(3) == 3 && outer(5) == 50; } +@ignoreCompiler{"Return type `int` expected, found `str`"} test bool innerAndOuterFunctionUseSameParameterName3(){ int outer(str t) { int inner(t:3) = t; diff --git a/src/org/rascalmpl/library/lang/rascal/tests/concrete/Syntax1.rsc b/src/org/rascalmpl/library/lang/rascal/tests/concrete/Syntax1.rsc index 25e3cda0242..636eb06ebef 100644 --- a/src/org/rascalmpl/library/lang/rascal/tests/concrete/Syntax1.rsc +++ b/src/org/rascalmpl/library/lang/rascal/tests/concrete/Syntax1.rsc @@ -87,485 +87,4 @@ test bool cntES1() = cntES(((ES) `e`).args) == 1; test bool cntES2() = cntES(((ES) `e,e`).args) == 2; test bool cntES3() = cntES(((ES) `e ,e`).args) == 2; test bool cntES4() = cntES(((ES) `e, e`).args) == 2; -test bool cntES5() = cntES(((ES) `e , e`).args) == 2; - -/* - - @Test - public void parseDSInModule(){ - prepareModule("M", "module M " + - "import GrammarABCDE;" + - "import ParseTree;" + - "public DS ds = (DS)`d d d`;" + - "public DS parseDS(str input) { return parse(#DS, input); }"); - prepareMore("import ParseTree;"); - prepareMore("import M;"); - assertTrue(runTestInSameEvaluator("parseDS(\"d d d\") == ds;")); - } - - @Test @Ignore("not supported") - public void singleA(){ - prepare("import GrammarABCDE;"); - prepareMore("import ParseTree;"); - assertTrue(runTestInSameEvaluator("`a` := `a`;")); - } - - @Test @Ignore("not supported") - public void singleATyped(){ - prepare("import GrammarABCDE;"); - prepareMore("import ParseTree;"); - assertTrue(runTestInSameEvaluator("(A)`a` := `a`;")); - } - - @Test @Ignore("not supported") - public void singleAUnquoted1(){ - prepare("import GrammarABCDE;"); - prepareMore("import ParseTree;"); - assertTrue(runTestInSameEvaluator("a := `a`;")); - } - - @Test(expected=UndeclaredVariable.class) @Ignore("not supported") - public void singleAUnquoted2(){ - prepare("import GrammarABCDE;"); - prepareMore("import ParseTree;"); - assertTrue(runTestInSameEvaluator("a := a;")); - } - - @Test @Ignore("not supported") - public void AB(){ - prepare("import GrammarABCDE;"); - prepareMore("import ParseTree;"); - assertTrue(runTestInSameEvaluator("`a b` := `a b`;")); - } - - @Test @Ignore("not supported") - public void ABspaces1(){ - prepare("import GrammarABCDE;"); - prepareMore("import ParseTree;"); - assertTrue(runTestInSameEvaluator("`a b` := `a b`;")); - } - - @Test(expected=UnsupportedPattern.class) @Ignore("not supported") - public void varAQuoted(){ - prepare("import GrammarABCDE;"); - prepareMore("import ParseTree;"); - runTestInSameEvaluator("`` := `a`;"); - } - - @Test @Ignore("not supported") - public void varAassign(){ - prepare("import GrammarABCDE;"); - prepareMore("import ParseTree;"); - runTestInSameEvaluator("{someA := `a` && someA == `a`;}"); - } - - @Test @Ignore("not supported") - public void varAQuotedTyped(){ - prepare("import GrammarABCDE;"); - prepareMore("import ParseTree;"); - assertTrue(runTestInSameEvaluator("`` := `a`;")); - } - - @Test @Ignore("not supported") - public void varAQuotedDeclaredBefore(){ - prepare("import GrammarABCDE;"); - prepareMore("import ParseTree;"); - assertTrue(runTestInSameEvaluator("{A someA; (A)`` := `a`;}")); - } - - @Test @Ignore("not supported") - public void VarATypedInsertAmbiguous(){ - prepare("import GrammarABCDE;"); - prepareMore("import ParseTree;"); - assertTrue(runTestInSameEvaluator("{ `` := `a` && someA == `a`; }")); - } - - @Test @Ignore("not supported") - public void VarATypedInsert(){ - prepare("import GrammarABCDE;"); - prepareMore("import ParseTree;"); - assertTrue(runTestInSameEvaluator("{ `` := `a` && someA == `a`; }")); - } - - @Test @Ignore("not supported") - public void ABvars1(){ - prepare("import GrammarABCDE;"); - prepareMore("import ParseTree;"); - assertTrue(runTestInSameEvaluator("`a ` := `a b`;")); - } - - @Test @Ignore("not supported") - public void ABvars1Typed(){ - prepare("import GrammarABCDE;"); - prepareMore("import ParseTree;"); - assertTrue(runTestInSameEvaluator("`a ` := `a b`;")); - } - - @Test @Ignore("not supported") - public void ABvars2(){ - prepare("import GrammarABCDE;"); - prepareMore("import ParseTree;"); - assertTrue(runTestInSameEvaluator("` ` := `a b`;")); - } - - @Test @Ignore("not supported") - public void ABvars2Typed(){ - prepare("import GrammarABCDE;"); - prepareMore("import ParseTree;"); - assertTrue(runTestInSameEvaluator("` ` := `a b`;")); - } - - @Test @Ignore("not supported") - public void ABvars2TypedEq(){ - prepare("import GrammarABCDE;"); - prepareMore("import ParseTree;"); - assertTrue(runTestInSameEvaluator("{` ` := `a b` && someA ==`a` && someB == `b`;}")); - } - - @Test @Ignore("not supported") - public void ABvars2TypedInsertWithoutTypes(){ - prepare("import GrammarABCDE;"); - prepareMore("import ParseTree;"); - assertTrue(runTestInSameEvaluator("{ `` := `a b` && `` == `a b`;}")); - } - - @Test @Ignore("not supported") - public void ABvars2TypedInsertWithTypes(){ - prepare("import GrammarABCDE;"); - prepareMore("import ParseTree;"); - assertTrue(runTestInSameEvaluator("{ `` := `a b` && (C)`` == `a b`;}")); - } - - @Test @Ignore("not supported") - public void ABequal1(){ - prepare("import GrammarABCDE;"); - prepareMore("import ParseTree;"); - assertTrue(runTestInSameEvaluator("`a b` == `a b`;")); - } - - @Test @Ignore("not supported") - public void ABequal5(){ - prepare("import GrammarABCDE;"); - prepareMore("import ParseTree;"); - assertTrue(runTestInSameEvaluator("`a b` == `a b`;")); - } - - @Test @Ignore("not supported") - public void D1(){ - prepare("import GrammarABCDE;"); - prepareMore("import ParseTree;"); - assertTrue(runTestInSameEvaluator("`d` := `d`;")); - } - - @Test @Ignore("not supported") - public void D2(){ - prepare("import GrammarABCDE;"); - prepareMore("import ParseTree;"); - assertTrue(runTestInSameEvaluator("`d d` := `d d`;")); - } - - @Test @Ignore("not supported") - public void D3(){ - prepare("import GrammarABCDE;"); - assertTrue(runTestInSameEvaluator("(DS)`d d` := `d d`;")); - } - - @Test @Ignore("not supported") - public void D4(){ - prepare("import GrammarABCDE;"); - assertTrue(runTestInSameEvaluator("`d d` := (DS)`d d`;")); - } - - @Test(expected=UnsupportedPattern.class) @Ignore("not supported") - public void Dvars(){ - prepare("import GrammarABCDE;"); - prepareMore("import ParseTree;"); - assertTrue(runTestInSameEvaluator("`` := `d d`;")); - } - - @Test @Ignore("not supported") - public void DvarsTyped(){ - prepare("import GrammarABCDE;"); - assertTrue(runTestInSameEvaluator("{ D+ Xs := (D+) `d d` && Xs == (D+) `d d`; }")); - } - - @Test(expected=StaticError.class) @Ignore("not supported") - public void DvarsTypedInsert2Untyped(){ - prepare("import GrammarABCDE;"); - prepareMore("import ParseTree;"); - assertTrue(runTestInSameEvaluator("{ `` := `d`; }")); - } - - @Test @Ignore("not supported") - public void DvarsTypedInsert32(){ - prepare("import GrammarABCDE;"); - prepareMore("import ParseTree;"); - assertTrue(runTestInSameEvaluator("{ `` := (D+) `d d`; }")); - } - - @Test @Ignore("not supported") - public void DvarsTypedInsert4UnTyped(){ - prepare("import GrammarABCDE;"); - prepareMore("import ParseTree;"); - assertTrue(runTestInSameEvaluator("(`d ` := `d d`) && `d ` == `d d`;")); - } - - @Test @Ignore("not supported") - public void DvarsTypedInsert5Untyped(){ - prepare("import GrammarABCDE;"); - prepareMore("import ParseTree;"); - assertTrue(runTestInSameEvaluator("{ `d ` := `d d d` && `d ` == `d d d`; }")); - } - - @Test @Ignore("not supported") - public void E1(){ - prepare("import GrammarABCDE;"); - prepareMore("import ParseTree;"); - assertTrue(runTestInSameEvaluator("`e` := `e`;")); - } - - @Test @Ignore("not supported") - public void E2(){ - prepare("import GrammarABCDE;"); - prepareMore("import ParseTree;"); - assertTrue(runTestInSameEvaluator("`e, e` := `e, e`;")); - } - - @Test @Ignore("not supported") - public void E2spaces1(){ - prepare("import GrammarABCDE;"); - prepareMore("import ParseTree;"); - assertTrue(runTestInSameEvaluator("`e, e` := `e , e`;")); - } - - @Test @Ignore("not supported") - public void E2spaces2(){ - prepare("import GrammarABCDE;"); - prepareMore("import ParseTree;"); - assertTrue(runTestInSameEvaluator("`e, e` := `e , e`;")); - } - - @Test @Ignore("not supported") - public void Evars1(){ - prepare("import GrammarABCDE;"); - assertTrue(runTestInSameEvaluator("{ Xs := `e, e` && Xs == `e, e`;}")); - } - - @Test - @Ignore("Functionality subject to future/current change") - public void Evar1Typed(){ - prepare("import GrammarABCDE;"); - assertTrue(runTestInSameEvaluator("{ {E \",\"}+ Xs := ({E \",\"}+) `e, e` && Xs == ({E \",\"}+) `e, e`;}")); - } - - @Test @Ignore("not supported") // (expected=AmbiguousConcretePattern.class) - public void Evars2(){ - prepare("import GrammarABCDE;"); - assertTrue(runTestInSameEvaluator("{ `e, ` := `e, e` && Xs == `e`;}")); - } - - @Test - @Ignore("Functionality subject to future/current change") - public void NoStarSubjectToPlusVar(){ - prepare("import GrammarABCDE;"); - assertFalse(runTestInSameEvaluator("{E \",\"}+ Xs := ({E \",\"}*) ``;")); - } - - @Test - @Ignore("Functionality subject to future/current change") - public void plusListShouldNotMatchEmptyList() { - prepare("import GrammarABCDE;"); - prepareMore("import ParseTree;"); - assertFalse(runTestInSameEvaluator("({E \",\"}+) `e, <{E \",\"}+ Es>` := ({E \",\"}+) `e`;")); - } - - @Test - @Ignore("Functionality subject to future/current change") - public void starListPatternShouldMatchPlusListSubject() { - prepare("import GrammarABCDE;"); - prepareMore("import ParseTree;"); - assertTrue(runTestInSameEvaluator("{E \",\"}* Zs := ({E \",\"}+) `e, e`;")); - } - - @Test - @Ignore("Functionality subject to future/current change") - public void plusListPatternShouldMatchPStarListSubjectIfNotEmpty() { - prepare("import GrammarABCDE;"); - prepareMore("import ParseTree;"); - assertTrue(runTestInSameEvaluator("{E \",\"}+ Zs := ({E \",\"}*) `e, e`;")); - } - - @Test - @Ignore("Functionality subject to future/current change") - public void plusListPatternShouldNotMatchPStarListSubjectIfEmpty() { - prepare("import GrammarABCDE;"); - prepareMore("import ParseTree;"); - assertFalse(runTestInSameEvaluator("{E \",\"}+ Zs := ({E \",\"}*) ``;")); - } - - @Test @Ignore("not supported") - public void emptyListVariablePatternShouldBeSplicedInbetweenSeparators() { - prepare("import GrammarABCDE;"); - prepareMore("import ParseTree;"); - assertTrue(runTestInSameEvaluator("`e, <{E \",\"}* Xs>, e` := `e, e`;")); - } - - @Test - @Ignore("Functionality subject to future/current change") - public void emptyListVariablePatternShouldBeSplicedInbetweenSeparatorsAndBindToEmptyList() { - prepare("import GrammarABCDE;"); - prepareMore("import ParseTree;"); - assertTrue(runTestInSameEvaluator("`e, <{E \",\"}* Xs>, e` := `e, e` && Xs == ({E \",\"}*) ``;")); - } - - @Test - @Ignore("Functionality subject to future/current change") - public void emptySepListShouldSpliceCorrectly(){ - prepare("import GrammarABCDE;"); - prepareMore("import ParseTree;"); - assertTrue(runTestInSameEvaluator("{E \",\"}* Xs := ({E \",\"}*) `` && `e, <{E \",\"}* Xs>, e` == `e, e`;")); - } - - @Test - @Ignore("Functionality subject to future/current change") - public void Evars2Typed(){ - prepare("import GrammarABCDE;"); - prepareMore("import ParseTree;"); - assertTrue(runTestInSameEvaluator("{ `e, <{E \",\"}+ Xs>` := `e, e` && Xs == ({E \",\"}+) `e`;}")); - } - - @Test // (expected=AmbiguousConcretePattern.class) - @Ignore("not supported") - // @Ignore("needs to be reinstated when we have a type checker") - public void Evars3(){ - prepare("import GrammarABCDE;"); - prepareMore("import ParseTree;"); - assertTrue(runTestInSameEvaluator("{ `e, ` := `e, e` && Xs == `e` && `e, ` == `e, e`; }")); - } - - @Test - @Ignore("Functionality subject to future/current change") - public void Evars3Typed(){ - prepare("import GrammarABCDE;"); - prepareMore("import ParseTree;"); - assertTrue(runTestInSameEvaluator("{ `e, <{E \",\"}+ Xs>` := `e, e` && Xs == ({E \",\"}+) `e` && ({E \",\"}+) `e, <{E \",\"}+ Xs>` == `e, e`; }")); - } - - @Test // (expected=AmbiguousConcretePattern.class) - @Ignore("needs to be reinstated when we have a type checker") - public void Evars4(){ - prepare("import GrammarABCDE;"); - prepareMore("import ParseTree;"); - assertTrue(runTestInSameEvaluator("{ `e, ` := `e` && Xs == ` ` && ` e, ` == `e`; }")); - } - - @Test - @Ignore("Functionality subject to future/current change") - public void EvarsTyped(){ - prepare("import GrammarABCDE;"); - prepareMore("import ParseTree;"); - assertTrue(runTestInSameEvaluator("{E \",\"}+ Xs := `e, e`;")); - } - - @Test - @Ignore("Functionality subject to future/current change") - public void EvarsTypedInsert1(){ - prepare("import GrammarABCDE;"); - prepareMore("import ParseTree;"); - assertTrue(runTestInSameEvaluator("{ `<{E \",\"}+ Xs>` := `e, e` && `e, <{E \",\"}+ Xs>` == `e, e, e`; }")); - } - - @Test - @Ignore("Functionality subject to future/current change") - public void EvarsTypedInsert1Typed(){ - prepare("import GrammarABCDE;"); - prepareMore("import ParseTree;"); - assertTrue(runTestInSameEvaluator("{ `<{E \",\"}+ Xs>` := `e, e` && `e, <{E \",\"}+ Xs>` == `e, e, e`; }")); - } - - @Test - @Ignore("Functionality subject to future/current change") - public void EvarsTypedInsert2(){ - prepare("import GrammarABCDE;"); - prepareMore("import ParseTree;"); - assertTrue(runTestInSameEvaluator("{ `<{E \",\"}+ Xs>` := `e, e` && `e, <{E \",\"}+ Xs>` == `e, e, e`; }")); - } - - @Test @Ignore("not supported") - public void EvarsTypedInsert3(){ - prepare("import GrammarABCDE;"); - prepareMore("import ParseTree;"); - assertTrue(runTestInSameEvaluator("{ `e, <{E \",\"}+ Xs>` := `e, e, e` && `e, <{E \",\"}+ Xs>` == `e, e, e`; }")); - } - - @Test @Ignore("can not know that `d` should be a D+ list without a type checker") - public void enumeratorDs1Untyped(){ - prepare("import GrammarABCDE;"); - prepareMore("import ParseTree;"); - assertTrue(runTestInSameEvaluator("{L = [X | X <- `d` ]; L == [`d`];}")); - } - - @Test - @Ignore("Functionality subject to future/current change") - public void enumeratorDs1Typed(){ - prepare("import GrammarABCDE;"); - prepareMore("import ParseTree;"); - assertTrue(runTestInSameEvaluator("{L = [X | D X <- `d` ]; L == [ `d` ];}")); - } - - @Test - @Ignore("Functionality subject to future/current change") - public void enumeratorDsUnyped(){ - prepare("import GrammarABCDE;"); - prepareMore("import ParseTree;"); - assertTrue(runTestInSameEvaluator("{L = [X | X <- `d d d` ]; L == [`d`, `d`, `d`];}")); - } - - @Test - @Ignore("Functionality subject to future/current change") - public void enumeratorDsTyped(){ - prepare("import GrammarABCDE;"); - prepareMore("import ParseTree;"); - assertTrue(runTestInSameEvaluator("{L = [X | D X <- `d d d` ]; L == [`d`, `d`, `d`];}")); - } - - @Test @Ignore("Can not know that `e` should be an E* or E+ list without a type-checker") - public void enumeratorEs1Untyped(){ - prepare("import GrammarABCDE;"); - prepareMore("import ParseTree;"); - assertTrue(runTestInSameEvaluator("{L = [X | X <- `e` ]; L == [ `e` ];}")); - } - - @Test - @Ignore("Functionality subject to future/current change") - public void enumeratorEs1Typed(){ - prepare("import GrammarABCDE;"); - prepareMore("import ParseTree;"); - assertTrue(runTestInSameEvaluator("{L = [X | E X <- `e` ]; L == [ `e` ];}")); - } - - @Test - @Ignore("Functionality subject to future/current change") - public void enumeratorEsUntyped(){ - prepare("import GrammarABCDE;"); - prepareMore("import ParseTree;"); - assertTrue(runTestInSameEvaluator("{L = [X | X <- `e, e, e` ]; L == [`e`, `e`, `e`];}")); - } - - @Test - @Ignore("Functionality subject to future/current change") - public void enumeratorEsTyped(){ - prepare("import GrammarABCDE;"); - prepareMore("import ParseTree;"); - assertTrue(runTestInSameEvaluator("{L = [X | E X <- `e, e, e` ]; L == [`e`, `e`, `e`];}")); - } - - @Test - @Ignore("Functionality subject to future/current change") - public void EvarsTypedInsert3Empty(){ - prepare("import GrammarABCDE;"); - prepareMore("import ParseTree;"); - assertTrue(runTestInSameEvaluator("` e, <{E \",\"}* Xs> ` := ({E \",\"}+) `e`;")); - } - - */ +test bool cntES5() = cntES(((ES) `e , e`).args) == 2; \ No newline at end of file diff --git a/src/org/rascalmpl/library/lang/rascal/tests/concrete/Syntax3.rsc b/src/org/rascalmpl/library/lang/rascal/tests/concrete/Syntax3.rsc index 7a51d029e6c..0d267360dce 100644 --- a/src/org/rascalmpl/library/lang/rascal/tests/concrete/Syntax3.rsc +++ b/src/org/rascalmpl/library/lang/rascal/tests/concrete/Syntax3.rsc @@ -8,8 +8,8 @@ syntax Aas | aas: [a][a][a]* ; -Aas ambFilter(amb(set[Aas] alternatives)) { - set[Aas] result = {a | Aas a <- alternatives, !(a is nil)}; +&T <: Tree ambFilter(amb(set[&T <: Tree] alternatives)) { + set[&T <: Tree] result = {a | &T <: Tree a <- alternatives, !(a is nil)}; if ({oneTree} := result) { return oneTree; diff --git a/src/org/rascalmpl/library/lang/rascal/tests/extends3/Modules2DefinitionTest.rsc b/src/org/rascalmpl/library/lang/rascal/tests/extends3/Modules2DefinitionTest.rsc index cfe1d542460..2987d2941cf 100644 --- a/src/org/rascalmpl/library/lang/rascal/tests/extends3/Modules2DefinitionTest.rsc +++ b/src/org/rascalmpl/library/lang/rascal/tests/extends3/Modules2DefinitionTest.rsc @@ -1,5 +1,6 @@ module lang::rascal::tests::extends3::Modules2DefinitionTest +import lang::rascal::\syntax::Rascal; import lang::rascal::grammar::definition::Parameters; import lang::rascal::grammar::definition::Modules; import lang::rascal::grammar::definition::Names; @@ -14,7 +15,7 @@ test bool layoutPropagationOverImportAndExtendTest() { trees = {parseModuleWithSpaces(m).top | m <- testModules, bprintln(m)}; - for (m <- trees) { + for (Module m <- trees) { str main = ""; def = modules2definition(main, trees); diff --git a/src/org/rascalmpl/library/lang/rascal/vis/ImportGraph.rsc b/src/org/rascalmpl/library/lang/rascal/vis/ImportGraph.rsc index b05d70f66ee..a5271a6f0e8 100644 --- a/src/org/rascalmpl/library/lang/rascal/vis/ImportGraph.rsc +++ b/src/org/rascalmpl/library/lang/rascal/vis/ImportGraph.rsc @@ -59,7 +59,7 @@ void importGraph(PathConfig pcfg, bool hideExternals=true) { default loc modLinker(value _) = |nothing:///|; - showInteractiveContent(graph(g, \layout=defaultDagreLayout(), nodeLinker=modLinker), title="Rascal Import/Extend Graph", edgeStyle=defaultEdgeStyle()[\curve-style=taxi()]); + showInteractiveContent(graph(g, \layout=defaultDagreLayout(), nodeLinker=modLinker), title="Rascal Import/Extend Graph"); } @synopsis{Container for everything we need to know about the modules in a project to visualize it.} diff --git a/src/org/rascalmpl/library/util/Reflective.rsc b/src/org/rascalmpl/library/util/Reflective.rsc index 2a9a3f7d5ab..8ae7a24ee12 100644 --- a/src/org/rascalmpl/library/util/Reflective.rsc +++ b/src/org/rascalmpl/library/util/Reflective.rsc @@ -135,6 +135,7 @@ loc getModuleLocation(str qualifiedModuleName, PathConfig pcfg){ fileName = makeFileName(qualifiedModuleName, extension="tpl"); for(loc dir <- pcfg.libs){ fileLoc = dir + fileName; + if(exists(fileLoc)){ return fileLoc; } @@ -170,15 +171,11 @@ int commonPrefix(list[str] rdir, list[str] rm){ str getModuleName(loc moduleLoc, PathConfig pcfg){ modulePath = moduleLoc.path; - if(!endsWith(modulePath, "rsc")){ - throw "Not a Rascal source file: "; + if(!(endsWith(modulePath, "rsc") || endsWith(modulePath, "tpl"))){ + throw "Not a Rascal .src or .tpl file: "; } - = splitFileExtension(modulePath); - if(modulePathNoExt[0] == "/"){ - modulePathNoExt = modulePathNoExt[1..]; - } - modulePathAsList = split("/", modulePathNoExt); - modulePathAsListReversed = reverse(modulePathAsList); + + // Find matching .rsc file in source directories for(loc dir <- pcfg.srcs){ if(moduleLoc.authority == dir.authority && startsWith(modulePath, dir.path)) { @@ -191,25 +188,46 @@ str getModuleName(loc moduleLoc, PathConfig pcfg){ return moduleName; } } - + + // Find longest matching .tpl file in library directories + + = splitFileExtension(modulePath); + while(modulePathNoExt[0] == "/"){ + modulePathNoExt = modulePathNoExt[1..]; + } + modulePathAsList = split("/", modulePathNoExt); + modulePathReversed = reverse(modulePathAsList); + int longestSuffix = 0; for(loc dir <- pcfg.libs){ dir = dir + "rascal"; + dpath = dir.path; + + while(dpath[0] == "/"){ + dpath = dpath[1..]; + } + for(loc file <- find(dir, "tpl")){ - candidate = replaceFirst(file.path, dir.path, ""); - candidate = replaceLast(candidate, "$", ""); - if(candidate[0] == "/"){ + candidate = replaceFirst(file.path, dpath, ""); + = splitFileExtension(candidate); + while(candidate[0] == "/"){ candidate = candidate[1..]; } - = splitFileExtension(candidate); + candidateAsList = split("/", candidate); - n = commonPrefix(reverse(candidateAsList), modulePathAsListReversed); - //println(", =\> "); + lastName = candidateAsList[-1]; + if(lastName[0] == "$"){ + candidateAsList = [*candidateAsList[..-1],lastName[1..]]; + } + //println("cand: , modpath: "); + n = commonPrefix(reverse(candidateAsList), modulePathReversed); + if(n > longestSuffix){ longestSuffix = n; } } } + if(longestSuffix > 0){ return intercalate("::", modulePathAsList[size(modulePathAsList) - longestSuffix .. ]); } diff --git a/test/org/rascalmpl/benchmark/CompareShortestPath.rsc b/test/org/rascalmpl/benchmark/CompareShortestPath.rsc index 574cdc02cf7..0d481940b19 100644 --- a/test/org/rascalmpl/benchmark/CompareShortestPath.rsc +++ b/test/org/rascalmpl/benchmark/CompareShortestPath.rsc @@ -23,7 +23,7 @@ private map[int, int] distance =(); private map[int, int] pred = (); private set[int] settled = {}; //private set[int] Q = {}; -private PriorityQueue Q = priorityQueue(); +private PriorityQueue Q = priorityQueue([], -1); private int MAXDISTANCE = 10000; @doc{Shortest path between pair of nodes} @@ -37,7 +37,7 @@ public list[int] shortestPathPair1(rel[int,int] G, int From, int To) pred = (); settled = {}; // Q = {From}; - Q = priorityQueue(0, From); + Q = priorityQueue([], From); // while (Q != {}){ while(!isEmpty(Q)){ @@ -75,7 +75,6 @@ private int extractMinimum() min = q; } } - Q = Q - min; return min; } @@ -105,35 +104,35 @@ public rel[int,int] Graph1 = {<5,8>,<1,2>,<3,4>,<3,3>,<2,3>,<2,2>,<6,7>,<6,6>,<7 public rel[int,int] randomGraph(int N, list[int] interval) { - return { | int n <- [1 .. N]}; + return { | int _ <- [1 .. N]}; } public void measure1(rel[int,int] Graph1){ G = Graph1; /* warm up for JVM */ - for(int i <- [1 .. 50]) + for(int _ <- [1 .. 50]) shortestPathPair(G, 1, 0); jtime = 0.0; jmin = 10000.0; jmax = 0.0; rtime = 0.0; rmin = 10000.0; rmax = 0.0; - for(int i <- [1 .. 20]){ - time1 = currentTimeMillis(); P1 = shortestPathPair(G, 1, 0); time2 = currentTimeMillis(); - P2 = shortestPathPair1(G, 1, 0); time3 = currentTimeMillis(); + for(int _ <- [1 .. 20]){ + time1 = getMilliTime(); P1 = shortestPathPair(G, 1, 0); time2 = getMilliTime(); + P2 = shortestPathPair1(G, 1, 0); time3 = getMilliTime(); d1 = time2 - time1; jtime = jtime + d1; jmin = min(d1, jmin); jmax = max(d1, jmax); d2 = time3 - time2; rtime = rtime + d2; rmin = min(d2, rmin); rmax = max(d2, rmax); println("Java version: in millis"); println("Rascal version: in millis"); } - println("Java average: ", jtime/20, " [ .. ]"); - println("Rascal average: ", rtime/20, " [ .. ]"); + println("Java average: [ .. ]"); + println("Rascal average: [ .. ]"); } public void measure2(rel[int,int] Graph2) { - for(int i <- [1 .. 2000]) + for(int _ <- [1 .. 2000]) shortestPathPair1(Graph2, 1, 0); } diff --git a/test/org/rascalmpl/benchmark/Matching/Sets.rsc b/test/org/rascalmpl/benchmark/Matching/Sets.rsc index acd293b0ace..ee63f8c1c31 100644 --- a/test/org/rascalmpl/benchmark/Matching/Sets.rsc +++ b/test/org/rascalmpl/benchmark/Matching/Sets.rsc @@ -1,8 +1,8 @@ module Matching::Sets import IO; -import Math; -import Benchmark; +import util::Math; +import util::Benchmark; import Grammar;import ParseTree;import IO; diff --git a/test/org/rascalmpl/benchmark/Visiting/visiting.rsc b/test/org/rascalmpl/benchmark/Visiting/visiting.rsc index 7edc99b9e8c..e08bff0470a 100644 --- a/test/org/rascalmpl/benchmark/Visiting/visiting.rsc +++ b/test/org/rascalmpl/benchmark/Visiting/visiting.rsc @@ -1,8 +1,8 @@ module Visiting::visiting import IO; -import Math; -import Benchmark; +import util::Math; +import util::Benchmark; data ColoredTree = leaf(int n) @@ -20,7 +20,7 @@ public ColoredTree genTree(int leafChance, int minDepth,int maxDepth){ switch(arbInt(3)){ case 0: return red(left,right); case 1: return black(left,right); - case 2: return green(left,right); + default: return green(left,right); } } diff --git a/test/org/rascalmpl/test/data/DS.trm b/test/org/rascalmpl/test/data/DS.trm deleted file mode 100644 index ec657ae2be3..00000000000 --- a/test/org/rascalmpl/test/data/DS.trm +++ /dev/null @@ -1 +0,0 @@ -d d d \ No newline at end of file diff --git a/test/org/rascalmpl/test/data/ExpressionGrammars.rsc b/test/org/rascalmpl/test/data/ExpressionGrammars.rsc index d3a98705276..813b59cb472 100644 --- a/test/org/rascalmpl/test/data/ExpressionGrammars.rsc +++ b/test/org/rascalmpl/test/data/ExpressionGrammars.rsc @@ -1,5 +1,7 @@ module ExpressionGrammars +import ParseTree; + lexical Id = [a-z] !<< [a-z]+ !>> [a-z]; lexical Num = [0-9]+; layout W = [\ \t\n\r]*; diff --git a/test/org/rascalmpl/test/data/GrammarABCDE.rsc b/test/org/rascalmpl/test/data/GrammarABCDE.rsc deleted file mode 100644 index 8d33ed76e99..00000000000 --- a/test/org/rascalmpl/test/data/GrammarABCDE.rsc +++ /dev/null @@ -1,20 +0,0 @@ -@license{ - Copyright (c) 2009-2011 CWI - All rights reserved. This program and the accompanying materials - are made available under the terms of the Eclipse Public License v1.0 - which accompanies this distribution, and is available at - http://www.eclipse.org/legal/epl-v10.html -} -@contributor{Jurgen J. Vinju - Jurgen.Vinju@cwi.nl - CWI} -@contributor{Arnold Lankamp - Arnold.Lankamp@cwi.nl} -module GrammarABCDE - -layout Whitespace = [\ \t\n]*; - -start syntax A = "a"; -start syntax B = "b"; -start syntax C = A B; -start syntax D = "d"; -start syntax DS = D+; -start syntax E = "e"; -start syntax ES = {E ","}+; diff --git a/test/org/rascalmpl/test/data/RecoveryTests.rsc b/test/org/rascalmpl/test/data/RecoveryTests.rsc deleted file mode 100644 index 4bd9b04501b..00000000000 --- a/test/org/rascalmpl/test/data/RecoveryTests.rsc +++ /dev/null @@ -1,124 +0,0 @@ -@license{ - Copyright (c) 2009-2011 CWI - All rights reserved. This program and the accompanying materials - are made available under the terms of the Eclipse Public License v1.0 - which accompanies this distribution, and is available at - http://www.eclipse.org/legal/epl-v10.html -} -@contributor{Jurgen J. Vinju - Jurgen.Vinju@cwi.nl - CWI} -@contributor{Tijs van der Storm - Tijs.van.der.Storm@cwi.nl} -@contributor{Paul Klint - Paul.Klint@cwi.nl - CWI} -module RecoveryTests - -@should{return 0} -public int recoveryOfLocalVariable() -{ - x = 0; - l = [1, 2, 3]; - visit (l) { - case int n: { - x = x + 1; - fail; - } - }; - return x; -} - -@should{return 3} -public int nestedRecoveryOfLocalVariable() -{ - x = 0; - l = [1, 2, 3]; - visit (l) { - case int n: { - x = x + 1; - visit (l) { - case int m: { - x = x + 1; - fail; - } - }; - } - }; - return x; -} - -@should{return 12} // but why? -public int noNestedRecovery() -{ - int x = 0; - l = [1, 2, 3]; - visit (l) { - case int n: { - x = x + 1; - visit (l) { - case int i: { - x = x + 1; - } - }; - } - }; - return x; -} - -@should{return 0} -public int recoveryOfLocalVariableUsingIfThen() -{ - x = 0; - l = [1, 2, 3]; - visit (l) { - case int n: { - x = x + 1; - if (n > 10) { - x = x + 1; // another update - } else - fail; - } - }; - return x; -} - -public int gx = 0; - -@should{return 0} -public int recoveryOfGlobalVariable() -{ - //global int gx; - l = [1, 2, 3]; - visit (l) { - case int n: { - gx = gx + 1; - fail; - } - }; - return gx; -} - -public int gt = 0; - -data City = amsterdam(); - -a1 amsterdam() { - gt = gt + 1; - fail; -} - -public int recoveryOfGlobalAfterFailingRule() { - x = amsterdam(); - return gt; -} - -public bool meddle() { - gt = 123; - return true; -} - -public int recoveryOfGlobalDuringComprehension() { - aset = {1, 2, 3}; - another = { x | int x <- aset, meddle() }; - return gt; -} - - - - diff --git a/test/org/rascalmpl/test/data/StrategyTests.rsc b/test/org/rascalmpl/test/data/StrategyTests.rsc deleted file mode 100644 index 51ab36b53bd..00000000000 --- a/test/org/rascalmpl/test/data/StrategyTests.rsc +++ /dev/null @@ -1,82 +0,0 @@ -@license{ - Copyright (c) 2009-2011 CWI - All rights reserved. This program and the accompanying materials - are made available under the terms of the Eclipse Public License v1.0 - which accompanies this distribution, and is available at - http://www.eclipse.org/legal/epl-v10.html -} -@contributor{Jurgen J. Vinju - Jurgen.Vinju@cwi.nl - CWI} -@contributor{Arnold Lankamp - Arnold.Lankamp@cwi.nl} -module StrategyTests - -import IO; -import Strategy; -import TopologicalStrategy; - -data A = f(B I, B J) - | a() - | d() - | e() - | aa() - | dd() - | ee() - | h(A a); - - -data B = g(B I) - | b() - | c(); - -public &T(&T) rules = &T(&T t) { - switch (t) { - case g(b()): return b(); - default: return t; - }; - }; - -public &T(&T) rules2 = &T(&T t) { - switch (t) { - case c(): return b(); - case g(c()): return c(); - default: return t; - }; - }; - -public &T(&T) rules3 = &T(&T t) { - switch (t) { - case b(): return c(); - default: return t; - }; - }; - - - -public B rules4(B t) { - switch (t) { - case b(): return c(); - default: return t; - }; -} - - -public &T rules5(&T t) { - switch (t) { - case a(): return aa(); - case d(): return dd(); - case e(): return ee(); - default: return t; - }; -} - - -public &T rules6(&T t) { - switch (t) { - case a(): return aa(); - case d(): return dd(); - case e(): return ee(); - case aa(): return h(aa()); - case dd(): return h(dd()); - case ee(): return h(ee()); - default: return t; - }; -} diff --git a/test/org/rascalmpl/test/data/Test4.rsc b/test/org/rascalmpl/test/data/Test4.rsc deleted file mode 100644 index 3b0d9f2e47a..00000000000 --- a/test/org/rascalmpl/test/data/Test4.rsc +++ /dev/null @@ -1,17 +0,0 @@ -@license{ - Copyright (c) 2009-2011 CWI - All rights reserved. This program and the accompanying materials - are made available under the terms of the Eclipse Public License v1.0 - which accompanies this distribution, and is available at - http://www.eclipse.org/legal/epl-v10.html -} -@contributor{Jurgen J. Vinju - Jurgen.Vinju@cwi.nl - CWI} -@contributor{Paul Klint - Paul.Klint@cwi.nl - CWI} -module Test4 - -import GrammarABCDE; -import ParseTree; - -public bool tst(){ - return (A) `a` := (A) `a`; -} diff --git a/test/org/rascalmpl/test/data/patterns/micro/AugmentedType.java_src b/test/org/rascalmpl/test/data/patterns/micro/AugmentedType.java_src deleted file mode 100644 index 6baae8f4b3c..00000000000 --- a/test/org/rascalmpl/test/data/patterns/micro/AugmentedType.java_src +++ /dev/null @@ -1,12 +0,0 @@ -package org.rascalmpl.test.data.patterns.micro; - -public abstract class AugmentedType { - public static final int A = 1; - public static final int B = 2; - public static final int C = 3; - - public abstract int bla(); - public void doIt() { - - } -} diff --git a/test/org/rascalmpl/test/data/patterns/micro/Canopy.java_src b/test/org/rascalmpl/test/data/patterns/micro/Canopy.java_src deleted file mode 100644 index da136416444..00000000000 --- a/test/org/rascalmpl/test/data/patterns/micro/Canopy.java_src +++ /dev/null @@ -1,15 +0,0 @@ -package org.rascalmpl.test.data.patterns.micro; - -public class Canopy { - - private int i; - - public Canopy(int i) { - this.i = i; - } - - public int getI() { - return i; - } - -} diff --git a/test/org/rascalmpl/test/data/patterns/micro/CobolLike.java_src b/test/org/rascalmpl/test/data/patterns/micro/CobolLike.java_src deleted file mode 100644 index 666860ef3ab..00000000000 --- a/test/org/rascalmpl/test/data/patterns/micro/CobolLike.java_src +++ /dev/null @@ -1,11 +0,0 @@ -package org.rascalmpl.test.data.patterns.micro; - -public class CobolLike { - - private static String HEADER = "Micro Patterns"; - - public static void main(String[] args) { - System.out.println("Header: " + HEADER); - } - -} diff --git a/test/org/rascalmpl/test/data/patterns/micro/CommonState.java_src b/test/org/rascalmpl/test/data/patterns/micro/CommonState.java_src deleted file mode 100644 index a6d307f66d6..00000000000 --- a/test/org/rascalmpl/test/data/patterns/micro/CommonState.java_src +++ /dev/null @@ -1,11 +0,0 @@ -package org.rascalmpl.test.data.patterns.micro; - -public class CommonState { - - private static int counter = 0; - - public int count() { - return counter++; - } - -} diff --git a/test/org/rascalmpl/test/data/patterns/micro/CompoundBox.java_src b/test/org/rascalmpl/test/data/patterns/micro/CompoundBox.java_src deleted file mode 100644 index 94d430f82f4..00000000000 --- a/test/org/rascalmpl/test/data/patterns/micro/CompoundBox.java_src +++ /dev/null @@ -1,22 +0,0 @@ -package org.rascalmpl.test.data.patterns.micro; - -public class CompoundBox { - - private Canopy c; - private int i; - - public CompoundBox(Canopy c, int i) { - this.c = c; - this.i = i; - } - - public Canopy toCanopy() { - return c; - } - - public int next() { - i = i+ 1; - return i; - } - -} diff --git a/test/org/rascalmpl/test/data/patterns/micro/Designator.java_src b/test/org/rascalmpl/test/data/patterns/micro/Designator.java_src deleted file mode 100644 index 8681e5d53e2..00000000000 --- a/test/org/rascalmpl/test/data/patterns/micro/Designator.java_src +++ /dev/null @@ -1,5 +0,0 @@ -package org.rascalmpl.test.data.patterns.micro; - -public interface Designator extends Cloneable { - -} diff --git a/test/org/rascalmpl/test/data/patterns/micro/Designator2.java_src b/test/org/rascalmpl/test/data/patterns/micro/Designator2.java_src deleted file mode 100644 index 50b3fbcfb4d..00000000000 --- a/test/org/rascalmpl/test/data/patterns/micro/Designator2.java_src +++ /dev/null @@ -1,5 +0,0 @@ -package org.rascalmpl.test.data.patterns.micro; - -public interface Designator2 { - -} diff --git a/test/org/rascalmpl/test/data/patterns/micro/Extender.java_src b/test/org/rascalmpl/test/data/patterns/micro/Extender.java_src deleted file mode 100644 index 1767bcdb081..00000000000 --- a/test/org/rascalmpl/test/data/patterns/micro/Extender.java_src +++ /dev/null @@ -1,11 +0,0 @@ -package org.rascalmpl.test.data.patterns.micro; - -import java.io.Flushable; -import java.io.IOException; - -public class Extender extends Overrider implements Flushable { - - void doStuff() throws IOException { - super.write(0xff); - } -} diff --git a/test/org/rascalmpl/test/data/patterns/micro/FunctionObjectAndBox.java_src b/test/org/rascalmpl/test/data/patterns/micro/FunctionObjectAndBox.java_src deleted file mode 100644 index 67f20b10c9c..00000000000 --- a/test/org/rascalmpl/test/data/patterns/micro/FunctionObjectAndBox.java_src +++ /dev/null @@ -1,15 +0,0 @@ -package org.rascalmpl.test.data.patterns.micro; - -public class FunctionObjectAndBox { - private int f; - - public FunctionObjectAndBox(int f) { - this.f = f; - } - - public int doStuff() { - f += 2; - return f * 2; - } - -} diff --git a/test/org/rascalmpl/test/data/patterns/micro/FunctionPointer.java_src b/test/org/rascalmpl/test/data/patterns/micro/FunctionPointer.java_src deleted file mode 100644 index f9dd1358e14..00000000000 --- a/test/org/rascalmpl/test/data/patterns/micro/FunctionPointer.java_src +++ /dev/null @@ -1,8 +0,0 @@ -package org.rascalmpl.test.data.patterns.micro; - -public class FunctionPointer { - public void doStuff() { - int a = 1 + 2; - } - -} diff --git a/test/org/rascalmpl/test/data/patterns/micro/ImmutableAndDataManagerAndSink.java_src b/test/org/rascalmpl/test/data/patterns/micro/ImmutableAndDataManagerAndSink.java_src deleted file mode 100644 index afa003c6e03..00000000000 --- a/test/org/rascalmpl/test/data/patterns/micro/ImmutableAndDataManagerAndSink.java_src +++ /dev/null @@ -1,20 +0,0 @@ -package org.rascalmpl.test.data.patterns.micro; - -public class ImmutableAndDataManagerAndSink { - private double f; - private int i; - - public ImmutableAndDataManagerAndSink(int i, double f) { - this.i = i; - this.f = f; - } - - public double getF() { - return f; - } - - public int getI() { - return i; - } - -} diff --git a/test/org/rascalmpl/test/data/patterns/micro/Implementor.java_src b/test/org/rascalmpl/test/data/patterns/micro/Implementor.java_src deleted file mode 100644 index c6d58af2feb..00000000000 --- a/test/org/rascalmpl/test/data/patterns/micro/Implementor.java_src +++ /dev/null @@ -1,15 +0,0 @@ -package org.rascalmpl.test.data.patterns.micro; - -public class Implementor extends PureType { - - @Override - public void a() { - - } - - @Override - public void b() { - - } - -} diff --git a/test/org/rascalmpl/test/data/patterns/micro/InterfaceWithMethods.java_src b/test/org/rascalmpl/test/data/patterns/micro/InterfaceWithMethods.java_src deleted file mode 100644 index acf5fff316d..00000000000 --- a/test/org/rascalmpl/test/data/patterns/micro/InterfaceWithMethods.java_src +++ /dev/null @@ -1,6 +0,0 @@ -package org.rascalmpl.test.data.patterns.micro; - -public interface InterfaceWithMethods { - void clear(); - -} diff --git a/test/org/rascalmpl/test/data/patterns/micro/Joiner.java_src b/test/org/rascalmpl/test/data/patterns/micro/Joiner.java_src deleted file mode 100644 index 69ed3ec1a84..00000000000 --- a/test/org/rascalmpl/test/data/patterns/micro/Joiner.java_src +++ /dev/null @@ -1,5 +0,0 @@ -package org.rascalmpl.test.data.patterns.micro; - -public interface Joiner extends Taxonomy, Designator { - -} diff --git a/test/org/rascalmpl/test/data/patterns/micro/Joiner2.java_src b/test/org/rascalmpl/test/data/patterns/micro/Joiner2.java_src deleted file mode 100644 index 0bc3d2d637d..00000000000 --- a/test/org/rascalmpl/test/data/patterns/micro/Joiner2.java_src +++ /dev/null @@ -1,8 +0,0 @@ -package org.rascalmpl.test.data.patterns.micro; - -public class Joiner2 implements Designator, Designator2 { - - public Joiner2() { - } - -} diff --git a/test/org/rascalmpl/test/data/patterns/micro/OutlineAndTrait.java_src b/test/org/rascalmpl/test/data/patterns/micro/OutlineAndTrait.java_src deleted file mode 100644 index ce60a720afa..00000000000 --- a/test/org/rascalmpl/test/data/patterns/micro/OutlineAndTrait.java_src +++ /dev/null @@ -1,12 +0,0 @@ -package org.rascalmpl.test.data.patterns.micro; - -public abstract class OutlineAndTrait { - abstract int doStuff(); - public void method1() { - doStuff(); - } - public void method2() { - doStuff(); - } - -} diff --git a/test/org/rascalmpl/test/data/patterns/micro/Overrider.java_src b/test/org/rascalmpl/test/data/patterns/micro/Overrider.java_src deleted file mode 100644 index 7f6f4b21735..00000000000 --- a/test/org/rascalmpl/test/data/patterns/micro/Overrider.java_src +++ /dev/null @@ -1,38 +0,0 @@ -package org.rascalmpl.test.data.patterns.micro; - -import java.io.BufferedOutputStream; -import java.io.IOException; - - -public class Overrider extends BufferedOutputStream { - public Overrider() { - super(null); - } - @Override - public void close() throws IOException { - // TODO Auto-generated method stub - super.close(); - } - @Override - public void write(byte[] b) throws IOException { - // TODO Auto-generated method stub - super.write(b); - } - @Override - public synchronized void write(byte[] b, int off, int len) - throws IOException { - // TODO Auto-generated method stub - super.write(b, off, len); - } - @Override - public synchronized void write(int b) throws IOException { - // TODO Auto-generated method stub - super.write(b); - } - @Override - public synchronized void flush() throws IOException { - // TODO Auto-generated method stub - super.flush(); - } - -} diff --git a/test/org/rascalmpl/test/data/patterns/micro/PoolAndRestrictedCreation.java_src b/test/org/rascalmpl/test/data/patterns/micro/PoolAndRestrictedCreation.java_src deleted file mode 100644 index 6f67c9d4c62..00000000000 --- a/test/org/rascalmpl/test/data/patterns/micro/PoolAndRestrictedCreation.java_src +++ /dev/null @@ -1,6 +0,0 @@ -package org.rascalmpl.test.data.patterns.micro; - -public class PoolAndRestrictedCreation { - public static final PoolAndRestrictedCreation field1 = new PoolAndRestrictedCreation(); - public static final int field2 = 2; -} diff --git a/test/org/rascalmpl/test/data/patterns/micro/PseudoClass.java_src b/test/org/rascalmpl/test/data/patterns/micro/PseudoClass.java_src deleted file mode 100644 index 67819e84f4a..00000000000 --- a/test/org/rascalmpl/test/data/patterns/micro/PseudoClass.java_src +++ /dev/null @@ -1,10 +0,0 @@ -package org.rascalmpl.test.data.patterns.micro; - -public abstract class PseudoClass { - abstract void a(); - abstract void b(); - public static final int C = 1; - public static void d() { - System.out.println(C * 2); - } -} diff --git a/test/org/rascalmpl/test/data/patterns/micro/PureType.java_src b/test/org/rascalmpl/test/data/patterns/micro/PureType.java_src deleted file mode 100644 index dfcc066fab2..00000000000 --- a/test/org/rascalmpl/test/data/patterns/micro/PureType.java_src +++ /dev/null @@ -1,8 +0,0 @@ -package org.rascalmpl.test.data.patterns.micro; - -public abstract class PureType { - - abstract void a(); - abstract void b(); - -} diff --git a/test/org/rascalmpl/test/data/patterns/micro/Record.java_src b/test/org/rascalmpl/test/data/patterns/micro/Record.java_src deleted file mode 100644 index 0e9bb314e8a..00000000000 --- a/test/org/rascalmpl/test/data/patterns/micro/Record.java_src +++ /dev/null @@ -1,7 +0,0 @@ -package org.rascalmpl.test.data.patterns.micro; - -public class Record { - public int i; - public String s; - public Canopy c; -} diff --git a/test/org/rascalmpl/test/data/patterns/micro/Sampler.java_src b/test/org/rascalmpl/test/data/patterns/micro/Sampler.java_src deleted file mode 100644 index 24a9b5d17a7..00000000000 --- a/test/org/rascalmpl/test/data/patterns/micro/Sampler.java_src +++ /dev/null @@ -1,9 +0,0 @@ -package org.rascalmpl.test.data.patterns.micro; - -public class Sampler { - public static Sampler field1 = new Sampler(); - - public Sampler() { - } - -} diff --git a/test/org/rascalmpl/test/data/patterns/micro/StateMachine.java_src b/test/org/rascalmpl/test/data/patterns/micro/StateMachine.java_src deleted file mode 100644 index 0d80028006f..00000000000 --- a/test/org/rascalmpl/test/data/patterns/micro/StateMachine.java_src +++ /dev/null @@ -1,7 +0,0 @@ -package org.rascalmpl.test.data.patterns.micro; - -public interface StateMachine { - boolean hasSteps(); - void doStep(); - -} diff --git a/test/org/rascalmpl/test/data/patterns/micro/StatelessAndSampler.java_src b/test/org/rascalmpl/test/data/patterns/micro/StatelessAndSampler.java_src deleted file mode 100644 index 8432a50021a..00000000000 --- a/test/org/rascalmpl/test/data/patterns/micro/StatelessAndSampler.java_src +++ /dev/null @@ -1,24 +0,0 @@ -package org.rascalmpl.test.data.patterns.micro; - -public class StatelessAndSampler { - - public static final StatelessAndSampler Instance = new StatelessAndSampler(); - - public StatelessAndSampler() { - } - - private static final int f = 0; - private static final String s = "s"; - - public int foo() { - return f * 2; - } - - public String bar() { - return s + s; - } - - public static String foobar() { - return s + f; - } -} diff --git a/test/org/rascalmpl/test/data/patterns/micro/Taxonomy.java_src b/test/org/rascalmpl/test/data/patterns/micro/Taxonomy.java_src deleted file mode 100644 index de64f562a0f..00000000000 --- a/test/org/rascalmpl/test/data/patterns/micro/Taxonomy.java_src +++ /dev/null @@ -1,5 +0,0 @@ -package org.rascalmpl.test.data.patterns.micro; - -public interface Taxonomy extends InterfaceWithMethods { - -} diff --git a/test/org/rascalmpl/test/data/patterns/micro/Taxonomy2.java_src b/test/org/rascalmpl/test/data/patterns/micro/Taxonomy2.java_src deleted file mode 100644 index 5661fc3753a..00000000000 --- a/test/org/rascalmpl/test/data/patterns/micro/Taxonomy2.java_src +++ /dev/null @@ -1,14 +0,0 @@ -package org.rascalmpl.test.data.patterns.micro; - -import java.util.*; - -public class Taxonomy2 extends ArrayList { - public Taxonomy2() { - super(); - } - - public Taxonomy2(Collection c) { - super(c); - } - -}