modified: src/main/java/de/dhbwstuttgart/core/JavaTXCompiler.java

modified:   src/main/java/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java
	modified:   src/test/java/AllgemeinTest.java
	modified:   src/test/java/bytecode/MatrixTest.java
This commit is contained in:
pl@gohorb.ba-horb.de 2020-09-25 15:29:41 +02:00
parent 653901ef32
commit c964fa7ce2
4 changed files with 8 additions and 7 deletions

View File

@ -563,11 +563,11 @@ public class JavaTXCompiler {
final ConstraintSet<Pair> cons = getConstraints(); final ConstraintSet<Pair> cons = getConstraints();
Set<Set<UnifyPair>> results = new HashSet<>(); Set<Set<UnifyPair>> results = new HashSet<>();
try { try {
Writer logFile = //new OutputStreamWriter(new NullOutputStream()); Writer logFile = new OutputStreamWriter(new NullOutputStream());
// new FileWriter(new // new FileWriter(new
// File(System.getProperty("user.dir")+"/src/test/resources/logFiles/"+"log_"+sourceFiles.keySet().iterator().next().getName())); // File(System.getProperty("user.dir")+"/src/test/resources/logFiles/"+"log_"+sourceFiles.keySet().iterator().next().getName()));
new FileWriter(new File(System.getProperty("user.dir") + "/logFiles/" + "log_" //new FileWriter(new File(System.getProperty("user.dir") + "/logFiles/" + "log_"
+ sourceFiles.keySet().iterator().next().getName())); // + sourceFiles.keySet().iterator().next().getName()));
IFiniteClosure finiteClosure = UnifyTypeFactory.generateFC(allClasses, logFile, classLoader); IFiniteClosure finiteClosure = UnifyTypeFactory.generateFC(allClasses, logFile, classLoader);
System.out.println(finiteClosure); System.out.println(finiteClosure);
ConstraintSet<UnifyPair> unifyCons = UnifyTypeFactory.convert(cons); ConstraintSet<UnifyPair> unifyCons = UnifyTypeFactory.convert(cons);

View File

@ -174,9 +174,9 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
thNo = totalnoOfThread; thNo = totalnoOfThread;
writeLog("thNo2 " + thNo); writeLog("thNo2 " + thNo);
try { try {
this.logFile = //new OutputStreamWriter(new NullOutputStream()); this.logFile = new OutputStreamWriter(new NullOutputStream());
//new FileWriter(new File(System.getProperty("user.dir")+"/src/test/resources/logFiles/"+"Thread_"+thNo)); //new FileWriter(new File(System.getProperty("user.dir")+"/src/test/resources/logFiles/"+"Thread_"+thNo));
new FileWriter(new File(System.getProperty("user.dir")+"/logFiles/"+"Thread_"+thNo)); //new FileWriter(new File(System.getProperty("user.dir")+"/logFiles/"+"Thread_"+thNo));
logFile.write(""); logFile.write("");
} }
catch (IOException e) { catch (IOException e) {

View File

@ -39,7 +39,8 @@ public class AllgemeinTest {
//String className = "Pair"; //String className = "Pair";
//String className = "FCTest3"; //String className = "FCTest3";
//String className = "Var"; //String className = "Var";
String className = "Put"; //String className = "Put";
String className = "Twice";
//PL 2019-10-24: genutzt fuer unterschiedliche Tests //PL 2019-10-24: genutzt fuer unterschiedliche Tests
path = System.getProperty("user.dir")+"/src/test/resources/AllgemeinTest/" + className + ".jav"; path = System.getProperty("user.dir")+"/src/test/resources/AllgemeinTest/" + className + ".jav";
//path = System.getProperty("user.dir")+"/src/test/resources/AllgemeinTest/Overloading_Generics.jav"; //path = System.getProperty("user.dir")+"/src/test/resources/AllgemeinTest/Overloading_Generics.jav";

View File

@ -28,7 +28,7 @@ public class MatrixTest {
@Test @Test
public void test() throws NoSuchMethodException, SecurityException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, ClassNotFoundException, IOException, InstantiationException { public void test() throws NoSuchMethodException, SecurityException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, ClassNotFoundException, IOException, InstantiationException {
path = System.getProperty("user.dir")+"/src/test/resources/bytecode/javFiles/Matrix.jav"; path = System.getProperty("user.dir")+"/src/test/resources/bytecode/javFiles/MatrixAL.jav";
fileToTest = new File(path); fileToTest = new File(path);
compiler = new JavaTXCompiler(fileToTest); compiler = new JavaTXCompiler(fileToTest);
pathToClassFile = System.getProperty("user.dir")+"/src/test/resources/testBytecode/generatedBC/"; pathToClassFile = System.getProperty("user.dir")+"/src/test/resources/testBytecode/generatedBC/";