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

modified:   ../../../../main/java/de/dhbwstuttgart/typeinference/unify/RuleSet.java
	modified:   ../../../../main/java/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java
Call-graph weiter umgesetzt, aber noch Fehler in MatrixOP
This commit is contained in:
pl@gohorb.ba-horb.de 2020-04-27 22:17:37 +02:00
parent 4f10e789d4
commit b83e2c10e3
3 changed files with 8 additions and 6 deletions

View File

@ -188,7 +188,7 @@ public class JavaTXCompiler {
cl.getMethods().add(new Method(m.modifier, m.name, m.getReturnType().acceptTV(new TypeExchanger(gtvs)), newParaList, m.block,
//new GenericDeclarationList(newGenericsList, ((GenericDeclarationList)m.getGenerics()).getOffset()),
(GenericDeclarationList)m.getGenerics(),
m.getOffset()));
m.getOffset(), true));
}
}

View File

@ -679,8 +679,8 @@ public class RuleSet implements IRuleSet{
result = result.stream().map(x -> uni.apply(pair,x)).collect(Collectors.toCollection(ArrayList::new));
result1 = result1.stream().map(x -> uni.apply(pair,x)).collect(Collectors.toCollection(LinkedList::new));
Function<? super Set<UnifyPair>,? extends Constraint<UnifyPair>> applyUni = b -> b.stream().map(
x -> uni.apply(pair,x)).collect(Collectors.toCollection(Constraint::new));
Function<? super Constraint<UnifyPair>,? extends Constraint<UnifyPair>> applyUni = b -> b.stream().map(
x -> uni.apply(pair,x)).collect(Collectors.toCollection(() -> new Constraint<UnifyPair>(b.isInherited())));
List<Set<Set<UnifyPair>>> oderConstraintsRet = new ArrayList<>();
for(Set<Constraint<UnifyPair>> oc : oderConstraints) {
//Set<Set<UnifyPair>> ocRet = new HashSet<>();
@ -689,7 +689,7 @@ public class RuleSet implements IRuleSet{
oderConstraintsRet.add(csRet);
//}
}
oderConstraints.replaceAll(oc -> oc.stream().map(applyUni).collect(Collectors.toCollection(Constraint::new)));
oderConstraints.replaceAll(oc -> oc.stream().map(applyUni).collect(Collectors.toCollection(HashSet::new)));
/*
oderConstraints = oderConstraints.stream().map(
a -> a.stream().map(applyUni

View File

@ -1364,7 +1364,8 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
while (nextSetasListIt.hasNext()) {
Set<UnifyPair> a_next = nextSetasListIt.next();
if (a_new.equals(a_next) ||
(oup.compare(a_new, a_next) == -1)) {
((oup.compare(a_new, a_next) == -1) &&
(!oderConstraint || ((Constraint)a_new).isInherited()))){
writeLog("Removed: " + a_next.toString());
nextSetasList.remove(a_next); //PL geaendert 2019-01-09
}
@ -1383,7 +1384,8 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
while (nextSetasListIt.hasNext()) {
Set<UnifyPair> a_next = nextSetasListIt.next();
if (a_new.equals(a_next) ||
(oup.compare(a_new, a_next) == 1)) {
((oup.compare(a_new, a_next) == 1) &&
(!oderConstraint || ((Constraint)a_next).isInherited()))){
writeLog("Removed: " + a_next.toString());
nextSetasList.remove(a_next);
}