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:
parent
f210dd3c25
commit
bd0517ae29
@ -440,7 +440,7 @@ public class JavaTXCompiler {
|
|||||||
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 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);
|
IFiniteClosure finiteClosure = UnifyTypeFactory.generateFC(allClasses,logFile);
|
||||||
System.out.println(finiteClosure);
|
System.out.println(finiteClosure);
|
||||||
ConstraintSet<UnifyPair> unifyCons = UnifyTypeFactory.convert(cons);
|
ConstraintSet<UnifyPair> unifyCons = UnifyTypeFactory.convert(cons);
|
||||||
|
@ -173,7 +173,7 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
|
|||||||
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/java/logFiles/"+"Thread_"+thNo));
|
new FileWriter(new File(System.getProperty("user.dir")+"/src/test/resources/logFiles/"+"Thread_"+thNo));
|
||||||
logFile.write("");
|
logFile.write("");
|
||||||
}
|
}
|
||||||
catch (IOException e) {
|
catch (IOException e) {
|
||||||
|
@ -137,7 +137,7 @@ public class UnifyPair {
|
|||||||
undefinedPair = true;
|
undefinedPair = true;
|
||||||
}
|
}
|
||||||
public Set<UnifyPair> getSubstitution() {
|
public Set<UnifyPair> getSubstitution() {
|
||||||
return substitution;
|
return new HashSet<>(substitution);
|
||||||
}
|
}
|
||||||
|
|
||||||
public UnifyPair getBasePair() {
|
public UnifyPair getBasePair() {
|
||||||
@ -149,9 +149,9 @@ public class UnifyPair {
|
|||||||
|
|
||||||
public Set<UnifyPair> getAllSubstitutions () {
|
public Set<UnifyPair> getAllSubstitutions () {
|
||||||
Set<UnifyPair> ret = new HashSet<>();
|
Set<UnifyPair> ret = new HashSet<>();
|
||||||
ret.addAll(getSubstitution());
|
ret.addAll(new ArrayList<>(getSubstitution()));
|
||||||
if (basePair != null) {
|
if (basePair != null) {
|
||||||
ret.addAll(basePair.getAllSubstitutions());
|
ret.addAll(new ArrayList<>(basePair.getAllSubstitutions()));
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user