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

modified:   src/main/java/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java
log-File in anderen Pfad

	modified:   src/main/java/de/dhbwstuttgart/typeinference/unify/model/UnifyPair.java
substitutions gekapselt
This commit is contained in:
Martin Plümicke 2019-05-14 19:54:51 +02:00
parent f210dd3c25
commit bd0517ae29
3 changed files with 5 additions and 5 deletions

View File

@ -440,7 +440,7 @@ 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/java/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()));
IFiniteClosure finiteClosure = UnifyTypeFactory.generateFC(allClasses,logFile);
System.out.println(finiteClosure);
ConstraintSet<UnifyPair> unifyCons = UnifyTypeFactory.convert(cons);

View File

@ -173,7 +173,7 @@ 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/java/logFiles/"+"Thread_"+thNo));
new FileWriter(new File(System.getProperty("user.dir")+"/src/test/resources/logFiles/"+"Thread_"+thNo));
logFile.write("");
}
catch (IOException e) {

View File

@ -137,7 +137,7 @@ public class UnifyPair {
undefinedPair = true;
}
public Set<UnifyPair> getSubstitution() {
return substitution;
return new HashSet<>(substitution);
}
public UnifyPair getBasePair() {
@ -149,9 +149,9 @@ public class UnifyPair {
public Set<UnifyPair> getAllSubstitutions () {
Set<UnifyPair> ret = new HashSet<>();
ret.addAll(getSubstitution());
ret.addAll(new ArrayList<>(getSubstitution()));
if (basePair != null) {
ret.addAll(basePair.getAllSubstitutions());
ret.addAll(new ArrayList<>(basePair.getAllSubstitutions()));
}
return ret;
}