Bug 307 gefixt
All checks were successful
Build and Test with Maven / Build-and-test-with-Maven (push) Successful in 2m51s
All checks were successful
Build and Test with Maven / Build-and-test-with-Maven (push) Successful in 2m51s
Changes to be committed: modified: src/main/java/de/dhbwstuttgart/typeinference/typeAlgo/TYPEStmt.java modified: src/main/java/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java modified: src/test/java/TestComplete.java
This commit is contained in:
parent
6850a8fa21
commit
e37040f367
@ -673,7 +673,8 @@ public class TYPEStmt implements StatementVisitor {
|
|||||||
|
|
||||||
Set<Pair> methodSignatureConstraint = generatemethodSignatureConstraint(forMethod, assumption, info, resolver);
|
Set<Pair> methodSignatureConstraint = generatemethodSignatureConstraint(forMethod, assumption, info, resolver);
|
||||||
|
|
||||||
System.out.println("methodSignatureConstraint; " + methodSignatureConstraint);
|
//System.out.println("methodSignatureConstraint: " + methodSignatureConstraint);
|
||||||
|
//System.out.println("methodConstraint: " + methodConstraint);
|
||||||
|
|
||||||
methodConstraint.setmethodSignatureConstraint(methodSignatureConstraint);
|
methodConstraint.setmethodSignatureConstraint(methodSignatureConstraint);
|
||||||
extendsMethodConstraint.setmethodSignatureConstraint(methodSignatureConstraint);
|
extendsMethodConstraint.setmethodSignatureConstraint(methodSignatureConstraint);
|
||||||
|
@ -594,7 +594,7 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
|
|||||||
/* methodconstraintsets werden zum Ergebnis hinzugefuegt
|
/* methodconstraintsets werden zum Ergebnis hinzugefuegt
|
||||||
* Anfang
|
* Anfang
|
||||||
*/
|
*/
|
||||||
//System.out.println("methodSignatureConstraint Return: " + methodSignatureConstraint);
|
//System.out.println("methodSignatureConstraint Return: " + methodSignatureConstraint + "\n");
|
||||||
eqPrimePrimeSet.forEach(x -> x.addAll(methodSignatureConstraint));
|
eqPrimePrimeSet.forEach(x -> x.addAll(methodSignatureConstraint));
|
||||||
|
|
||||||
//Substitutionen in methodcontraintsets werdne ausgeführt
|
//Substitutionen in methodcontraintsets werdne ausgeführt
|
||||||
@ -885,7 +885,11 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
|
|||||||
|
|
||||||
if (oderConstraint) {//Methodconstraints werden abgespeichert für die Bytecodegenerierung von Methodenaufrufen
|
if (oderConstraint) {//Methodconstraints werden abgespeichert für die Bytecodegenerierung von Methodenaufrufen
|
||||||
methodSignatureConstraint.addAll(((Constraint<UnifyPair>)a).getmethodSignatureConstraint());
|
methodSignatureConstraint.addAll(((Constraint<UnifyPair>)a).getmethodSignatureConstraint());
|
||||||
//System.out.println("ERSTELLUNG: " +methodSignatureConstraint);
|
writeLog("ERSTELLUNG methodSignatureConstraint: " + methodSignatureConstraint);
|
||||||
|
//System.out.println("ERSTELLUNG methodSignatureConstraint: " +noOfThread+" "+methodSignatureConstraint);
|
||||||
|
//System.out.println("a: " +a);
|
||||||
|
//System.out.println("eq: " +eq);
|
||||||
|
//System.out.println();
|
||||||
}
|
}
|
||||||
|
|
||||||
i++;
|
i++;
|
||||||
@ -1134,14 +1138,22 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
|
|||||||
writeLog("a in " + variance + " "+ a);
|
writeLog("a in " + variance + " "+ a);
|
||||||
writeLog("nextSetasListRest: " + nextSetasListRest.toString());
|
writeLog("nextSetasListRest: " + nextSetasListRest.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Fuer parallele Berechnung der Oder-Contraints wird methodSignature kopiert
|
||||||
|
//und jeweils die methodSignature von a bzw. nSaL wieder gelöscht, wenn es keine Lösung ist.
|
||||||
|
Set<UnifyPair> methodSignatureConstraintForParallel = new HashSet<>(methodSignatureConstraint);
|
||||||
|
Set<UnifyPair> nSaL = a;
|
||||||
|
|
||||||
while (!nextSetasListRest.isEmpty()) {
|
while (!nextSetasListRest.isEmpty()) {
|
||||||
Set<UnifyPair> nSaL = nextSetasListRest.remove(0);
|
methodSignatureConstraintForParallel.removeAll(((Constraint<UnifyPair>)nSaL).getmethodSignatureConstraint());
|
||||||
|
nSaL = nextSetasListRest.remove(0);
|
||||||
nextSetasList.remove(nSaL); //PL einkommentiert 20-02-03
|
nextSetasList.remove(nSaL); //PL einkommentiert 20-02-03
|
||||||
|
methodSignatureConstraintForParallel.addAll(((Constraint<UnifyPair>)nSaL).getmethodSignatureConstraint());
|
||||||
Set<UnifyPair> newEq = new HashSet<>(eq);
|
Set<UnifyPair> newEq = new HashSet<>(eq);
|
||||||
Set<Set<UnifyPair>> newElems = new HashSet<>(elems);
|
Set<Set<UnifyPair>> newElems = new HashSet<>(elems);
|
||||||
List<Set<Constraint<UnifyPair>>> newOderConstraints = new ArrayList<>(oderConstraints);
|
List<Set<Constraint<UnifyPair>>> newOderConstraints = new ArrayList<>(oderConstraints);
|
||||||
newElems.add(nSaL);
|
newElems.add(nSaL);
|
||||||
TypeUnify2Task fork = new TypeUnify2Task(newElems, newEq, newOderConstraints, nSaL, fc, parallel, logFile, log, rekTiefe, urm, usedTasks, methodSignatureConstraint);
|
TypeUnify2Task fork = new TypeUnify2Task(newElems, newEq, newOderConstraints, nSaL, fc, parallel, logFile, log, rekTiefe, urm, usedTasks, new HashSet<>(methodSignatureConstraintForParallel));
|
||||||
forks.add(fork);
|
forks.add(fork);
|
||||||
synchronized(usedTasks) {
|
synchronized(usedTasks) {
|
||||||
if (this.myIsCancelled()) {
|
if (this.myIsCancelled()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user