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

modified:   ../../../main/java/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java
This commit is contained in:
Martin Plümicke 2019-02-19 17:51:11 +01:00
parent 1f12aaec82
commit 362e797b10
2 changed files with 9 additions and 3 deletions

View File

@ -51,7 +51,7 @@ import org.antlr.v4.parse.ANTLRParser.throwsSpec_return;
public class JavaTXCompiler { public class JavaTXCompiler {
final CompilationEnvironment environment; final CompilationEnvironment environment;
Boolean resultmodel = false; Boolean resultmodel = true;
public final Map<File, SourceFile> sourceFiles = new HashMap<>(); public final Map<File, SourceFile> sourceFiles = new HashMap<>();
Boolean log = true; //gibt an ob ein Log-File nach System.getProperty("user.dir")+"src/test/java/logFiles" geschrieben werden soll? Boolean log = true; //gibt an ob ein Log-File nach System.getProperty("user.dir")+"src/test/java/logFiles" geschrieben werden soll?
@ -550,8 +550,8 @@ public class JavaTXCompiler {
} }
/* UnifyResultModel End */ /* UnifyResultModel End */
else { else {
//Set<Set<UnifyPair>> result = unify.unify(unifyCons.getUndConstraints(), oderConstraints, finiteClosure, logFile, log, new UnifyResultModel(cons, finiteClosure)); Set<Set<UnifyPair>> result = unify.unify(unifyCons.getUndConstraints(), oderConstraints, finiteClosure, logFile, log, new UnifyResultModel(cons, finiteClosure));
Set<Set<UnifyPair>> result = unify.unifyOderConstraints(unifyCons.getUndConstraints(), oderConstraints, finiteClosure, logFile, log, new UnifyResultModel(cons, finiteClosure)); //Set<Set<UnifyPair>> result = unify.unifyOderConstraints(unifyCons.getUndConstraints(), oderConstraints, finiteClosure, logFile, log, new UnifyResultModel(cons, finiteClosure));
System.out.println("RESULT: " + result); System.out.println("RESULT: " + result);
logFile.write("RES: " + result.toString()+"\n"); logFile.write("RES: " + result.toString()+"\n");
logFile.flush(); logFile.flush();

View File

@ -959,6 +959,7 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
noOfThread--; noOfThread--;
writeLog("wait "+ forkOrig.thNo); writeLog("wait "+ forkOrig.thNo);
res = forkOrig.join(); res = forkOrig.join();
forkOrig.writeLog("final Orig 1");
//Set<Set<UnifyPair>> fork_res = forkOrig.join(); //Set<Set<UnifyPair>> fork_res = forkOrig.join();
writeLog("JoinOrig " + new Integer(forkOrig.thNo).toString()); writeLog("JoinOrig " + new Integer(forkOrig.thNo).toString());
//noOfThread--; an das Ende von compute verschoben //noOfThread--; an das Ende von compute verschoben
@ -978,6 +979,7 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
if (!isUndefinedPairSetSet(fork_res)) { if (!isUndefinedPairSetSet(fork_res)) {
aParDef.add(fork.getNextSetElement()); aParDef.add(fork.getNextSetElement());
} }
fork.writeLog("final 1");
}; };
} }
noOfThread++; noOfThread++;
@ -1019,6 +1021,7 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
noOfThread--; noOfThread--;
writeLog("wait "+ forkOrig.thNo); writeLog("wait "+ forkOrig.thNo);
res = forkOrig.join(); res = forkOrig.join();
forkOrig.writeLog("final Orig -1");
//Set<Set<UnifyPair>> fork_res = forkOrig.join(); //Set<Set<UnifyPair>> fork_res = forkOrig.join();
writeLog("JoinOrig " + new Integer(forkOrig.thNo).toString()); writeLog("JoinOrig " + new Integer(forkOrig.thNo).toString());
//noOfThread--; an das Ende von compute verschoben //noOfThread--; an das Ende von compute verschoben
@ -1038,6 +1041,7 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
if (!isUndefinedPairSetSet(fork_res)) { if (!isUndefinedPairSetSet(fork_res)) {
aParDef.add(fork.getNextSetElement()); aParDef.add(fork.getNextSetElement());
} }
fork.writeLog("final -1");
}; };
} }
noOfThread++; noOfThread++;
@ -1078,6 +1082,7 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
noOfThread--; noOfThread--;
writeLog("wait "+ forkOrig.thNo); writeLog("wait "+ forkOrig.thNo);
res = forkOrig.join(); res = forkOrig.join();
forkOrig.writeLog("final Orig 2");
//Set<Set<UnifyPair>> fork_res = forkOrig.join(); //Set<Set<UnifyPair>> fork_res = forkOrig.join();
writeLog("JoinOrig " + new Integer(forkOrig.thNo).toString()); writeLog("JoinOrig " + new Integer(forkOrig.thNo).toString());
//noOfThread--; an das Ende von compute verschoben //noOfThread--; an das Ende von compute verschoben
@ -1091,6 +1096,7 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
writeLog("Join " + new Integer(fork.thNo).toString()); writeLog("Join " + new Integer(fork.thNo).toString());
//noOfThread--; an das Ende von compute verschoben //noOfThread--; an das Ende von compute verschoben
add_res.add(fork_res); add_res.add(fork_res);
fork.writeLog("final 2");
}; };
} }
noOfThread++; noOfThread++;