modified: Makefile
modified: src/main/java/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java
This commit is contained in:
parent
317f8b1aad
commit
6815d8fc0a
4
Makefile
4
Makefile
@ -6,6 +6,6 @@ NoMinMax:
|
|||||||
mvn -DskipTests package
|
mvn -DskipTests package
|
||||||
cp target/JavaTXcompiler-0.1-jar-with-dependencies.jar target/JavaTXcompiler-0.1-jar-with-dependencies_NoMinMax.jar
|
cp target/JavaTXcompiler-0.1-jar-with-dependencies.jar target/JavaTXcompiler-0.1-jar-with-dependencies_NoMinMax.jar
|
||||||
|
|
||||||
NoErase:
|
NoOpt:
|
||||||
mvn -DskipTests package
|
mvn -DskipTests package
|
||||||
cp target/JavaTXcompiler-0.1-jar-with-dependencies.jar target/JavaTXcompiler-0.1-jar-with-dependencies_NoErase.jar
|
cp target/JavaTXcompiler-0.1-jar-with-dependencies.jar target/JavaTXcompiler-0.1-jar-with-dependencies_NoOpt.jar
|
||||||
|
@ -659,7 +659,7 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
|
|||||||
//a <. theta, theta <. a oder a =. theta enthalten
|
//a <. theta, theta <. a oder a =. theta enthalten
|
||||||
|
|
||||||
//statistics
|
//statistics
|
||||||
if (finalresult) writeStatistics("\nNumber of Constraints (" + rekTiefe + "): " + topLevelSets.size());
|
writeStatistics("\nNumber of Constraints (" + rekTiefe + "): " + topLevelSets.size());
|
||||||
|
|
||||||
Set<Set<UnifyPair>> oneElems = new HashSet<>();
|
Set<Set<UnifyPair>> oneElems = new HashSet<>();
|
||||||
oneElems.addAll(topLevelSets.stream()
|
oneElems.addAll(topLevelSets.stream()
|
||||||
@ -815,6 +815,8 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
|
|||||||
|
|
||||||
writeLog("nextSet: " + nextSet.toString());
|
writeLog("nextSet: " + nextSet.toString());
|
||||||
writeLog("nextSetasList: " + nextSetasList.toString());
|
writeLog("nextSetasList: " + nextSetasList.toString());
|
||||||
|
|
||||||
|
/* staistics Nextvar an Hand Varianzbestimmung auskommentieren Anfang
|
||||||
if (variance == 1) {
|
if (variance == 1) {
|
||||||
a = oup.max(nextSetasList.iterator());
|
a = oup.max(nextSetasList.iterator());
|
||||||
nextSetasList.remove(a);
|
nextSetasList.remove(a);
|
||||||
@ -831,7 +833,6 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
|
|||||||
nextSetasListRest.remove(a_next);
|
nextSetasListRest.remove(a_next);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
writeStatistics("Rest:" + nextSetasListRest.toString());
|
|
||||||
|
|
||||||
//Alle maximale Elemente in nextSetasListRest bestimmen
|
//Alle maximale Elemente in nextSetasListRest bestimmen
|
||||||
//nur für diese wird parallele Berechnung angestossen.
|
//nur für diese wird parallele Berechnung angestossen.
|
||||||
@ -887,6 +888,9 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
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
|
if (oderConstraint) {//Methodconstraints werden abgespeichert für die Bytecodegenerierung von Methodenaufrufen
|
||||||
methodSignatureConstraint.addAll(((Constraint<UnifyPair>)a).getmethodSignatureConstraint());
|
methodSignatureConstraint.addAll(((Constraint<UnifyPair>)a).getmethodSignatureConstraint());
|
||||||
@ -909,11 +913,13 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
|
|||||||
/* Wenn bei (a \in theta) \in a zu Widerspruch in oneElems wird
|
/* Wenn bei (a \in theta) \in a zu Widerspruch in oneElems wird
|
||||||
* a verworfen und zu nächstem Element von nextSetasList gegangen
|
* a verworfen und zu nächstem Element von nextSetasList gegangen
|
||||||
*/
|
*/
|
||||||
|
/* statistics sameEq wird nicht betrachtet ANGFANG
|
||||||
if (!oderConstraint && !sameEqSet.isEmpty() && !checkNoContradiction(a, sameEqSet, result)) {
|
if (!oderConstraint && !sameEqSet.isEmpty() && !checkNoContradiction(a, sameEqSet, result)) {
|
||||||
a = null;
|
a = null;
|
||||||
noShortendElements++;
|
noShortendElements++;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
statistics sameEq wird nicht betrachtet ENDE */
|
||||||
|
|
||||||
/* Wenn parallel gearbeitet wird, wird je nach Varianz ein neuer Thread
|
/* Wenn parallel gearbeitet wird, wird je nach Varianz ein neuer Thread
|
||||||
* gestartet, der parallel weiterarbeitet.
|
* gestartet, der parallel weiterarbeitet.
|
||||||
@ -947,12 +953,15 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!oderConstraint) {
|
if (!oderConstraint) {
|
||||||
|
|
||||||
|
/* statistics sameEq wird nicht betrachtet ANGFANG
|
||||||
//ueberpruefung ob zu a =. ty \in nSaL in sameEqSet ein Widerspruch besteht
|
//ueberpruefung ob zu a =. ty \in nSaL in sameEqSet ein Widerspruch besteht
|
||||||
if (!sameEqSet.isEmpty() && !checkNoContradiction(nSaL, sameEqSet, result)) {
|
if (!sameEqSet.isEmpty() && !checkNoContradiction(nSaL, sameEqSet, result)) {
|
||||||
nSaL = null;
|
nSaL = null;
|
||||||
noShortendElements++;
|
noShortendElements++;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
statistics sameEq wird nicht betrachtet ENDE */
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
nextSetasListOderConstraints.add(((Constraint<UnifyPair>)nSaL).getExtendConstraint());
|
nextSetasListOderConstraints.add(((Constraint<UnifyPair>)nSaL).getExtendConstraint());
|
||||||
@ -1046,12 +1055,14 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!oderConstraint) {
|
if (!oderConstraint) {
|
||||||
|
/* statistics sameEq wird nicht betrachtet ANGFANG
|
||||||
//ueberpruefung ob zu a =. ty \in nSaL in sameEqSet ein Widerspruch besteht
|
//ueberpruefung ob zu a =. ty \in nSaL in sameEqSet ein Widerspruch besteht
|
||||||
if (!sameEqSet.isEmpty() && !checkNoContradiction(nSaL, sameEqSet, result)) {
|
if (!sameEqSet.isEmpty() && !checkNoContradiction(nSaL, sameEqSet, result)) {
|
||||||
nSaL = null;
|
nSaL = null;
|
||||||
noShortendElements++;
|
noShortendElements++;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
statistics sameEq wird nicht betrachtet ENDE */
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
nextSetasListOderConstraints.add(((Constraint<UnifyPair>)nSaL).getExtendConstraint());
|
nextSetasListOderConstraints.add(((Constraint<UnifyPair>)nSaL).getExtendConstraint());
|
||||||
@ -2609,6 +2620,7 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void writeStatistics(String str) {
|
void writeStatistics(String str) {
|
||||||
|
if (finalresult) {
|
||||||
synchronized ( this ) {
|
synchronized ( this ) {
|
||||||
try {
|
try {
|
||||||
statistics.write(str + "\n");
|
statistics.write(str + "\n");
|
||||||
@ -2618,6 +2630,6 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
|
|||||||
catch (IOException e) {
|
catch (IOException e) {
|
||||||
System.err.println("kein StatisticsFile");
|
System.err.println("kein StatisticsFile");
|
||||||
}
|
}
|
||||||
}
|
}}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user