new file: src/de/dhbwstuttgart/typeinference/unify/TypeUnify2Task.java

This commit is contained in:
Martin Plümicke 2018-07-25 00:53:40 +02:00
parent 421169a72d
commit 608d73452a

View File

@ -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<Set<UnifyPair>> setToFlatten;
public TypeUnify2Task(Set<Set<UnifyPair>> setToFlatten, Set<UnifyPair> eq, IFiniteClosure fc, boolean parallel, FileWriter logFile, Boolean log) {
super(eq, fc, parallel, logFile, log);
this.setToFlatten = setToFlatten;
}
@Override
protected Set<Set<UnifyPair>> compute() {
Set<Set<UnifyPair>> res = unify2(setToFlatten, eq, fc, parallel);
if (isUndefinedPairSetSet(res)) { return new HashSet<>(); }
else return res;
}
}