Compare commits
2 Commits
e191768abe
...
bb49f3db01
Author | SHA1 | Date | |
---|---|---|---|
|
bb49f3db01 | ||
|
339607ea41 |
@@ -25,7 +25,7 @@ public class TypeUnify2Task extends TypeUnifyTask {
|
||||
}
|
||||
|
||||
public TypeUnify2Task(Set<Set<UnifyPair>> setToFlatten, Set<UnifyPair> eq, List<Set<Constraint<UnifyPair>>> oderConstraints, Set<UnifyPair> nextSetElement, IFiniteClosure fc, boolean parallel, WriterActiveObjectFJP logFile, Boolean log, UnifyResultModelParallelFJP urm, Set<UnifyPair> methodSignatureConstraintUebergabe, ForkJoinPool pool, ConstraintSetRepository constraintSetRepository) {
|
||||
super(eq, oderConstraints, fc, parallel, logFile, log, urm, pool);
|
||||
super(eq, oderConstraints, fc, parallel, logFile, log, urm, pool, constraintSetRepository);
|
||||
this.setToFlatten = setToFlatten;
|
||||
this.nextSetElement = nextSetElement;
|
||||
this.methodSignatureConstraintUebergabe = methodSignatureConstraintUebergabe;
|
||||
|
@@ -1,5 +1,34 @@
|
||||
package de.dhbwstuttgart.typeinference.unify;
|
||||
|
||||
public class TypeUnifySubTask extends TypeUnifyInitialTask{
|
||||
import de.dhbwstuttgart.typeinference.constraints.Constraint;
|
||||
import de.dhbwstuttgart.typeinference.unify.interfaces.IFiniteClosure;
|
||||
import de.dhbwstuttgart.typeinference.unify.model.UnifyPair;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
|
||||
public class TypeUnifySubTask extends TypeUnifyInitialTask{
|
||||
protected Set<Set<UnifyPair>> setToFlatten;
|
||||
protected Set<UnifyPair> methodSignatureConstraintUebergabe;
|
||||
|
||||
public TypeUnifySubTask(Set<Set<UnifyPair>> setToFlatten, Set<UnifyPair> eq, List<Set<Constraint<UnifyPair>>> oderConstraints, Set<UnifyPair> nextSetElement, IFiniteClosure fc, boolean parallel, Boolean log, UnifyResultModelParallelES urm, Set<UnifyPair> methodSignatureConstraintUebergabe, ExecutorService executorService, ConstraintSetRepository constraintSetRepository) {
|
||||
super(eq, oderConstraints, fc, parallel, log, urm, executorService);
|
||||
this.setToFlatten = setToFlatten;
|
||||
this.methodSignatureConstraintUebergabe = methodSignatureConstraintUebergabe;
|
||||
this.constraintSetRepository = constraintSetRepository;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
unify2(setToFlatten, eq, oderConstraintsField, fc, parallel, methodSignatureConstraintUebergabe);
|
||||
}
|
||||
|
||||
public void closeLogFile() {
|
||||
if(parallel){
|
||||
logFile.close();
|
||||
}else{
|
||||
logFile.closeNonThreaded();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -90,7 +90,7 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
|
||||
static Writer statisticsFile = new NullWriter();
|
||||
|
||||
//Attribute für die Rekursionsoptimierung -> bereits in einem Thread berechnete Pfade kein zweites Mal berechnen
|
||||
protected volatile ConstraintSetRepository constraintSetRepository = new ConstraintSetRepository();
|
||||
protected volatile ConstraintSetRepository constraintSetRepository;
|
||||
public boolean hasBeenCalculated = false;
|
||||
|
||||
public TypeUnifyTask() {
|
||||
@@ -98,12 +98,12 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
|
||||
}
|
||||
|
||||
//statistics
|
||||
public TypeUnifyTask(Set<UnifyPair> eq, List<Set<Constraint<UnifyPair>>> oderConstraints, IFiniteClosure fc, boolean parallel, WriterActiveObjectFJP logFile, Boolean log, UnifyResultModelParallelFJP urm, ForkJoinPool pool, Writer statisticsFile) {
|
||||
this(eq, oderConstraints, fc, parallel, logFile, log, urm, pool);
|
||||
public TypeUnifyTask(Set<UnifyPair> eq, List<Set<Constraint<UnifyPair>>> oderConstraints, IFiniteClosure fc, boolean parallel, WriterActiveObjectFJP logFile, Boolean log, UnifyResultModelParallelFJP urm, ForkJoinPool pool, ConstraintSetRepository constraintSetRepository, Writer statisticsFile) {
|
||||
this(eq, oderConstraints, fc, parallel, logFile, log, urm, pool, constraintSetRepository);
|
||||
this.statisticsFile = statisticsFile;
|
||||
}
|
||||
|
||||
public TypeUnifyTask(Set<UnifyPair> eq, List<Set<Constraint<UnifyPair>>> oderConstraints, IFiniteClosure fc, boolean parallel, WriterActiveObjectFJP logFile, Boolean log, UnifyResultModelParallelFJP urm, ForkJoinPool pool) {
|
||||
public TypeUnifyTask(Set<UnifyPair> eq, List<Set<Constraint<UnifyPair>>> oderConstraints, IFiniteClosure fc, boolean parallel, WriterActiveObjectFJP logFile, Boolean log, UnifyResultModelParallelFJP urm, ForkJoinPool pool, ConstraintSetRepository constraintSetRepository) {
|
||||
this.eq = eq;
|
||||
this.oderConstraintsField = oderConstraints;
|
||||
this.fc = fc;
|
||||
@@ -111,6 +111,7 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
|
||||
this.logFile = logFile;
|
||||
this.log = log;
|
||||
this.pool = pool;
|
||||
this.constraintSetRepository = constraintSetRepository;
|
||||
|
||||
totalnoOfThread++;
|
||||
thNo = totalnoOfThread;
|
||||
|
Reference in New Issue
Block a user