forked from JavaTX/JavaCompilerCore
modified: ../../../../main/java/de/dhbwstuttgart/core/JavaTXCompiler.java
modified: ../../../../main/java/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java modified: ../../../../main/java/de/dhbwstuttgart/typeinference/unify/model/UnifyPair.java Das fehlerveruraschende Paar wird auch zu abhSubst hingefuegt.
This commit is contained in:
parent
577faa88af
commit
7c7dbf3769
@ -73,7 +73,7 @@ public class JavaTXCompiler {
|
||||
|
||||
public static JavaTXCompiler INSTANCE;
|
||||
final CompilationEnvironment environment;
|
||||
Boolean resultmodel = true;
|
||||
Boolean resultmodel = false;
|
||||
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?
|
||||
public volatile UnifyTaskModel usedTasks = new UnifyTaskModel();
|
||||
|
@ -1436,7 +1436,7 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
|
||||
res.stream()
|
||||
.map(b ->
|
||||
b.stream()
|
||||
.map(x -> x.getAllBases())
|
||||
.map(x -> x.getThisAndAllBases()) //getAllBases durch getThisAndAllBases ersetzt, weil auch im UnifyPair selbst schon ein Fehler liegen kann.
|
||||
.reduce((y,z) -> { y.addAll(z); return y;}).get())
|
||||
.reduce((y,z) -> { y.addAll(z); return y;}).get()
|
||||
);
|
||||
@ -1457,6 +1457,7 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
|
||||
if (res.size() > 1) {
|
||||
System.out.println();
|
||||
}
|
||||
writeLog("nextSetasList vor filter-Aufruf: " + nextSetasList);
|
||||
nextSetasList = nextSetasList.stream().filter(x -> {
|
||||
//Boolean ret = false;
|
||||
//for (PlaceholderType var : vars) {
|
||||
@ -1465,6 +1466,7 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
|
||||
return (!x.containsAll(durchschnitt));
|
||||
})//.filter(y -> couldBecorrect(reducedUndefResSubstGroundedBasePair, y)) //fuer testzwecke auskommentiert um nofstred zu bestimmen PL 2018-10-10
|
||||
.collect(Collectors.toCollection(ArrayList::new));
|
||||
writeLog("nextSetasList nach filter-Aufruf: " + nextSetasList);
|
||||
nofstred = nextSetasList.size();
|
||||
//NOCH NICHT korrekt PL 2018-10-12
|
||||
//nextSetasList = nextSetasList.stream().filter(y -> couldBecorrect(reducedUndefResSubstGroundedBasePair, y))
|
||||
|
@ -138,6 +138,11 @@ public class UnifyPair {
|
||||
return ret;
|
||||
}
|
||||
|
||||
public Set<UnifyPair> getThisAndAllBases () {
|
||||
Set<UnifyPair> ret = getAllBases();
|
||||
ret.add(this);
|
||||
return ret;
|
||||
}
|
||||
public Set<UnifyPair> getAllBases () {
|
||||
Set<UnifyPair> ret = new HashSet<>();
|
||||
if (basePair != null) {
|
||||
|
Loading…
Reference in New Issue
Block a user