|
|
|
@@ -13,6 +13,7 @@ import java.util.List;
|
|
|
|
|
import java.util.Map.Entry;
|
|
|
|
|
import java.util.Optional;
|
|
|
|
|
import java.util.Set;
|
|
|
|
|
import java.util.concurrent.ForkJoinPool;
|
|
|
|
|
import java.util.concurrent.RecursiveTask;
|
|
|
|
|
import java.util.function.BiFunction;
|
|
|
|
|
import java.util.function.BinaryOperator;
|
|
|
|
@@ -56,6 +57,7 @@ import java.io.OutputStreamWriter;
|
|
|
|
|
import java.io.Writer;
|
|
|
|
|
|
|
|
|
|
import com.google.common.collect.Ordering;
|
|
|
|
|
import org.apache.commons.io.output.NullWriter;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@@ -78,11 +80,9 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
|
|
|
|
|
* Fuer die Threads
|
|
|
|
|
*/
|
|
|
|
|
UnifyResultModel urm;
|
|
|
|
|
protected static int noOfThread = 0;
|
|
|
|
|
private static int totalnoOfThread = 0;
|
|
|
|
|
int thNo;
|
|
|
|
|
protected boolean one = false;
|
|
|
|
|
Integer MaxNoOfThreads = 8;
|
|
|
|
|
|
|
|
|
|
public static final String rootDirectory = System.getProperty("user.dir")+"/test/logFiles/";
|
|
|
|
|
Writer logFile;
|
|
|
|
@@ -161,7 +161,10 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
|
|
|
|
|
this.statistics = statistics;
|
|
|
|
|
}
|
|
|
|
|
public TypeUnifyTask(Set<UnifyPair> eq, List<Set<Constraint<UnifyPair>>> oderConstraints, IFiniteClosure fc, boolean parallel, Writer logFile, Boolean log, int rekTiefe, UnifyResultModel urm, UnifyTaskModel usedTasks) {
|
|
|
|
|
synchronized (this) {
|
|
|
|
|
synchronized (this) {
|
|
|
|
|
if(statistics==null){
|
|
|
|
|
statistics = new NullWriter();
|
|
|
|
|
}
|
|
|
|
|
this.eq = eq;
|
|
|
|
|
//this.oderConstraints = oderConstraints.stream().map(x -> x.stream().map(y -> new HashSet<>(y)).collect(Collectors.toSet(HashSet::new))).collect(Collectors.toList(ArrayList::new));
|
|
|
|
|
this.oderConstraintsField = oderConstraints; /*.stream().map(x -> {
|
|
|
|
@@ -180,8 +183,7 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
|
|
|
|
|
this.parallel = parallel;
|
|
|
|
|
this.logFile = logFile;
|
|
|
|
|
this.log = log;
|
|
|
|
|
|
|
|
|
|
noOfThread++;
|
|
|
|
|
|
|
|
|
|
totalnoOfThread++;
|
|
|
|
|
//writeLog("thNo1 " + thNo);
|
|
|
|
|
thNo = totalnoOfThread;
|
|
|
|
@@ -258,7 +260,7 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
|
|
|
|
|
|
|
|
|
|
protected Set<Set<UnifyPair>> compute() {
|
|
|
|
|
if (one) {
|
|
|
|
|
System.out.println("two");
|
|
|
|
|
//System.out.println("two");
|
|
|
|
|
}
|
|
|
|
|
one = true;
|
|
|
|
|
Set<UnifyPair> neweq = new HashSet<>(eq);
|
|
|
|
@@ -270,7 +272,6 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
|
|
|
|
|
.filter(x -> x.size()>1)
|
|
|
|
|
.collect(Collectors.toCollection(ArrayList::new));
|
|
|
|
|
Set<Set<UnifyPair>> res = unify(neweq, remainingOderconstraints, fc, parallel, rekTiefeField, new HashSet<>());
|
|
|
|
|
noOfThread--;
|
|
|
|
|
try {
|
|
|
|
|
logFile.close();
|
|
|
|
|
}
|
|
|
|
@@ -659,7 +660,7 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
|
|
|
|
|
//a <. theta, theta <. a oder a =. theta enthalten
|
|
|
|
|
|
|
|
|
|
//statistics
|
|
|
|
|
writeStatistics("\nNumber of Constraints (" + rekTiefe + "): " + topLevelSets.size());
|
|
|
|
|
//writeStatistics("\nNumber of Constraints (" + rekTiefe + "): " + topLevelSets.size());
|
|
|
|
|
|
|
|
|
|
Set<Set<UnifyPair>> oneElems = new HashSet<>();
|
|
|
|
|
oneElems.addAll(topLevelSets.stream()
|
|
|
|
@@ -679,7 +680,7 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
|
|
|
|
|
//writeLog("nextSet: " + nextSet.toString());
|
|
|
|
|
List<Set<UnifyPair>> nextSetasList =new ArrayList<>(nextSet);
|
|
|
|
|
|
|
|
|
|
writeStatistics(" Start Number of elements ( " /* + nextSetasList.get(0).stream().findFirst().get().getBasePair()*/ +"): (" + rekTiefe + "): " + nextSetasList.size());
|
|
|
|
|
//writeStatistics(" Start Number of elements ( " /* + nextSetasList.get(0).stream().findFirst().get().getBasePair()*/ +"): (" + rekTiefe + "): " + nextSetasList.size());
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
try {
|
|
|
|
@@ -797,7 +798,7 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
|
|
|
|
|
while (nextSetasList.size() > 0) {
|
|
|
|
|
|
|
|
|
|
//statistics
|
|
|
|
|
writeStatistics(" Actual Number of elements( " + nextSetasList.get(0).stream().findFirst().get().getBasePair() +"): (" + rekTiefe + "): " + nextSetasList.size());
|
|
|
|
|
//writeStatistics(" Actual Number of elements( " + nextSetasList.get(0).stream().findFirst().get().getBasePair() +"): (" + rekTiefe + "): " + nextSetasList.size());
|
|
|
|
|
Set<UnifyPair> a_last = a;
|
|
|
|
|
|
|
|
|
|
/* Liste der Faelle für die parallele Verarbeitung
|
|
|
|
@@ -817,7 +818,7 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
|
|
|
|
|
writeLog("nextSet: " + nextSet.toString());
|
|
|
|
|
writeLog("nextSetasList: " + nextSetasList.toString());
|
|
|
|
|
|
|
|
|
|
///* staistics Nextvar an Hand Varianzbestimmung auskommentieren Anfang
|
|
|
|
|
/* staistics Nextvar an Hand Varianzbestimmung auskommentieren Anfang
|
|
|
|
|
if (variance == 1) {
|
|
|
|
|
a = oup.max(nextSetasList.iterator());
|
|
|
|
|
nextSetasList.remove(a);
|
|
|
|
@@ -889,10 +890,10 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//Nextvar an Hand Varianzbestimmung auskommentieren Ende */
|
|
|
|
|
//a = nextSetasList.remove(0); //statisticsList
|
|
|
|
|
Nextvar an Hand Varianzbestimmung auskommentieren Ende */
|
|
|
|
|
a = nextSetasList.remove(0); //statisticsList
|
|
|
|
|
|
|
|
|
|
writeStatistics(a.toString());
|
|
|
|
|
//writeStatistics(a.toString());
|
|
|
|
|
if (oderConstraint) {//Methodconstraints werden abgespeichert für die Bytecodegenerierung von Methodenaufrufen
|
|
|
|
|
methodSignatureConstraint.addAll(((Constraint<UnifyPair>)a).getmethodSignatureConstraint());
|
|
|
|
|
//System.out.println("ERSTELLUNG: " +methodSignatureConstraint);
|
|
|
|
@@ -925,7 +926,7 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
|
|
|
|
|
/* Wenn parallel gearbeitet wird, wird je nach Varianz ein neuer Thread
|
|
|
|
|
* gestartet, der parallel weiterarbeitet.
|
|
|
|
|
*/
|
|
|
|
|
if(parallel && (variance == 1) && noOfThread <= MaxNoOfThreads) {
|
|
|
|
|
if(parallel && (variance == 1)) {
|
|
|
|
|
Set<TypeUnify2Task> forks = new HashSet<>();
|
|
|
|
|
Set<UnifyPair> newEqOrig = new HashSet<>(eq);
|
|
|
|
|
Set<Set<UnifyPair>> newElemsOrig = new HashSet<>(elems);
|
|
|
|
@@ -947,9 +948,9 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
|
|
|
|
|
writeLog("a in " + variance + " "+ a);
|
|
|
|
|
writeLog("nextSetasListRest: " + nextSetasListRest.toString());
|
|
|
|
|
}
|
|
|
|
|
while (!nextSetasListRest.isEmpty()) {
|
|
|
|
|
Set<UnifyPair> nSaL = nextSetasListRest.remove(0);
|
|
|
|
|
synchronized (this) { nextSetasList.remove(nSaL);
|
|
|
|
|
while (!nextSetasList.isEmpty()) {
|
|
|
|
|
Set<UnifyPair> nSaL = nextSetasList.remove(0);
|
|
|
|
|
synchronized (this) { //nextSetasList.remove(nSaL);
|
|
|
|
|
writeLog("1 RM" + nSaL.toString());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@@ -985,7 +986,6 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
|
|
|
|
|
/* FORK ANFANG */
|
|
|
|
|
synchronized (this) {
|
|
|
|
|
writeLog("wait "+ forkOrig.thNo);
|
|
|
|
|
noOfThread--;
|
|
|
|
|
res = forkOrig.join();
|
|
|
|
|
synchronized (usedTasks) {
|
|
|
|
|
if (this.myIsCancelled()) {
|
|
|
|
@@ -1005,7 +1005,6 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
|
|
|
|
|
forks.forEach(x -> writeLog("wait: " + x.thNo));
|
|
|
|
|
for(TypeUnify2Task fork : forks) {
|
|
|
|
|
synchronized (this) {
|
|
|
|
|
noOfThread--;
|
|
|
|
|
Set<Set<UnifyPair>> fork_res = fork.join();
|
|
|
|
|
synchronized (usedTasks) {
|
|
|
|
|
if (this.myIsCancelled()) {
|
|
|
|
@@ -1027,7 +1026,7 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
|
|
|
|
|
}
|
|
|
|
|
//noOfThread++;
|
|
|
|
|
} else {
|
|
|
|
|
if(parallel && (variance == -1) && noOfThread <= MaxNoOfThreads) {
|
|
|
|
|
if(parallel && (variance == -1)) {
|
|
|
|
|
Set<TypeUnify2Task> forks = new HashSet<>();
|
|
|
|
|
Set<UnifyPair> newEqOrig = new HashSet<>(eq);
|
|
|
|
|
Set<Set<UnifyPair>> newElemsOrig = new HashSet<>(elems);
|
|
|
|
@@ -1049,9 +1048,9 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
|
|
|
|
|
writeLog("a in " + variance + " "+ a);
|
|
|
|
|
writeLog("nextSetasListRest: " + nextSetasListRest.toString());
|
|
|
|
|
}
|
|
|
|
|
while (!nextSetasListRest.isEmpty()) {
|
|
|
|
|
Set<UnifyPair> nSaL = nextSetasListRest.remove(0);
|
|
|
|
|
synchronized (this) { nextSetasList.remove(nSaL);
|
|
|
|
|
while (!nextSetasList.isEmpty()) {
|
|
|
|
|
Set<UnifyPair> nSaL = nextSetasList.remove(0);
|
|
|
|
|
synchronized (this) { //nextSetasList.remove(nSaL);
|
|
|
|
|
writeLog("-1 RM" + nSaL.toString());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@@ -1086,7 +1085,6 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
|
|
|
|
|
/* FORK ANFANG */
|
|
|
|
|
synchronized (this) {
|
|
|
|
|
writeLog("wait "+ forkOrig.thNo);
|
|
|
|
|
noOfThread--;
|
|
|
|
|
res = forkOrig.join();
|
|
|
|
|
synchronized (usedTasks) {
|
|
|
|
|
if (this.myIsCancelled()) {
|
|
|
|
@@ -1106,7 +1104,6 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
|
|
|
|
|
forks.forEach(x -> writeLog("wait: " + x.thNo));
|
|
|
|
|
for(TypeUnify2Task fork : forks) {
|
|
|
|
|
synchronized (this) {
|
|
|
|
|
noOfThread--;
|
|
|
|
|
Set<Set<UnifyPair>> fork_res = fork.join();
|
|
|
|
|
synchronized (usedTasks) {
|
|
|
|
|
if (this.myIsCancelled()) {
|
|
|
|
@@ -1128,7 +1125,7 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
|
|
|
|
|
}
|
|
|
|
|
//noOfThread++;
|
|
|
|
|
} else {
|
|
|
|
|
if(parallel && (variance == 2) && noOfThread <= MaxNoOfThreads) {
|
|
|
|
|
if(parallel && (variance == 2)) {
|
|
|
|
|
writeLog("var2einstieg");
|
|
|
|
|
Set<TypeUnify2Task> forks = new HashSet<>();
|
|
|
|
|
Set<UnifyPair> newEqOrig = new HashSet<>(eq);
|
|
|
|
@@ -1151,9 +1148,9 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
|
|
|
|
|
writeLog("a in " + variance + " "+ a);
|
|
|
|
|
writeLog("nextSetasListRest: " + nextSetasListRest.toString());
|
|
|
|
|
}
|
|
|
|
|
while (!nextSetasListRest.isEmpty()) {
|
|
|
|
|
Set<UnifyPair> nSaL = nextSetasListRest.remove(0);
|
|
|
|
|
nextSetasList.remove(nSaL); //PL einkommentiert 20-02-03
|
|
|
|
|
while (!nextSetasList.isEmpty()) {
|
|
|
|
|
Set<UnifyPair> nSaL = nextSetasList.remove(0);
|
|
|
|
|
//nextSetasList.remove(nSaL); //PL einkommentiert 20-02-03
|
|
|
|
|
Set<UnifyPair> newEq = new HashSet<>(eq);
|
|
|
|
|
Set<Set<UnifyPair>> newElems = new HashSet<>(elems);
|
|
|
|
|
List<Set<Constraint<UnifyPair>>> newOderConstraints = new ArrayList<>(oderConstraints);
|
|
|
|
@@ -1172,7 +1169,6 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
|
|
|
|
|
/* FORK ANFANG */
|
|
|
|
|
synchronized (this) {
|
|
|
|
|
writeLog("wait "+ forkOrig.thNo);
|
|
|
|
|
noOfThread--;
|
|
|
|
|
res = forkOrig.join();
|
|
|
|
|
synchronized (usedTasks) {
|
|
|
|
|
if (this.myIsCancelled()) {
|
|
|
|
@@ -1191,7 +1187,6 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
|
|
|
|
|
forks.forEach(x -> writeLog("wait: " + x.thNo));
|
|
|
|
|
for(TypeUnify2Task fork : forks) {
|
|
|
|
|
synchronized (this) {
|
|
|
|
|
noOfThread--;
|
|
|
|
|
Set<Set<UnifyPair>> fork_res = fork.join();
|
|
|
|
|
synchronized (usedTasks) {
|
|
|
|
|
if (this.myIsCancelled()) {
|
|
|
|
@@ -1213,9 +1208,9 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
|
|
|
|
|
}}}
|
|
|
|
|
|
|
|
|
|
//Ab hier alle parallele Berechnungen wieder zusammengeführt.
|
|
|
|
|
if (hilf == 1)
|
|
|
|
|
System.out.println();
|
|
|
|
|
writeStatistics("Zusammengeführt(" + rekTiefe + "): " + nextSetasList.size());
|
|
|
|
|
//if (hilf == 1)
|
|
|
|
|
//System.out.println();
|
|
|
|
|
//writeStatistics("Zusammengeführt(" + rekTiefe + "): " + nextSetasList.size());
|
|
|
|
|
if (oderConstraint) {//Wenn weiteres Element nextSetasList genommen wird, muss die vorherige methodsignatur geloescht werden
|
|
|
|
|
methodSignatureConstraint.removeAll(((Constraint<UnifyPair>)a).getmethodSignatureConstraint());
|
|
|
|
|
//System.out.println("REMOVE: " +methodSignatureConstraint);
|
|
|
|
@@ -1327,7 +1322,7 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
|
|
|
|
|
//wenn korrektes Ergebnis gefunden alle Fehlerfaelle loeschen
|
|
|
|
|
result = par_res;
|
|
|
|
|
if (!par_res.isEmpty() && par_res.iterator().next() instanceof WildcardType) {
|
|
|
|
|
System.out.println("");
|
|
|
|
|
//System.out.println("");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
@@ -1343,7 +1338,7 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
|
|
|
|
|
//break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// /* auskommentiert um alle Max und min Betrachtung auszuschalten ANFANG
|
|
|
|
|
/* auskommentiert um alle Max und min Betrachtung auszuschalten ANFANG
|
|
|
|
|
if (!result.isEmpty() && (!isUndefinedPairSetSet(res) || !aParDef.isEmpty())) {
|
|
|
|
|
if (nextSetasList.iterator().hasNext() && nextSetasList.iterator().next().stream().filter(x -> x.getLhsType().getName().equals("B")).findFirst().isPresent() && nextSetasList.size()>1)
|
|
|
|
|
System.out.print("");
|
|
|
|
@@ -1480,7 +1475,7 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
|
|
|
|
|
writeLog("a: " + rekTiefe + " variance: " + variance + a.toString());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//auskommentiert um alle Max und min Betrachtung auszuschalten ENDE */
|
|
|
|
|
auskommentiert um alle Max und min Betrachtung auszuschalten ENDE */
|
|
|
|
|
|
|
|
|
|
if (isUndefinedPairSetSet(res) && aParDef.isEmpty()) {
|
|
|
|
|
int nofstred= 0;
|
|
|
|
@@ -1513,9 +1508,9 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
|
|
|
|
|
return new Pair<>(su, x.getGroundBasePair());})
|
|
|
|
|
.collect(Collectors.toCollection(HashSet::new));
|
|
|
|
|
if (res.size() > 1) {
|
|
|
|
|
System.out.println();
|
|
|
|
|
//System.out.println();
|
|
|
|
|
}
|
|
|
|
|
// /* statistics no erase
|
|
|
|
|
/* statistics no erase
|
|
|
|
|
writeLog("nextSetasList vor filter-Aufruf: " + nextSetasList);
|
|
|
|
|
if (!oderConstraint) {//PL 2023-02-08 eingefuegt: Bei oderconstraints sind Subststitutionen nicht als Substitutionen in idesem Sinne zu sehen
|
|
|
|
|
nextSetasList = nextSetasList.stream().filter(x -> {
|
|
|
|
@@ -1528,7 +1523,7 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
|
|
|
|
|
.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))
|
|
|
|
@@ -1546,11 +1541,11 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
|
|
|
|
|
writeLog("Number of all erased Elements (undef): " + noAllErasedElements.toString());
|
|
|
|
|
noBacktracking++;
|
|
|
|
|
writeLog("Number of Backtracking: " + noBacktracking);
|
|
|
|
|
writeStatistics("Number of erased elements: " + (len - nextSetasList.size()));
|
|
|
|
|
writeStatistics("Number of Backtracking: " + noBacktracking);
|
|
|
|
|
System.out.println("");
|
|
|
|
|
//writeStatistics("Number of erased elements: " + (len - nextSetasList.size()));
|
|
|
|
|
//writeStatistics("Number of Backtracking: " + noBacktracking);
|
|
|
|
|
//System.out.println("");
|
|
|
|
|
}
|
|
|
|
|
else writeStatistics("res: " + res.toString());
|
|
|
|
|
else //writeStatistics("res: " + res.toString());
|
|
|
|
|
//if (nextSetasList.size() == 0 && isUndefinedPairSetSet(result) && nextSet.size() > 1) {
|
|
|
|
|
// return result;
|
|
|
|
|
//}
|
|
|
|
@@ -1559,9 +1554,9 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
|
|
|
|
|
//}
|
|
|
|
|
//else result.stream().filter(y -> !isUndefinedPairSet(y));
|
|
|
|
|
writeLog("res: " + res.toString());
|
|
|
|
|
writeStatistics(" End Number of Elements (" + rekTiefe + "): " + nextSetasList.size());
|
|
|
|
|
//writeStatistics(" End Number of Elements (" + rekTiefe + "): " + nextSetasList.size());
|
|
|
|
|
noLoop++;
|
|
|
|
|
writeStatistics("Number of Loops: " + noLoop);
|
|
|
|
|
//writeStatistics("Number of Loops: " + noLoop);
|
|
|
|
|
}
|
|
|
|
|
//2020-02-02: if (variance ==2) Hier Aufruf von filterOverriding einfuegen
|
|
|
|
|
writeLog("Return computeCR: " + result.toString());
|
|
|
|
@@ -2057,7 +2052,7 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
|
|
|
|
|
//System.out.println(pair);
|
|
|
|
|
if (first) { //writeLog(pair.toString()+"\n");
|
|
|
|
|
if (((PlaceholderType)(pair.getLhsType())).getName().equals("AR")) {
|
|
|
|
|
System.out.println("AR");
|
|
|
|
|
//System.out.println("AR");
|
|
|
|
|
}
|
|
|
|
|
Set<Set<UnifyPair>> x1 = unifyCase1(pair, fc);
|
|
|
|
|
if (pairOp == PairOperator.SMALLERNEQDOT) {
|
|
|
|
@@ -2613,7 +2608,6 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
|
|
|
|
|
if (log && finalresult) {
|
|
|
|
|
try {
|
|
|
|
|
logFile.write("Thread no.:" + thNo + "\n");
|
|
|
|
|
logFile.write("noOfThread:" + noOfThread + "\n");
|
|
|
|
|
logFile.write("parallel:" + parallel + "\n");
|
|
|
|
|
logFile.write(str+"\n\n");
|
|
|
|
|
logFile.flush();
|
|
|
|
@@ -2630,7 +2624,7 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
|
|
|
|
|
if (finalresult) {
|
|
|
|
|
synchronized ( this ) {
|
|
|
|
|
try {
|
|
|
|
|
statistics.write(str + "\n");
|
|
|
|
|
statistics.write("Thread No. " + thNo + ": " + str + "\n");
|
|
|
|
|
statistics.flush();
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|