Commit 9deb59e4 authored by Malte Heithoff's avatar Malte Heithoff
Browse files

Remove Scope when TaggingResolver is present already

parent 5f46c9f1
Pipeline #335865 passed with stage
in 16 minutes and 42 seconds
......@@ -33,11 +33,11 @@ public interface Generator<T extends Symbol> {
* This method should generate the source for the EMAComponentInstanceSymbol and
* add MathStatementsSymbols, accordingly. Does also do this for all of its subcomponents.
*/
List<FileContent> generateStrings(TaggingResolver taggingResolver, T symbol, Scope symtab);
List<FileContent> generateStrings(TaggingResolver taggingResolver, T symbol);
/**
* This methods writes the resulting code for the ExpandedComponentInstance and its subcomponents to the corresponding files
*/
List<File> generateFiles(TaggingResolver taggingResolver, T symbol, Scope symtab) throws IOException;
List<File> generateFiles(TaggingResolver taggingResolver, T symbol) throws IOException;
}
......@@ -121,8 +121,8 @@ public class GeneratorCPP implements EMAMGenerator {
//Log.warn("This backend has been deprecated. Armadillo is the recommended backend now.");
}
public String generateString(TaggingResolver taggingResolver, EMAComponentInstanceSymbol componentInstanceSymbol, Scope symtab) {
MathStatementsSymbol mathSymbol = Helper.getMathStatementsSymbolFor(componentInstanceSymbol, symtab);
public String generateString(TaggingResolver taggingResolver, EMAComponentInstanceSymbol componentInstanceSymbol) {
MathStatementsSymbol mathSymbol = Helper.getMathStatementsSymbolFor(componentInstanceSymbol, taggingResolver);
return generateString(taggingResolver, componentInstanceSymbol, mathSymbol);
}
......@@ -180,7 +180,7 @@ public class GeneratorCPP implements EMAMGenerator {
public static List<FileContent> currentFileContentList = null;
@Override
public List<FileContent> generateStrings(TaggingResolver taggingResolver, EMAComponentInstanceSymbol componentInstanceSymbol, Scope symtab) {
public List<FileContent> generateStrings(TaggingResolver taggingResolver, EMAComponentInstanceSymbol componentInstanceSymbol) {
List<FileContent> fileContents = new ArrayList<>();
if (componentInstanceSymbol.getFullName().equals("simulator.mainController")) {
setGenerateSimulatorInterface(true);
......@@ -190,9 +190,9 @@ public class GeneratorCPP implements EMAMGenerator {
currentFileContentList = fileContents;
if (!streamTestGenerationMode)
fileContents.add(new FileContent(generateString(taggingResolver, componentInstanceSymbol, symtab), componentInstanceSymbol));
fileContents.add(new FileContent(generateString(taggingResolver, componentInstanceSymbol), componentInstanceSymbol));
else
fileContents.add(new FileContent(generateString(taggingResolver, componentInstanceSymbol, symtab),
fileContents.add(new FileContent(generateString(taggingResolver, componentInstanceSymbol),
componentInstanceSymbol.getPackageName().replaceAll("\\.", "\\/") + "/" + Names.FirstUpperCase(componentInstanceSymbol.getName()) + "Test" + testNamePostFix + ".stream"));
String lastNameWithoutArrayPart = "";
if (!streamTestGenerationMode) {
......@@ -207,7 +207,7 @@ public class GeneratorCPP implements EMAMGenerator {
Log.info(generateComponentInstance + "", "Bool:");
}
if (generateComponentInstance) {
fileContents.addAll(generateStrings(taggingResolver, instanceSymbol, symtab));
fileContents.addAll(generateStrings(taggingResolver, instanceSymbol));
}
}
if (MathConverter.curBackend.getBackendName().equals("OctaveBackend"))
......@@ -250,27 +250,26 @@ public class GeneratorCPP implements EMAMGenerator {
}
//TODO add incremental generation based on described concept
public List<File> generateFiles(TaggingResolver taggingResolver, EMAComponentInstanceSymbol componentSymbol,
Scope symtab) throws IOException {
public List<File> generateFiles(TaggingResolver taggingResolver, EMAComponentInstanceSymbol componentSymbol) throws IOException {
List<FileContent> fileContents = new ArrayList<>();
if (componentSymbol == null) {
ComponentScanner componentScanner = new ComponentScanner(getModelsDirPath(), symtab, "emam");
ComponentScanner componentScanner = new ComponentScanner(getModelsDirPath(), taggingResolver, "emam");
Set<String> availableComponents = componentScanner.scan();
for (String componentFullName : availableComponents) {
componentFullName = Names.getExpandedComponentInstanceSymbolName(componentFullName);
if (symtab.resolve(componentFullName,
if (taggingResolver.resolve(componentFullName,
EMAComponentInstanceSymbol.KIND).isPresent()) {
EMAComponentInstanceSymbol componentInstanceSymbol = (EMAComponentInstanceSymbol) symtab.resolve(componentFullName,
EMAComponentInstanceSymbol componentInstanceSymbol = (EMAComponentInstanceSymbol) taggingResolver.resolve(componentFullName,
EMAComponentInstanceSymbol.KIND).get();
fileContents.addAll(generateStrings(taggingResolver, componentInstanceSymbol, symtab));
fileContents.addAll(generateStrings(taggingResolver, componentInstanceSymbol));
}
}
} else {
searchForCVEverywhere(componentSymbol, symtab);
fileContents = generateStrings(taggingResolver, componentSymbol, symtab);
searchForCVEverywhere(componentSymbol, taggingResolver);
fileContents = generateStrings(taggingResolver, componentSymbol);
}
fileContents.addAll(generateTypes(TypeConverter.getTypeSymbols()));
fileContents.addAll(handleTestAndCheckDir(symtab, componentSymbol));
fileContents.addAll(handleTestAndCheckDir(taggingResolver, componentSymbol));
if (isGenerateAutopilotAdapter()) {
fileContents.addAll(getAutopilotAdapterFiles(componentSymbol));
}
......@@ -322,11 +321,6 @@ public class GeneratorCPP implements EMAMGenerator {
return fileContents;
}
public List<File> generateFiles(EMAComponentInstanceSymbol componentSymbol,
TaggingResolver taggingResolver) throws IOException {
return generateFiles(taggingResolver, componentSymbol, taggingResolver);
}
public File generateFile(FileContent fileContent) throws IOException {
File f = new File(getGenerationTargetPath() + fileContent.getFileName());
Log.info(f.getName(), "FileCreation:");
......
......@@ -191,7 +191,7 @@ public final class GeneratorCppCli {
try {
if (componentSymbol != null) {
g.generateFiles(componentSymbol, symTab);
g.generateFiles(symTab, componentSymbol);
} else {
g.saveFilesToDisk(g.handleTestAndCheckDir(symTab, componentSymbol));
}
......
......@@ -26,7 +26,7 @@ public class AutomaticStreamTestGenerator extends AbstractSymtab {
generatorCPP.setGenerationTargetPath(targetPath);
generatorCPP.useArmadilloBackend();
generatorCPP.setModelsDirPath(Paths.get(basePath));
List<File> files = generatorCPP.generateFiles(symtab, componentSymbol, symtab);
List<File> files = generatorCPP.generateFiles(symtab, componentSymbol);
}
}
......@@ -40,7 +40,7 @@ public class ConfigPortTest extends AbstractSymtabTest{
generatorCPP.setGenerateCMake(false);
generatorCPP.setGenerationTargetPath("./target/generated-sources-cpp/configPort/");
List<File> files = generatorCPP.generateFiles(comp, symtab);
List<File> files = generatorCPP.generateFiles(symtab, comp);
testFilesAreEqual(files,"configPort/");
}
......@@ -63,7 +63,7 @@ public class ConfigPortTest extends AbstractSymtabTest{
generatorCPP.setGenerateCMake(false);
generatorCPP.setGenerationTargetPath("./target/generated-sources-cpp/configPortFromKeyword/");
List<File> files = generatorCPP.generateFiles(comp, symtab);
List<File> files = generatorCPP.generateFiles(symtab, comp);
testFilesAreEqual(files,"configPortFromKeyword/");
......
......@@ -40,7 +40,7 @@ public class MathOptimizerTest extends AbstractSymtabTest {
generatorCPP.setGenerateCMake(false);
generatorCPP.setGenerationTargetPath("./target/generated-sources-cpp/optimizer/l1/");
List<File> files = generatorCPP.generateFiles(componentSymbol, symtab);
List<File> files = generatorCPP.generateFiles(symtab, componentSymbol);;
String restPath = "optimizer/l1/";
testFilesAreEqual(files, restPath);
......@@ -59,7 +59,7 @@ public class MathOptimizerTest extends AbstractSymtabTest {
generatorCPP.setGenerateCMake(false);
generatorCPP.setGenerationTargetPath("./target/generated-sources-cpp/optimizer/l1/");
List<File> files = generatorCPP.generateFiles(componentSymbol, symtab);
List<File> files = generatorCPP.generateFiles(symtab, componentSymbol);;
String restPath = "optimizer/l1/";
testFilesAreEqual(files, restPath);
}
......@@ -77,7 +77,7 @@ public class MathOptimizerTest extends AbstractSymtabTest {
generatorCPP.setGenerateCMake(false);
generatorCPP.setGenerationTargetPath("./target/generated-sources-cpp/optimizer/l1/");
List<File> files = generatorCPP.generateFiles(componentSymbol, symtab);
List<File> files = generatorCPP.generateFiles(symtab, componentSymbol);;
String restPath = "optimizer/l1/";
testFilesAreEqual(files, restPath);
......@@ -96,7 +96,7 @@ public class MathOptimizerTest extends AbstractSymtabTest {
generatorCPP.setGenerateCMake(false);
generatorCPP.setGenerationTargetPath("./target/generated-sources-cpp/optimizer/l1/");
List<File> files = generatorCPP.generateFiles(componentSymbol, symtab);
List<File> files = generatorCPP.generateFiles(symtab, componentSymbol);;
String restPath = "optimizer/l1/";
testFilesAreEqual(files, restPath);
}
......@@ -115,7 +115,7 @@ public class MathOptimizerTest extends AbstractSymtabTest {
generatorCPP.setGenerateCMake(false);
generatorCPP.setGenerationTargetPath("./target/generated-sources-cpp/optimizer/l1/");
List<File> files = generatorCPP.generateFiles(componentSymbol, symtab);
List<File> files = generatorCPP.generateFiles(symtab, componentSymbol);;
String restPath = "optimizer/l1/";
testFilesAreEqual(files, restPath);
}
......@@ -133,7 +133,7 @@ public class MathOptimizerTest extends AbstractSymtabTest {
generatorCPP.setGenerateCMake(false);
generatorCPP.setGenerationTargetPath("./target/generated-sources-cpp/optimizer/l1/");
List<File> files = generatorCPP.generateFiles(componentSymbol, symtab);
List<File> files = generatorCPP.generateFiles(symtab, componentSymbol);;
String restPath = "optimizer/l1/";
testFilesAreEqual(files, restPath);
......@@ -152,7 +152,7 @@ public class MathOptimizerTest extends AbstractSymtabTest {
generatorCPP.setGenerateCMake(false);
generatorCPP.setGenerationTargetPath("./target/generated-sources-cpp/optimizer/l1/");
List<File> files = generatorCPP.generateFiles(componentSymbol, symtab);
List<File> files = generatorCPP.generateFiles(symtab, componentSymbol);;
String restPath = "optimizer/l1/";
testFilesAreEqual(files, restPath);
......@@ -171,7 +171,7 @@ public class MathOptimizerTest extends AbstractSymtabTest {
generatorCPP.setGenerateCMake(false);
generatorCPP.setGenerationTargetPath("./target/generated-sources-cpp/optimizer/l1/");
List<File> files = generatorCPP.generateFiles(componentSymbol, symtab);
List<File> files = generatorCPP.generateFiles(symtab, componentSymbol);;
String restPath = "optimizer/l1/";
testFilesAreEqual(files, restPath);
}
......@@ -191,7 +191,7 @@ public class MathOptimizerTest extends AbstractSymtabTest {
generatorCPP.setGenerateCMake(false);
generatorCPP.setGenerationTargetPath("./target/generated-sources-cpp/optimizer/l1/");
List<File> files = generatorCPP.generateFiles(componentSymbol, symtab);
List<File> files = generatorCPP.generateFiles(symtab, componentSymbol);;
String restPath = "optimizer/l1/";
testFilesAreEqual(files, restPath);
}
......@@ -209,7 +209,7 @@ public class MathOptimizerTest extends AbstractSymtabTest {
generatorCPP.setGenerateCMake(false);
generatorCPP.setGenerationTargetPath("./target/generated-sources-cpp/optimizer/l1/");
List<File> files = generatorCPP.generateFiles(componentSymbol, symtab);
List<File> files = generatorCPP.generateFiles(symtab, componentSymbol);;
String restPath = "optimizer/l1/";
testFilesAreEqual(files, restPath);
......@@ -228,7 +228,7 @@ public class MathOptimizerTest extends AbstractSymtabTest {
generatorCPP.setGenerateCMake(false);
generatorCPP.setGenerationTargetPath("./target/generated-sources-cpp/optimizer/l1/");
List<File> files = generatorCPP.generateFiles(componentSymbol, symtab);
List<File> files = generatorCPP.generateFiles(symtab, componentSymbol);;
String restPath = "optimizer/l1/";
testFilesAreEqual(files, restPath);
......@@ -247,7 +247,7 @@ public class MathOptimizerTest extends AbstractSymtabTest {
generatorCPP.setGenerateCMake(false);
generatorCPP.setGenerationTargetPath("./target/generated-sources-cpp/optimizer/l1/");
List<File> files = generatorCPP.generateFiles(componentSymbol, symtab);
List<File> files = generatorCPP.generateFiles(symtab, componentSymbol);;
String restPath = "optimizer/l1/";
testFilesAreEqual(files, restPath);
}
......@@ -265,7 +265,7 @@ public class MathOptimizerTest extends AbstractSymtabTest {
generatorCPP.setGenerateCMake(false);
generatorCPP.setGenerationTargetPath("./target/generated-sources-cpp/optimizer/l1/");
List<File> files = generatorCPP.generateFiles(componentSymbol, symtab);
List<File> files = generatorCPP.generateFiles(symtab, componentSymbol);;
String restPath = "optimizer/l1/";
testFilesAreEqual(files, restPath);
......@@ -284,7 +284,7 @@ public class MathOptimizerTest extends AbstractSymtabTest {
generatorCPP.setGenerateCMake(false);
generatorCPP.setGenerationTargetPath("./target/generated-sources-cpp/optimizer/l1/");
List<File> files = generatorCPP.generateFiles(componentSymbol, symtab);
List<File> files = generatorCPP.generateFiles(symtab, componentSymbol);;
String restPath = "optimizer/l1/";
testFilesAreEqual(files, restPath);
......@@ -303,7 +303,7 @@ public class MathOptimizerTest extends AbstractSymtabTest {
generatorCPP.setGenerateCMake(false);
generatorCPP.setGenerationTargetPath("./target/generated-sources-cpp/optimizer/l1/");
List<File> files = generatorCPP.generateFiles(componentSymbol, symtab);
List<File> files = generatorCPP.generateFiles(symtab, componentSymbol);;
String restPath = "optimizer/l1/";
testFilesAreEqual(files, restPath);
}
......@@ -321,7 +321,7 @@ public class MathOptimizerTest extends AbstractSymtabTest {
generatorCPP.setGenerateCMake(false);
generatorCPP.setGenerationTargetPath("./target/generated-sources-cpp/optimizer/l1/");
List<File> files = generatorCPP.generateFiles(componentSymbol, symtab);
List<File> files = generatorCPP.generateFiles(symtab, componentSymbol);;
String restPath = "optimizer/l1/";
testFilesAreEqual(files, restPath);
......@@ -340,7 +340,7 @@ public class MathOptimizerTest extends AbstractSymtabTest {
generatorCPP.setGenerateCMake(false);
generatorCPP.setGenerationTargetPath("./target/generated-sources-cpp/optimizer/l1/");
List<File> files = generatorCPP.generateFiles(componentSymbol, symtab);
List<File> files = generatorCPP.generateFiles(symtab, componentSymbol);;
String restPath = "optimizer/l1/";
testFilesAreEqual(files, restPath);
......@@ -359,7 +359,7 @@ public class MathOptimizerTest extends AbstractSymtabTest {
generatorCPP.setGenerateCMake(false);
generatorCPP.setGenerationTargetPath("./target/generated-sources-cpp/optimizer/l1/");
List<File> files = generatorCPP.generateFiles(componentSymbol, symtab);
List<File> files = generatorCPP.generateFiles(symtab, componentSymbol);;
String restPath = "optimizer/l1/";
//testFilesAreEqual(files, restPath);
......@@ -374,7 +374,7 @@ public class MathOptimizerTest extends AbstractSymtabTest {
GeneratorCPP generatorCPP = new GeneratorCPP();
generatorCPP.setUseAlgebraicOptimizations(true);
generatorCPP.setGenerationTargetPath("./target/generated-sources-cpp/paperMatrixModifier/l1");
generatorCPP.generateFiles(componentSymbol, symtab);
generatorCPP.generateFiles(symtab, componentSymbol);;
}
@Test
......@@ -386,7 +386,7 @@ public class MathOptimizerTest extends AbstractSymtabTest {
GeneratorCPP generatorCPP = new GeneratorCPP();
generatorCPP.setUseAlgebraicOptimizations(true);
generatorCPP.setGenerationTargetPath("./target/generated-sources-cpp/paperMatrixModifier/l1");
generatorCPP.generateFiles(componentSymbol, symtab);
generatorCPP.generateFiles(symtab, componentSymbol);;
}
@Ignore
......@@ -399,7 +399,7 @@ public class MathOptimizerTest extends AbstractSymtabTest {
GeneratorCPP generatorCPP = new GeneratorCPP();
generatorCPP.setUseAlgebraicOptimizations(true);
generatorCPP.setGenerationTargetPath("./target/generated-sources-cpp/optimizer/l1");
generatorCPP.generateFiles(componentSymbol, symtab);
generatorCPP.generateFiles(symtab, componentSymbol);;
}
@Test
......@@ -412,6 +412,6 @@ public class MathOptimizerTest extends AbstractSymtabTest {
generatorCPP.useArmadilloBackend();
//generatorCPP.setUseAlgebraicOptimizations(true);
generatorCPP.setGenerationTargetPath("./target/generated-sources-cpp/armadillo/optimizer/l1");
generatorCPP.generateFiles(componentSymbol, symtab);
generatorCPP.generateFiles(symtab, componentSymbol);;
}
}
......@@ -38,7 +38,7 @@ public class TestsGenTest extends AbstractSymtabTest {
generatorCPP.useOctaveBackend();
generatorCPP.setGenerationTargetPath("./target/generated-sources-cpp/MySuperAwesomeComponent1/");
generatorCPP.setCheckModelDir(true);
Set<File> files = new HashSet<>(generatorCPP.generateFiles(symTab, componentSymbol, symTab));
Set<File> files = new HashSet<>(generatorCPP.generateFiles(symTab, componentSymbol));
// assertEquals(18, files.size());
assertEquals(13, files.size()); // TODO: check if 14 is correct here?
......@@ -58,7 +58,7 @@ public class TestsGenTest extends AbstractSymtabTest {
generatorCPP.setGenerateCMake(true);
generatorCPP.setGenerationTargetPath("./target/generated-sources-cpp/structs/simpleStructComp");
generatorCPP.setCheckModelDir(true);
Set<File> files = new HashSet<>(generatorCPP.generateFiles(symTab, componentSymbol, symTab));
Set<File> files = new HashSet<>(generatorCPP.generateFiles(symTab, componentSymbol));
Optional<File> testFileOpt = files.stream().filter(file -> file.getName().endsWith("structs_simpleStructComp_test.hpp")).findFirst();
......@@ -83,7 +83,7 @@ public class TestsGenTest extends AbstractSymtabTest {
generatorCPP.setGenerateCMake(true);
generatorCPP.setGenerationTargetPath("./target/generated-sources-cpp/structs/nestedStructComp");
generatorCPP.setCheckModelDir(true);
Set<File> files = new HashSet<>(generatorCPP.generateFiles(symTab, componentSymbol, symTab));
Set<File> files = new HashSet<>(generatorCPP.generateFiles(symTab, componentSymbol));
Optional<File> testFileOpt = files.stream().filter(file -> file.getName().endsWith("structs_nestedStructComp_test.hpp")).findFirst();
......@@ -111,7 +111,7 @@ public class TestsGenTest extends AbstractSymtabTest {
generatorCPP.setGenerateCMake(true);
generatorCPP.setGenerationTargetPath("./target/generated-sources-cpp/streamTest/matrix/");
generatorCPP.setCheckModelDir(true);
Set<File> files = new HashSet<>(generatorCPP.generateFiles(symTab, componentSymbol, symTab));
Set<File> files = new HashSet<>(generatorCPP.generateFiles(symTab, componentSymbol));
Optional<File> testFileOpt = files.stream().filter(file -> file.getName().endsWith("basic_matrixComp_test.hpp")).findFirst();
......
......@@ -39,7 +39,7 @@ public class GenerateCMakeTest extends AbstractSymtabTest {
generatorCPP.useArmadilloBackend();
generatorCPP.setGenerateCMake(true);
generatorCPP.setGenerationTargetPath("./target/generated-sources-cpp/cmake/test/BasicConstantAssignment");
List<File> files = generatorCPP.generateFiles(componentSymbol, symtab);
List<File> files = generatorCPP.generateFiles(symtab, componentSymbol);;
String restPath = "cmake/test/BasicConstantAssignment/";
testCMakeFilesEqual(files, restPath);
}
......@@ -52,7 +52,7 @@ public class GenerateCMakeTest extends AbstractSymtabTest {
generatorCPP.useArmadilloBackend();
generatorCPP.setGenerateCMake(true);
generatorCPP.setGenerationTargetPath("./target/generated-sources-cpp/cmake/testing/Model");
List<File> files = generatorCPP.generateFiles(componentSymbol, symtab);
List<File> files = generatorCPP.generateFiles(symtab, componentSymbol);;
String restPath = "cmake/testing/Model/";
testCMakeFilesEqual(files, restPath);
}
......@@ -69,7 +69,7 @@ public class GenerateCMakeTest extends AbstractSymtabTest {
generatorCPP.setModelsDirPath(Paths.get("src/test/resources/generatecmake"));
generatorCPP.setGenerateTests(true);
generatorCPP.setCheckModelDir(true);
List<File> files = generatorCPP.generateFiles(componentSymbol, symtab);
List<File> files = generatorCPP.generateFiles(symtab, componentSymbol);;
String restPath = "cmake/test/BasicPortsMath/";
testCMakeFilesEqual(files, restPath);
}
......@@ -106,7 +106,7 @@ public class GenerateCMakeTest extends AbstractSymtabTest {
generatorCPP.setModelsDirPath(Paths.get("src/test/resources/generatecmake"));
generatorCPP.setGenerateTests(true);
generatorCPP.setCheckModelDir(false);
List<File> files = generatorCPP.generateFiles(componentSymbol, symtab);
List<File> files = generatorCPP.generateFiles(symtab, componentSymbol);;
String restPath = "cmake/test/math/FloatDivisionTest/";
testCMakeFilesEqual(files, restPath);
}
......
......@@ -138,7 +138,7 @@ public class AutomaticStreamTestGenerationTest extends AbstractSymtabTest {
generatorCPP.setGenerateTests(true);
EMAComponentInstanceSymbol componentSymbol = symtab.<EMAComponentInstanceSymbol>resolve("de.rwth.armin.modeling.autopilot.motion.calculatePidError", EMAComponentInstanceSymbol.KIND).orElse(null);
assertNotNull(componentSymbol);
generatorCPP.generateFiles(symtab, componentSymbol, symtab);
generatorCPP.generateFiles(symtab, componentSymbol);
//generatorCPP.setModelsDirPath(Paths.get("./target/generated-sources-cpp/streamtest/cluster"));
// generatorCPP.saveFilesToDisk(generatorCPP.handleTestAndCheckDir(symtab));
//testFilesAreEqual(files, restPath); generated values are random
......
......@@ -27,7 +27,7 @@ public class BasicGenerationTest extends AbstractSymtabTest {
generatorCPP.useOctaveBackend();
generatorCPP.setGenerateCMake(false);
generatorCPP.setGenerationTargetPath("./target/generated-sources-cpp/testing/l0");
List<File> files = generatorCPP.generateFiles(componentSymbol, symtab);
List<File> files = generatorCPP.generateFiles(symtab, componentSymbol);;
String restPath = "testing/l0/";
testFilesAreEqual(files, restPath);
}
......@@ -42,7 +42,7 @@ public class BasicGenerationTest extends AbstractSymtabTest {
generatorCPP.setGenerateCMake(false);
generatorCPP.useOctaveBackend();
generatorCPP.setGenerationTargetPath("./target/generated-sources-cpp/testing/l0");
List<File> files = generatorCPP.generateFiles(componentSymbol, symtab);
List<File> files = generatorCPP.generateFiles(symtab, componentSymbol);;
}
@Test
......@@ -97,7 +97,7 @@ public class BasicGenerationTest extends AbstractSymtabTest {
}
generatorCPP.setGenerateCMake(false);
generatorCPP.setGenerationTargetPath(firstPartOfPath + additionalPath);
generatorCPP.generateFiles(componentSymbol, symtab);
generatorCPP.generateFiles(symtab, componentSymbol);;
}
@Test
......@@ -110,7 +110,7 @@ public class BasicGenerationTest extends AbstractSymtabTest {
generatorCPP.useArmadilloBackend();
generatorCPP.setGenerateCMake(false);
generatorCPP.setGenerationTargetPath("./target/generated-sources-cpp/armadillo/testing");
generatorCPP.generateFiles(componentSymbol, symtab);
generatorCPP.generateFiles(symtab, componentSymbol);;
}
@Test
......@@ -122,7 +122,7 @@ public class BasicGenerationTest extends AbstractSymtabTest {
generatorCPP.useArmadilloBackend();
generatorCPP.setGenerateCMake(false);
generatorCPP.setGenerationTargetPath("./target/generated-sources-cpp/armadillo/testing");
List<File> files = generatorCPP.generateFiles(componentSymbol, symtab);
List<File> files = generatorCPP.generateFiles(symtab, componentSymbol);;
String restPath = "armadillo/testing/";
testFilesAreEqual(files, restPath);
}
......@@ -146,7 +146,7 @@ public class BasicGenerationTest extends AbstractSymtabTest {
generatorCPP.setUseThreadingOptimization(false);
generatorCPP.useOctaveBackend();
generatorCPP.setGenerationTargetPath("./target/generated-sources-cpp/detectionObjectDetectorNoKMeans" + "/l0");
List<File> files = generatorCPP.generateFiles(symtab, componentSymbol, symtab);
List<File> files = generatorCPP.generateFiles(symtab, componentSymbol);
String restPath = "detectionObjectDetectorNoKMeans" + "/l0/";
//testFilesAreEqual(files, restPath);
}
......@@ -161,7 +161,7 @@ public class BasicGenerationTest extends AbstractSymtabTest {
generatorCPP.setUseThreadingOptimization(false);
generatorCPP.useOctaveBackend();
generatorCPP.setGenerationTargetPath("./target/generated-sources-cpp/detectionObjectDetectorNoKMeans" + "/l1");
List<File> files = generatorCPP.generateFiles(symtab, componentSymbol, symtab);
List<File> files = generatorCPP.generateFiles(symtab, componentSymbol);
String restPath = "detectionObjectDetectorNoKMeans" + "/l1/";
//testFilesAreEqual(files, restPath);
}
......@@ -176,7 +176,7 @@ public class BasicGenerationTest extends AbstractSymtabTest {
generatorCPP.setUseAlgebraicOptimizations(false);
generatorCPP.useOctaveBackend();
generatorCPP.setGenerationTargetPath("./target/generated-sources-cpp/detectionObjectDetectorNoKMeans" + "/l2");
List<File> files = generatorCPP.generateFiles(symtab, componentSymbol, symtab);
List<File> files = generatorCPP.generateFiles(symtab, componentSymbol);
String restPath = "detectionObjectDetectorNoKMeans" + "/l2/";
//testFilesAreEqual(files, restPath);
}
......@@ -192,7 +192,7 @@ public class BasicGenerationTest extends AbstractSymtabTest {
generatorCPP.setUseThreadingOptimization(true);
generatorCPP.useOctaveBackend();
generatorCPP.setGenerationTargetPath("./target/generated-sources-cpp/detectionObjectDetectorNoKMeans" + "/l3");
List<File> files = generatorCPP.generateFiles(symtab, componentSymbol, symtab);
List<File> files = generatorCPP.generateFiles(symtab, componentSymbol);
String restPath = "detectionObjectDetectorNoKMeans" + "/l3/";
//testFilesAreEqual(files, restPath);
}
......
......@@ -27,7 +27,7 @@ public class BasicMathGenerationTest extends AbstractSymtabTest {
generatorCPP.setGenerateCMake(false);
generatorCPP.useOctaveBackend();
generatorCPP.setGenerationTargetPath("./target/generated-sources-cpp/testMath/l0");
List<File> files = generatorCPP.generateFiles(componentSymbol, symtab);
List<File> files = generatorCPP.generateFiles(symtab, componentSymbol);;
String restPath = "testMath/l0/";
testFilesAreEqual(files, restPath);
}
......@@ -43,7 +43,7 @@ public class BasicMathGenerationTest extends AbstractSymtabTest {
generatorCPP.useOctaveBackend();
generatorCPP.setGenerateCMake(false);
generatorCPP.setGenerationTargetPath("./target/generated-sources-cpp/testMath/l0");
List<File> files = generatorCPP.generateFiles(componentSymbol, symtab);
List<File> files = generatorCPP.generateFiles(symtab, componentSymbol);;
String restPath = "testMath/l0/";
testFilesAreEqual(files, restPath);
}
......@@ -58,7 +58,7 @@ public class BasicMathGenerationTest extends AbstractSymtabTest {
generatorCPP.useOctaveBackend();
generatorCPP.setGenerateCMake(false);
generatorCPP.setGenerationTargetPath("./target/generated-sources-cpp/testMath/l0");
List<File> files = generatorCPP.generateFiles(componentSymbol, symtab);
List<File> files = generatorCPP.generateFiles(symtab, componentSymbol);;
String restPath = "testMath/l0/";
testFilesAreEqual(files, restPath);
}
......@@ -73,7 +73,7 @@ public class BasicMathGenerationTest extends AbstractSymtabTest {
generatorCPP.useOctaveBackend();
generatorCPP.setGenerateCMake(false);
generatorCPP.setGenerationTargetPath("./target/generated-sources-cpp/testMath/l0");
List<File> files = generatorCPP.generateFiles(componentSymbol, symtab);
List<File> files = generatorCPP.generateFiles(symtab, componentSymbol);;
String restPath = "testMath/l0/";
testFilesAreEqual(files, restPath);
}
......@@ -87,7 +87,7 @@ public class BasicMathGenerationTest extends AbstractSymtabTest {
generatorCPP.useArmadilloBackend();
generatorCPP.setGenerateCMake(false);
generatorCPP.setGenerationTargetPath("./target/generated-sources-cpp/testMath/l0");
List<File> files = generatorCPP.generateFiles(componentSymbol, symtab);
List<File> files = generatorCPP.generateFiles(symtab, componentSymbol);;
String restPath = "testMath/l0/";
testFilesAreEqual(files, restPath);
}
......@@ -102,7 +102,7 @@ public class BasicMathGenerationTest extends AbstractSymtabTest {
generatorCPP.useArmadilloBackend();
generatorCPP.setGenerateCMake(false);
generatorCPP.setGenerationTargetPath("./target/generated-sources-cpp/testMath/l0");
List<File> files = generatorCPP.generateFiles(componentSymbol, symtab);
List<File> files = generatorCPP.generateFiles(symtab, componentSymbol);;
String restPath = "testMath/l0/";
testFilesAreEqual(files, restPath);
}
......@@ -117,7 +117,7 @@ public class BasicMathGenerationTest extends AbstractSymtabTest {
generatorCPP.useArmadilloBackend();
generatorCPP.setGenerateCMake(false);
generatorCPP.setGenerationTargetPath("./target/generated-sources-cpp/testMath/l0");
List<File> files = generatorCPP.generateFiles(componentSymbol, symtab);
List<File> files = generatorCPP.generateFiles(symtab, componentSymbol);;
String restPath = "testMath/l0/";
testFilesAreEqual(files, restPath);
}
......
......@@ -43,7 +43,7 @@ public class GenerationTest extends AbstractSymtabTest {
generatorCPP.setGenerationTargetPath("./target/generated-sources-cpp/testBooleanVariableComp");
generatorCPP.useArmadilloBackend();
generatorCPP.setGenerateCMake(false);
List<File> files = generatorCPP.generateFiles(symtab, componentSymbol, symtab);
List<File> files = generatorCPP.generateFiles(symtab, componentSymbol);
String restPath = "testBooleanVariableComp/";
testFilesAreEqual(files, restPath);