changed unifyTest to use UnifyResultModelParallel

This commit is contained in:
NoName11234 2024-02-19 19:49:01 +01:00
parent 63f854d4ee
commit f8efe361e9

View File

@ -13,6 +13,7 @@ import de.dhbwstuttgart.typeinference.constraints.Pair;
import de.dhbwstuttgart.typeinference.result.ResultSet; import de.dhbwstuttgart.typeinference.result.ResultSet;
import de.dhbwstuttgart.typeinference.unify.TypeUnify; import de.dhbwstuttgart.typeinference.unify.TypeUnify;
import de.dhbwstuttgart.typeinference.unify.UnifyResultModel; import de.dhbwstuttgart.typeinference.unify.UnifyResultModel;
import de.dhbwstuttgart.typeinference.unify.UnifyResultModelParallel;
import de.dhbwstuttgart.typeinference.unify.UnifyTaskModel; import de.dhbwstuttgart.typeinference.unify.UnifyTaskModel;
import de.dhbwstuttgart.typeinference.unify.interfaces.IFiniteClosure; import de.dhbwstuttgart.typeinference.unify.interfaces.IFiniteClosure;
import de.dhbwstuttgart.typeinference.unify.model.*; import de.dhbwstuttgart.typeinference.unify.model.*;
@ -91,7 +92,7 @@ public class UnifyTest {
TypeUnify unifyAlgo = new TypeUnify(); TypeUnify unifyAlgo = new TypeUnify();
ConstraintSet<Pair> cons = new ConstraintSet<>(); ConstraintSet<Pair> cons = new ConstraintSet<>();
UnifyResultModel urm = new UnifyResultModel(cons, finiteClosure); UnifyResultModelParallel urm = new UnifyResultModelParallel(cons, finiteClosure);
UnifyTaskModel tasks = new UnifyTaskModel(); UnifyTaskModel tasks = new UnifyTaskModel();
Set<Set<UnifyPair>> solution = unifyAlgo.unify(undConstraints, oderConstraints, finiteClosure, new NullWriter(), false, urm, tasks); Set<Set<UnifyPair>> solution = unifyAlgo.unify(undConstraints, oderConstraints, finiteClosure, new NullWriter(), false, urm, tasks);
System.out.println(solution.size()); System.out.println(solution.size());