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

modified:   ../../../../main/java/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java
Pfad fuer logFile nach JavaCompilerCore/logFiles verlegt.

	modified:   ../../bytecode/javFiles/OL.jav
	modified:   ../../bytecode/javFiles/VectorAdd.jav
This commit is contained in:
Martin Plümicke 2019-06-05 10:21:25 +02:00
parent 0233426979
commit 2b7aef5e87
4 changed files with 29 additions and 3 deletions

View File

@ -440,7 +440,8 @@ public class JavaTXCompiler {
Set<Set<UnifyPair>> 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<UnifyPair> unifyCons = UnifyTypeFactory.convert(cons);

View File

@ -173,7 +173,8 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
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) {

View File

@ -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;
}
*/
}

View File

@ -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;
}
}