diff --git a/src/de/dhbwstuttgart/typeinference/unify/TypeUnify2Task.java b/src/de/dhbwstuttgart/typeinference/unify/TypeUnify2Task.java new file mode 100644 index 00000000..13f89ab0 --- /dev/null +++ b/src/de/dhbwstuttgart/typeinference/unify/TypeUnify2Task.java @@ -0,0 +1,25 @@ +package de.dhbwstuttgart.typeinference.unify; + +import java.io.FileWriter; +import java.util.HashSet; +import java.util.Set; + +import de.dhbwstuttgart.typeinference.unify.interfaces.IFiniteClosure; +import de.dhbwstuttgart.typeinference.unify.model.UnifyPair; + +public class TypeUnify2Task extends TypeUnifyTask { + + Set> setToFlatten; + + public TypeUnify2Task(Set> setToFlatten, Set eq, IFiniteClosure fc, boolean parallel, FileWriter logFile, Boolean log) { + super(eq, fc, parallel, logFile, log); + this.setToFlatten = setToFlatten; + } + + @Override + protected Set> compute() { + Set> res = unify2(setToFlatten, eq, fc, parallel); + if (isUndefinedPairSetSet(res)) { return new HashSet<>(); } + else return res; + } +}