From 608d73452a28c89d6f38ae204ef690e289cb8ec9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Pl=C3=BCmicke?= Date: Wed, 25 Jul 2018 00:53:40 +0200 Subject: [PATCH] new file: src/de/dhbwstuttgart/typeinference/unify/TypeUnify2Task.java --- .../typeinference/unify/TypeUnify2Task.java | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 src/de/dhbwstuttgart/typeinference/unify/TypeUnify2Task.java 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; + } +}