Nicht mehr im Subst, sondern vorm Subst klonen

This commit is contained in:
JanUlrich 2015-07-15 11:50:10 +02:00
parent c7ffabe0f0
commit 6321f1308d

View File

@ -760,6 +760,9 @@ public class Unify
int counter = 0; int counter = 0;
for(Menge<Pair> vecpair : bigCartProductErg) for(Menge<Pair> vecpair : bigCartProductErg)
{ {
//Klone die Menge vecpair, bevor substituiert wird. Viele Paare sind doppelt referenziert und müssen vor dem Substituieren geklont werden
vecpair = vecpair.stream().map(x -> x.clone()).collect(Menge::new, Menge::add, Menge::addAll);
counter++; counter++;
if(counter > 1000){ if(counter > 1000){
System.out.println(counter + " von "+bigCartProductErg.size()); System.out.println(counter + " von "+bigCartProductErg.size());
@ -2467,18 +2470,6 @@ throws MatchException
inferencelog.debug("TV: " + a.getName()); inferencelog.debug("TV: " + a.getName());
inferencelog.debug("Bedingung: " + bMitVorbedingung); inferencelog.debug("Bedingung: " + bMitVorbedingung);
Cloner cloner = new Cloner();
cloner.setDumpClonedClasses(true);
SectionLogger log = Logger.getSectionLogger("Subst-Methode", Section.UNIFY);
Timewatch timer = Timewatch.getTimewatch();
de.dhbwstuttgart.logger.Timestamp timestamp = timer.start("Unify-Subst");
P = cloner.deepClone(P);
a = cloner.deepClone(a);
o = cloner.deepClone(o);
long time = timestamp.stop();
log.debug("Benötigte Zeit für DeepClone: "+time);
// richtiger Typ aus Pair raussuchen // richtiger Typ aus Pair raussuchen
Type T = null; Type T = null;
if( nTypnrInPair == 1 ) if( nTypnrInPair == 1 )