diff --git a/src/main/java/de/dhbwstuttgart/core/JavaTXCompiler.java b/src/main/java/de/dhbwstuttgart/core/JavaTXCompiler.java index ddf7d642..e7af8af2 100644 --- a/src/main/java/de/dhbwstuttgart/core/JavaTXCompiler.java +++ b/src/main/java/de/dhbwstuttgart/core/JavaTXCompiler.java @@ -440,7 +440,8 @@ public class JavaTXCompiler { Set> results = new HashSet<>(); try { Writer logFile = //new OutputStreamWriter(new NullOutputStream()); - new FileWriter(new File(System.getProperty("user.dir")+"/src/test/resources/logFiles/"+"log_"+sourceFiles.keySet().iterator().next().getName())); + //new FileWriter(new 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_"+sourceFiles.keySet().iterator().next().getName())); IFiniteClosure finiteClosure = UnifyTypeFactory.generateFC(allClasses,logFile); System.out.println(finiteClosure); ConstraintSet unifyCons = UnifyTypeFactory.convert(cons); diff --git a/src/main/java/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java b/src/main/java/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java index 21b91e5a..2c1d70fe 100644 --- a/src/main/java/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java +++ b/src/main/java/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java @@ -173,7 +173,8 @@ public class TypeUnifyTask extends RecursiveTask>> { writeLog("thNo2 " + thNo); try { 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)); logFile.write(""); } catch (IOException e) { diff --git a/src/test/resources/bytecode/javFiles/OL.jav b/src/test/resources/bytecode/javFiles/OL.jav index 83361d3c..0861b4df 100644 --- a/src/test/resources/bytecode/javFiles/OL.jav +++ b/src/test/resources/bytecode/javFiles/OL.jav @@ -1,12 +1,22 @@ import java.lang.String; import java.lang.Integer; import java.lang.Double; - +import java.lang.Boolean; public class OL { m(x) { return x + x; } + /* + m(Boolean x) { return x; } + + + m(x) { + x.add(1); + x.addAll(x); + return x; + } +*/ } diff --git a/src/test/resources/bytecode/javFiles/VectorAdd.jav b/src/test/resources/bytecode/javFiles/VectorAdd.jav index 814f46c2..3598c5f1 100644 --- a/src/test/resources/bytecode/javFiles/VectorAdd.jav +++ b/src/test/resources/bytecode/javFiles/VectorAdd.jav @@ -4,6 +4,7 @@ import java.lang.String; //import java.lang.Byte; //import java.lang.Boolean; +/* public class VectorAdd { add(v1, v2) { @@ -17,3 +18,16 @@ public class VectorAdd { return ret; } } +*/ + +public class VectorAdd { + vectorAdd(v1, v2) { + var i = 0; + var erg = new Vector<>(); + while (i < v1.size()) { + erg.addElement(v1.elementAt(i) + v2.elementAt(i)); + i++; + } + return erg; + } +}