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:
parent
4f10e789d4
commit
b83e2c10e3
@ -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,
|
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()),
|
//new GenericDeclarationList(newGenericsList, ((GenericDeclarationList)m.getGenerics()).getOffset()),
|
||||||
(GenericDeclarationList)m.getGenerics(),
|
(GenericDeclarationList)m.getGenerics(),
|
||||||
m.getOffset()));
|
m.getOffset(), true));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -679,8 +679,8 @@ public class RuleSet implements IRuleSet{
|
|||||||
result = result.stream().map(x -> uni.apply(pair,x)).collect(Collectors.toCollection(ArrayList::new));
|
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));
|
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(
|
Function<? super Constraint<UnifyPair>,? extends Constraint<UnifyPair>> applyUni = b -> b.stream().map(
|
||||||
x -> uni.apply(pair,x)).collect(Collectors.toCollection(Constraint::new));
|
x -> uni.apply(pair,x)).collect(Collectors.toCollection(() -> new Constraint<UnifyPair>(b.isInherited())));
|
||||||
List<Set<Set<UnifyPair>>> oderConstraintsRet = new ArrayList<>();
|
List<Set<Set<UnifyPair>>> oderConstraintsRet = new ArrayList<>();
|
||||||
for(Set<Constraint<UnifyPair>> oc : oderConstraints) {
|
for(Set<Constraint<UnifyPair>> oc : oderConstraints) {
|
||||||
//Set<Set<UnifyPair>> ocRet = new HashSet<>();
|
//Set<Set<UnifyPair>> ocRet = new HashSet<>();
|
||||||
@ -689,7 +689,7 @@ public class RuleSet implements IRuleSet{
|
|||||||
oderConstraintsRet.add(csRet);
|
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(
|
oderConstraints = oderConstraints.stream().map(
|
||||||
a -> a.stream().map(applyUni
|
a -> a.stream().map(applyUni
|
||||||
|
@ -1364,7 +1364,8 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
|
|||||||
while (nextSetasListIt.hasNext()) {
|
while (nextSetasListIt.hasNext()) {
|
||||||
Set<UnifyPair> a_next = nextSetasListIt.next();
|
Set<UnifyPair> a_next = nextSetasListIt.next();
|
||||||
if (a_new.equals(a_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());
|
writeLog("Removed: " + a_next.toString());
|
||||||
nextSetasList.remove(a_next); //PL geaendert 2019-01-09
|
nextSetasList.remove(a_next); //PL geaendert 2019-01-09
|
||||||
}
|
}
|
||||||
@ -1383,7 +1384,8 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
|
|||||||
while (nextSetasListIt.hasNext()) {
|
while (nextSetasListIt.hasNext()) {
|
||||||
Set<UnifyPair> a_next = nextSetasListIt.next();
|
Set<UnifyPair> a_next = nextSetasListIt.next();
|
||||||
if (a_new.equals(a_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());
|
writeLog("Removed: " + a_next.toString());
|
||||||
nextSetasList.remove(a_next);
|
nextSetasList.remove(a_next);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user