Bug in subst in Unfify.java gepatched

This commit is contained in:
Martin Plümicke 2015-01-16 22:02:05 +01:00
parent 7d4009b6ae
commit 56c5ec7e18
2 changed files with 6 additions and 3 deletions

View File

@ -800,7 +800,7 @@ public class SourceFile
Stream<Vector<Pair>> streamconstraintsclone = indexeset.stream().map(x -> x.stream()
.map(i -> constraintsClone.elementAt(i))
.collect(Vector::new, Vector::add, Vector::addAll));
// Vector<Vector<Pair>> vecconstraintsclone = streamconstraintsclone.collect(Vector::new, Vector::add, Vector::addAll);
//Vector<Vector<Pair>> vecconstraintsclone = streamconstraintsclone.collect(Vector::new, Vector::add, Vector::addAll);
//Schritt 4: Unifikation
Vector<Vector<Vector<Pair>>> vecunifyResult =

View File

@ -2358,6 +2358,8 @@ throws MatchException
{
// Parameterliste durchgehen
Vector vTemp = ((RefType)T).get_ParaList();
Boolean ret = true; //EINGEFUEGT PL 14-01-16: Return darf erst am Ende zurückgegeben werden und nicht in den ifs
//sonst werden nicht alle Elemente der Forschleife durchlaufen
for( int i = 0; i < vTemp.size(); i++ )
{
Type Temp = (Type)vTemp.elementAt(i);
@ -2374,16 +2376,17 @@ throws MatchException
// Typvariable ersetzen
Vector<Type> vParaListTemp = ((RefType)T).get_ParaList();
vParaListTemp.set( i, o ); // i. Element ersetzen
return true;
ret = true; //GEAENDERT PL 14-01-16
}
}
if( Temp instanceof RefType )
{
Pair PTemp = new Pair( Temp, null);
inferencelog.debug(" TV!!!" + PTemp.toString() );
return Subst( PTemp, 1, a, o, bMitVorbedingung );
ret = Subst( PTemp, 1, a, o, bMitVorbedingung ); //GEAENDERT PL 14-01-16
}
}
return ret; //EINGEFUEGT PL 14-01-16
}
// TV substituieren