forked from JavaTX/JavaCompilerCore
modified: .classpath
Keine Ahnung modified: src/de/dhbwstuttgart/typeinference/unify/RuleSet.java Aenderung Zeile 578 rhsType = pair.getRhsType(); //PL eingefuegt 2017-09-29 statt !((rhsType = pair.getRhsType()) instanceof PlaceholderType) if(lhsType != null //&& !((rhsType = pair.getRhsType()) instanceof PlaceholderType) //PL geloescht am 2017-09-29 Begründung: auch Typvariablen muessen ersetzt werden. modified: src/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java 1. Aenderung: Zeile 168 /* * Step 6 a) Restart (fork) for pairs where subst was applied */ if(parallel) { if //(eqPrime.equals(eq)) //PL 2017-09-29 auskommentiert und durch (!eqPrimePrime.isPresent()) //PL 2071-09-29 dies ersetzt //Begruendung: Wenn in der Substitution keine Veraenderung //(!eqPrimePrime.isPresent()) erfolgt ist, ist das Ergebnis erzielt. eqPrimePrimeSet.add(eqPrime); 2. Aenderung: Ziel 188 else { // sequentiell (Step 6b is included) if //(eqPrime.equals(eq)) //PL 2017-09-29 auskommentiert und durch (!eqPrimePrime.isPresent()) //PL 2071-09-29 dies ersetzt //Begruendung: Wenn in der Substitution keine Veraenderung //(!eqPrimePrime.isPresent()) erfolgt ist, ist das Ergebnis erzielt. eqPrimePrimeSet.add(eqPrime);
This commit is contained in:
parent
db9298e383
commit
fa92fee98d
@ -16,7 +16,6 @@
|
|||||||
<classpathentry kind="lib" path="lib/reflections-0.9.10-javadoc.jar"/>
|
<classpathentry kind="lib" path="lib/reflections-0.9.10-javadoc.jar"/>
|
||||||
<classpathentry kind="lib" path="lib/reflections-0.9.10-sources.jar"/>
|
<classpathentry kind="lib" path="lib/reflections-0.9.10-sources.jar"/>
|
||||||
<classpathentry kind="lib" path="lib/reflections-0.9.10.jar" sourcepath="/reflections/src"/>
|
<classpathentry kind="lib" path="lib/reflections-0.9.10.jar" sourcepath="/reflections/src"/>
|
||||||
<classpathentry kind="lib" path="lib/guava-22.0.jar" sourcepath="lib/guava-22.0-sources.jar"/>
|
|
||||||
<classpathentry kind="lib" path="lib/guava-15.0.jar"/>
|
<classpathentry kind="lib" path="lib/guava-15.0.jar"/>
|
||||||
<classpathentry kind="output" path="bin"/>
|
<classpathentry kind="output" path="bin"/>
|
||||||
</classpath>
|
</classpath>
|
||||||
|
@ -575,8 +575,9 @@ public class RuleSet implements IRuleSet{
|
|||||||
if(pair.getPairOp() == PairOperator.EQUALSDOT
|
if(pair.getPairOp() == PairOperator.EQUALSDOT
|
||||||
&& pair.getLhsType() instanceof PlaceholderType)
|
&& pair.getLhsType() instanceof PlaceholderType)
|
||||||
lhsType = (PlaceholderType) pair.getLhsType();
|
lhsType = (PlaceholderType) pair.getLhsType();
|
||||||
|
rhsType = pair.getRhsType(); //PL eingefuegt 2017-09-29 statt !((rhsType = pair.getRhsType()) instanceof PlaceholderType)
|
||||||
if(lhsType != null
|
if(lhsType != null
|
||||||
&& !((rhsType = pair.getRhsType()) instanceof PlaceholderType)
|
//&& !((rhsType = pair.getRhsType()) instanceof PlaceholderType) //PL geloescht am 2017-09-29 Begründung: auch Typvariablen muessen ersetzt werden.
|
||||||
&& typeMap.get(lhsType) > 1 // The type occurs in more pairs in the set than just the recent pair.
|
&& typeMap.get(lhsType) > 1 // The type occurs in more pairs in the set than just the recent pair.
|
||||||
&& !rhsType.getTypeParams().occurs(lhsType)) {
|
&& !rhsType.getTypeParams().occurs(lhsType)) {
|
||||||
Unifier uni = new Unifier(lhsType, rhsType);
|
Unifier uni = new Unifier(lhsType, rhsType);
|
||||||
|
@ -119,7 +119,7 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
|
|||||||
// Sets of the "second level"
|
// Sets of the "second level"
|
||||||
Set<UnifyPair> undefinedPairs = new HashSet<>();
|
Set<UnifyPair> undefinedPairs = new HashSet<>();
|
||||||
Set<Set<Set<Set<UnifyPair>>>> secondLevelSets = calculatePairSets(eq2s, fc, undefinedPairs);
|
Set<Set<Set<Set<UnifyPair>>>> secondLevelSets = calculatePairSets(eq2s, fc, undefinedPairs);
|
||||||
|
//PL 2017-09-20: Im calculatePairSets wird möglicherweise O .< java.lang.Integer nicht ausgewertet Faculty Beispiel im 1. Schritt
|
||||||
// If pairs occured that did not match one of the cartesian product cases,
|
// If pairs occured that did not match one of the cartesian product cases,
|
||||||
// those pairs are contradictory and the unification is impossible.
|
// those pairs are contradictory and the unification is impossible.
|
||||||
if(!undefinedPairs.isEmpty())
|
if(!undefinedPairs.isEmpty())
|
||||||
@ -169,7 +169,10 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
|
|||||||
* Step 6 a) Restart (fork) for pairs where subst was applied
|
* Step 6 a) Restart (fork) for pairs where subst was applied
|
||||||
*/
|
*/
|
||||||
if(parallel) {
|
if(parallel) {
|
||||||
if (eqPrime.equals(eq))
|
if //(eqPrime.equals(eq)) //PL 2017-09-29 auskommentiert und durch
|
||||||
|
(!eqPrimePrime.isPresent()) //PL 2071-09-29 dies ersetzt
|
||||||
|
//Begruendung: Wenn in der Substitution keine Veraenderung
|
||||||
|
//(!eqPrimePrime.isPresent()) erfolgt ist, ist das Ergebnis erzielt.
|
||||||
eqPrimePrimeSet.add(eqPrime);
|
eqPrimePrimeSet.add(eqPrime);
|
||||||
else if(eqPrimePrime.isPresent()) {
|
else if(eqPrimePrime.isPresent()) {
|
||||||
TypeUnifyTask fork = new TypeUnifyTask(eqPrimePrime.get(), fc, true);
|
TypeUnifyTask fork = new TypeUnifyTask(eqPrimePrime.get(), fc, true);
|
||||||
@ -183,7 +186,10 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else { // sequentiell (Step 6b is included)
|
else { // sequentiell (Step 6b is included)
|
||||||
if (eqPrime.equals(eq))
|
if //(eqPrime.equals(eq)) //PL 2017-09-29 auskommentiert und durch
|
||||||
|
(!eqPrimePrime.isPresent()) //PL 2071-09-29 dies ersetzt
|
||||||
|
//Begruendung: Wenn in der Substitution keine Veraenderung
|
||||||
|
//(!eqPrimePrime.isPresent()) erfolgt ist, ist das Ergebnis erzielt.
|
||||||
eqPrimePrimeSet.add(eqPrime);
|
eqPrimePrimeSet.add(eqPrime);
|
||||||
else if(eqPrimePrime.isPresent())
|
else if(eqPrimePrime.isPresent())
|
||||||
eqPrimePrimeSet.addAll(unify(eqPrimePrime.get(), fc, false));
|
eqPrimePrimeSet.addAll(unify(eqPrimePrime.get(), fc, false));
|
||||||
|
Loading…
Reference in New Issue
Block a user