diff --git a/src/de/dhbwstuttgart/typeinference/unify/interfaces/IFiniteClosure.java b/src/de/dhbwstuttgart/typeinference/unify/interfaces/IFiniteClosure.java index 0601d70f..3e8d8d7d 100644 --- a/src/de/dhbwstuttgart/typeinference/unify/interfaces/IFiniteClosure.java +++ b/src/de/dhbwstuttgart/typeinference/unify/interfaces/IFiniteClosure.java @@ -3,11 +3,11 @@ package de.dhbwstuttgart.typeinference.unify.interfaces; import java.util.Optional; import java.util.Set; -import de.dhbwstuttgart.typinference.unify.model.ExtendsType; -import de.dhbwstuttgart.typinference.unify.model.PlaceholderType; -import de.dhbwstuttgart.typinference.unify.model.SimpleType; -import de.dhbwstuttgart.typinference.unify.model.SuperType; -import de.dhbwstuttgart.typinference.unify.model.Type; +import de.dhbwstuttgart.typeinference.unify.model.ExtendsType; +import de.dhbwstuttgart.typeinference.unify.model.PlaceholderType; +import de.dhbwstuttgart.typeinference.unify.model.SimpleType; +import de.dhbwstuttgart.typeinference.unify.model.SuperType; +import de.dhbwstuttgart.typeinference.unify.model.Type; public interface IFiniteClosure { diff --git a/src/de/dhbwstuttgart/typeinference/unify/interfaces/IRuleSet.java b/src/de/dhbwstuttgart/typeinference/unify/interfaces/IRuleSet.java index c997b4ff..d2a95f3d 100644 --- a/src/de/dhbwstuttgart/typeinference/unify/interfaces/IRuleSet.java +++ b/src/de/dhbwstuttgart/typeinference/unify/interfaces/IRuleSet.java @@ -3,8 +3,8 @@ package de.dhbwstuttgart.typeinference.unify.interfaces; import java.util.Optional; import java.util.Set; +import de.dhbwstuttgart.typeinference.unify.model.MPair; import de.dhbwstuttgart.typeinference.unifynew.Unifier; -import de.dhbwstuttgart.typinference.unify.model.MPair; public interface IRuleSet { diff --git a/src/de/dhbwstuttgart/typeinference/unify/interfaces/ITypeMapper.java b/src/de/dhbwstuttgart/typeinference/unify/interfaces/ITypeMapper.java deleted file mode 100644 index 85efc20a..00000000 --- a/src/de/dhbwstuttgart/typeinference/unify/interfaces/ITypeMapper.java +++ /dev/null @@ -1,7 +0,0 @@ -package de.dhbwstuttgart.typeinference.unify.interfaces; - -import de.dhbwstuttgart.typeinference.Menge; - -public interface ITypeMapper { - -} diff --git a/src/de/dhbwstuttgart/typeinference/unify/interfaces/IUnify.java b/src/de/dhbwstuttgart/typeinference/unify/interfaces/IUnify.java index 1f73b550..05b7e8da 100644 --- a/src/de/dhbwstuttgart/typeinference/unify/interfaces/IUnify.java +++ b/src/de/dhbwstuttgart/typeinference/unify/interfaces/IUnify.java @@ -3,8 +3,8 @@ package de.dhbwstuttgart.typeinference.unify.interfaces; import java.util.Optional; import java.util.Set; +import de.dhbwstuttgart.typeinference.unify.model.MPair; import de.dhbwstuttgart.typeinference.unifynew.Unifier; -import de.dhbwstuttgart.typinference.unify.model.MPair; /** * Standard unification algorithm (e.g. Robinson, Paterson-Wegman, Martelli-Montanari, Ruzicka-Privara or Suciu) diff --git a/src/de/dhbwstuttgart/typinference/unify/model/ExtendsType.java b/src/de/dhbwstuttgart/typeinference/unify/model/ExtendsType.java similarity index 91% rename from src/de/dhbwstuttgart/typinference/unify/model/ExtendsType.java rename to src/de/dhbwstuttgart/typeinference/unify/model/ExtendsType.java index 2b0facaf..4eceb240 100644 --- a/src/de/dhbwstuttgart/typinference/unify/model/ExtendsType.java +++ b/src/de/dhbwstuttgart/typeinference/unify/model/ExtendsType.java @@ -1,4 +1,4 @@ -package de.dhbwstuttgart.typinference.unify.model; +package de.dhbwstuttgart.typeinference.unify.model; import java.util.Set; diff --git a/src/de/dhbwstuttgart/typinference/unify/model/FiniteClosure.java b/src/de/dhbwstuttgart/typeinference/unify/model/FiniteClosure.java similarity index 94% rename from src/de/dhbwstuttgart/typinference/unify/model/FiniteClosure.java rename to src/de/dhbwstuttgart/typeinference/unify/model/FiniteClosure.java index ae36f465..9899bef4 100644 --- a/src/de/dhbwstuttgart/typinference/unify/model/FiniteClosure.java +++ b/src/de/dhbwstuttgart/typeinference/unify/model/FiniteClosure.java @@ -1,4 +1,4 @@ -package de.dhbwstuttgart.typinference.unify.model; +package de.dhbwstuttgart.typeinference.unify.model; import java.util.HashMap; import java.util.HashSet; @@ -6,7 +6,7 @@ import java.util.Optional; import java.util.Set; import de.dhbwstuttgart.typeinference.unify.interfaces.IFiniteClosure; -import de.dhbwstuttgart.typinference.unify.model.MPair.PairOperator; +import de.dhbwstuttgart.typeinference.unify.model.MPair.PairOperator; public class FiniteClosure implements IFiniteClosure { diff --git a/src/de/dhbwstuttgart/typinference/unify/model/MPair.java b/src/de/dhbwstuttgart/typeinference/unify/model/MPair.java similarity index 92% rename from src/de/dhbwstuttgart/typinference/unify/model/MPair.java rename to src/de/dhbwstuttgart/typeinference/unify/model/MPair.java index 9a76f2a9..6b740c46 100644 --- a/src/de/dhbwstuttgart/typinference/unify/model/MPair.java +++ b/src/de/dhbwstuttgart/typeinference/unify/model/MPair.java @@ -1,4 +1,4 @@ -package de.dhbwstuttgart.typinference.unify.model; +package de.dhbwstuttgart.typeinference.unify.model; public class MPair { diff --git a/src/de/dhbwstuttgart/typinference/unify/model/Node.java b/src/de/dhbwstuttgart/typeinference/unify/model/Node.java similarity index 91% rename from src/de/dhbwstuttgart/typinference/unify/model/Node.java rename to src/de/dhbwstuttgart/typeinference/unify/model/Node.java index e42a2608..7010ec32 100644 --- a/src/de/dhbwstuttgart/typinference/unify/model/Node.java +++ b/src/de/dhbwstuttgart/typeinference/unify/model/Node.java @@ -1,4 +1,4 @@ -package de.dhbwstuttgart.typinference.unify.model; +package de.dhbwstuttgart.typeinference.unify.model; import java.util.HashSet; import java.util.Set; diff --git a/src/de/dhbwstuttgart/typinference/unify/model/PlaceholderType.java b/src/de/dhbwstuttgart/typeinference/unify/model/PlaceholderType.java similarity index 89% rename from src/de/dhbwstuttgart/typinference/unify/model/PlaceholderType.java rename to src/de/dhbwstuttgart/typeinference/unify/model/PlaceholderType.java index 7b7503ee..12ecac01 100644 --- a/src/de/dhbwstuttgart/typinference/unify/model/PlaceholderType.java +++ b/src/de/dhbwstuttgart/typeinference/unify/model/PlaceholderType.java @@ -1,4 +1,4 @@ -package de.dhbwstuttgart.typinference.unify.model; +package de.dhbwstuttgart.typeinference.unify.model; import java.util.Set; diff --git a/src/de/dhbwstuttgart/typinference/unify/model/SimpleType.java b/src/de/dhbwstuttgart/typeinference/unify/model/SimpleType.java similarity index 91% rename from src/de/dhbwstuttgart/typinference/unify/model/SimpleType.java rename to src/de/dhbwstuttgart/typeinference/unify/model/SimpleType.java index 8e9e8a3f..301d5d91 100644 --- a/src/de/dhbwstuttgart/typinference/unify/model/SimpleType.java +++ b/src/de/dhbwstuttgart/typeinference/unify/model/SimpleType.java @@ -1,4 +1,4 @@ -package de.dhbwstuttgart.typinference.unify.model; +package de.dhbwstuttgart.typeinference.unify.model; import java.util.Set; diff --git a/src/de/dhbwstuttgart/typinference/unify/model/SuperType.java b/src/de/dhbwstuttgart/typeinference/unify/model/SuperType.java similarity index 91% rename from src/de/dhbwstuttgart/typinference/unify/model/SuperType.java rename to src/de/dhbwstuttgart/typeinference/unify/model/SuperType.java index 15c432d2..5cc8ad63 100644 --- a/src/de/dhbwstuttgart/typinference/unify/model/SuperType.java +++ b/src/de/dhbwstuttgart/typeinference/unify/model/SuperType.java @@ -1,4 +1,4 @@ -package de.dhbwstuttgart.typinference.unify.model; +package de.dhbwstuttgart.typeinference.unify.model; import java.util.Set; diff --git a/src/de/dhbwstuttgart/typinference/unify/model/Type.java b/src/de/dhbwstuttgart/typeinference/unify/model/Type.java similarity index 90% rename from src/de/dhbwstuttgart/typinference/unify/model/Type.java rename to src/de/dhbwstuttgart/typeinference/unify/model/Type.java index a9e94862..137541e6 100644 --- a/src/de/dhbwstuttgart/typinference/unify/model/Type.java +++ b/src/de/dhbwstuttgart/typeinference/unify/model/Type.java @@ -1,4 +1,4 @@ -package de.dhbwstuttgart.typinference.unify.model; +package de.dhbwstuttgart.typeinference.unify.model; import java.util.Set; diff --git a/src/de/dhbwstuttgart/typinference/unify/model/TypeParams.java b/src/de/dhbwstuttgart/typeinference/unify/model/TypeParams.java similarity index 92% rename from src/de/dhbwstuttgart/typinference/unify/model/TypeParams.java rename to src/de/dhbwstuttgart/typeinference/unify/model/TypeParams.java index d723395d..d56a80b0 100644 --- a/src/de/dhbwstuttgart/typinference/unify/model/TypeParams.java +++ b/src/de/dhbwstuttgart/typeinference/unify/model/TypeParams.java @@ -1,4 +1,4 @@ -package de.dhbwstuttgart.typinference.unify.model; +package de.dhbwstuttgart.typeinference.unify.model; import java.util.Arrays; import java.util.Iterator; diff --git a/src/de/dhbwstuttgart/typeinference/unifynew/Mapping.java b/src/de/dhbwstuttgart/typeinference/unifynew/Mapping.java index d21c5b60..97c2823f 100644 --- a/src/de/dhbwstuttgart/typeinference/unifynew/Mapping.java +++ b/src/de/dhbwstuttgart/typeinference/unifynew/Mapping.java @@ -2,68 +2,90 @@ package de.dhbwstuttgart.typeinference.unifynew; import java.util.HashMap; import java.util.HashSet; -import java.util.Iterator; +import java.util.Optional; import java.util.Set; +import java.util.stream.Collectors; -import de.dhbwstuttgart.syntaxtree.type.ExtendsWildcardType; -import de.dhbwstuttgart.syntaxtree.type.FunN; -import de.dhbwstuttgart.syntaxtree.type.RefType; -import de.dhbwstuttgart.syntaxtree.type.SuperWildcardType; -import de.dhbwstuttgart.syntaxtree.type.Type; -import de.dhbwstuttgart.syntaxtree.type.TypePlaceholder; -import de.dhbwstuttgart.typeinference.exceptions.NotImplementedException; - -/** - * First three bits indicate the meta type: - * 000b = 0 = Simpletype - * 001b = 1 = Extends - * 010b = 2 = Super - * 011b = 3 = Type Placeholder - * 100b = 4 = Function - * - * @author DH10STF - * - */ public class Mapping { - private static final int ST_MASK = 0; - private static final int EXTENDS_MASK = 536870912; - private static final int SUPER_MASK = 1073741824; - private static final int TPH_MASK = 1610612736; - private static final int FUN_MASK = -2147483648; + private HashMap backwardMap = new HashMap<>(); + private HashMap forwardMap = new HashMap<>(); + private Set irreversible = new HashSet<>(); - private static HashMap mapping; - - public Set createMapping(Iterable types) { - mapping = new HashMap<>(); - - Iterator iterator = types.iterator(); - while(iterator.hasNext() && mapping.size() <= 536870911) - createMapping(iterator.next()); - - return mapping.keySet(); + public Mapping(Set types) { + for(de.dhbwstuttgart.syntaxtree.type.Type t : types) { + // TODO + } } - private void createMapping(Type type) { - /*if(type instanceof RefType) { - Set params = ((RefType) type).get_ParaList(); - params.stream().forEach(x -> createMapping(x)); + public de.dhbwstuttgart.typeinference.unify.model.Type map(de.dhbwstuttgart.syntaxtree.type.Type type) { + return forwardMap.get(type); + } + + public de.dhbwstuttgart.typeinference.unify.model.MPair map(de.dhbwstuttgart.typeinference.Pair pair) { + return new de.dhbwstuttgart.typeinference.unify.model.MPair(forwardMap.get(pair.TA1), forwardMap.get(pair.TA2), mapOp(pair.GetOperator())); + } + + public Set mapTypeSet(Set types) { + return types.stream().map(this::map).collect(Collectors.toCollection(HashSet::new)); + } + + public Set mapPairSet(Set pairs) { + return pairs.stream().map(this::map).collect(Collectors.toCollection(HashSet::new)); + } + + public Optional unmap(de.dhbwstuttgart.typeinference.unify.model.Type type) { + return irreversible.contains(type) ? Optional.of(backwardMap.get(type)) : Optional.empty(); + } + + public Optional unmap(de.dhbwstuttgart.typeinference.unify.model.MPair mpair) { + de.dhbwstuttgart.typeinference.unify.model.Type lhs = mpair.getLhsType(); + de.dhbwstuttgart.typeinference.unify.model.Type rhs = mpair.getRhsType(); + + if(irreversible.contains(lhs) || irreversible.contains(rhs)) + return Optional.empty(); + return Optional.of(new de.dhbwstuttgart.typeinference.Pair(backwardMap.get(lhs), backwardMap.get(rhs), unmapOp(mpair.getPairOp()))); + } + + public Optional> unmapTypeSet(Set types) { + Set result = types.stream().map(this::unmap).filter(x -> x.isPresent()).map(x -> x.get()).collect(Collectors.toCollection(HashSet::new)); + return result.size() == types.size() ? Optional.of(result) : Optional.empty(); + } + + public Optional> unmapPairSet(Set pairs) { + Set result = pairs.stream().map(this::unmap).filter(x -> x.isPresent()).map(x -> x.get()).collect(Collectors.toCollection(HashSet::new)); + return result.size() == pairs.size() ? Optional.of(result) : Optional.empty(); + } + + private de.dhbwstuttgart.typeinference.unify.model.MPair.PairOperator mapOp(de.dhbwstuttgart.typeinference.Pair.PairOperator op) { + /* + * TODO + * Warum hat der PairOp nur drei Werte? Wie wird SMALLERDOTWC etc im anderen Pair geregelt? + */ + + switch(op) { + case Equal: + return de.dhbwstuttgart.typeinference.unify.model.MPair.PairOperator.EQUALS; + case Smaller: + return de.dhbwstuttgart.typeinference.unify.model.MPair.PairOperator.SMALLER; + case SmallerExtends: + return de.dhbwstuttgart.typeinference.unify.model.MPair.PairOperator.SMALLERDOT; + default: + return de.dhbwstuttgart.typeinference.unify.model.MPair.PairOperator.EQUALS; + } + } + + private de.dhbwstuttgart.typeinference.Pair.PairOperator unmapOp(de.dhbwstuttgart.typeinference.unify.model.MPair.PairOperator op) { + switch(op) { + case EQUALS: + return de.dhbwstuttgart.typeinference.Pair.PairOperator.Equal; + case SMALLER: + return de.dhbwstuttgart.typeinference.Pair.PairOperator.Smaller; + case SMALLERDOT: + return de.dhbwstuttgart.typeinference.Pair.PairOperator.SmallerExtends; + default: + return de.dhbwstuttgart.typeinference.Pair.PairOperator.Equal; } - */ - int typeId = mapping.size(); - - if(type instanceof RefType) - typeId |= ST_MASK; - else if(type instanceof SuperWildcardType) - typeId |= SUPER_MASK; - else if(type instanceof ExtendsWildcardType) - typeId |= EXTENDS_MASK; - else if(type instanceof TypePlaceholder) - typeId |= TPH_MASK; - else if(type instanceof FunN) - typeId |= FUN_MASK; - - //mapping.put(new MType()) } } diff --git a/src/de/dhbwstuttgart/typeinference/unifynew/MartelliMontanariUnify.java b/src/de/dhbwstuttgart/typeinference/unifynew/MartelliMontanariUnify.java index 0f626010..12666fe4 100644 --- a/src/de/dhbwstuttgart/typeinference/unifynew/MartelliMontanariUnify.java +++ b/src/de/dhbwstuttgart/typeinference/unifynew/MartelliMontanariUnify.java @@ -9,11 +9,11 @@ import java.util.Stack; import java.util.stream.Collectors; import de.dhbwstuttgart.typeinference.unify.interfaces.IUnify; -import de.dhbwstuttgart.typinference.unify.model.MPair; -import de.dhbwstuttgart.typinference.unify.model.MPair.PairOperator; -import de.dhbwstuttgart.typinference.unify.model.PlaceholderType; -import de.dhbwstuttgart.typinference.unify.model.Type; -import de.dhbwstuttgart.typinference.unify.model.TypeParams; +import de.dhbwstuttgart.typeinference.unify.model.MPair; +import de.dhbwstuttgart.typeinference.unify.model.PlaceholderType; +import de.dhbwstuttgart.typeinference.unify.model.Type; +import de.dhbwstuttgart.typeinference.unify.model.TypeParams; +import de.dhbwstuttgart.typeinference.unify.model.MPair.PairOperator; /** * Implementation of the Martelli-Montanari unification algorithm. diff --git a/src/de/dhbwstuttgart/typeinference/unifynew/RuleSet.java b/src/de/dhbwstuttgart/typeinference/unifynew/RuleSet.java index c401be4a..a045a9d2 100644 --- a/src/de/dhbwstuttgart/typeinference/unifynew/RuleSet.java +++ b/src/de/dhbwstuttgart/typeinference/unifynew/RuleSet.java @@ -13,14 +13,14 @@ import java.util.stream.Collectors; import junit.framework.Assert; import de.dhbwstuttgart.typeinference.unify.interfaces.IFiniteClosure; import de.dhbwstuttgart.typeinference.unify.interfaces.IRuleSet; -import de.dhbwstuttgart.typinference.unify.model.ExtendsType; -import de.dhbwstuttgart.typinference.unify.model.MPair; -import de.dhbwstuttgart.typinference.unify.model.MPair.PairOperator; -import de.dhbwstuttgart.typinference.unify.model.PlaceholderType; -import de.dhbwstuttgart.typinference.unify.model.SimpleType; -import de.dhbwstuttgart.typinference.unify.model.SuperType; -import de.dhbwstuttgart.typinference.unify.model.Type; -import de.dhbwstuttgart.typinference.unify.model.TypeParams; +import de.dhbwstuttgart.typeinference.unify.model.ExtendsType; +import de.dhbwstuttgart.typeinference.unify.model.MPair; +import de.dhbwstuttgart.typeinference.unify.model.PlaceholderType; +import de.dhbwstuttgart.typeinference.unify.model.SimpleType; +import de.dhbwstuttgart.typeinference.unify.model.SuperType; +import de.dhbwstuttgart.typeinference.unify.model.Type; +import de.dhbwstuttgart.typeinference.unify.model.TypeParams; +import de.dhbwstuttgart.typeinference.unify.model.MPair.PairOperator; public class RuleSet implements IRuleSet{ diff --git a/src/de/dhbwstuttgart/typeinference/unifynew/Unifier.java b/src/de/dhbwstuttgart/typeinference/unifynew/Unifier.java index db821905..82e8d31e 100644 --- a/src/de/dhbwstuttgart/typeinference/unifynew/Unifier.java +++ b/src/de/dhbwstuttgart/typeinference/unifynew/Unifier.java @@ -4,9 +4,9 @@ import java.util.Set; import java.util.function.Function; import java.util.stream.Collectors; -import de.dhbwstuttgart.typinference.unify.model.MPair; -import de.dhbwstuttgart.typinference.unify.model.Type; -import de.dhbwstuttgart.typinference.unify.model.TypeParams; +import de.dhbwstuttgart.typeinference.unify.model.MPair; +import de.dhbwstuttgart.typeinference.unify.model.Type; +import de.dhbwstuttgart.typeinference.unify.model.TypeParams; public class Unifier implements Function { private Type source; diff --git a/src/de/dhbwstuttgart/typeinference/unifynew/Unify.java b/src/de/dhbwstuttgart/typeinference/unifynew/Unify.java index 49efd39d..800ce767 100644 --- a/src/de/dhbwstuttgart/typeinference/unifynew/Unify.java +++ b/src/de/dhbwstuttgart/typeinference/unifynew/Unify.java @@ -16,12 +16,12 @@ import de.dhbwstuttgart.typeinference.exceptions.NotImplementedException; import de.dhbwstuttgart.typeinference.unify.interfaces.IFiniteClosure; import de.dhbwstuttgart.typeinference.unify.interfaces.IRuleSet; import de.dhbwstuttgart.typeinference.unify.interfaces.ISetOperations; -import de.dhbwstuttgart.typinference.unify.model.ExtendsType; -import de.dhbwstuttgart.typinference.unify.model.MPair; -import de.dhbwstuttgart.typinference.unify.model.MPair.PairOperator; -import de.dhbwstuttgart.typinference.unify.model.PlaceholderType; -import de.dhbwstuttgart.typinference.unify.model.SuperType; -import de.dhbwstuttgart.typinference.unify.model.Type; +import de.dhbwstuttgart.typeinference.unify.model.ExtendsType; +import de.dhbwstuttgart.typeinference.unify.model.MPair; +import de.dhbwstuttgart.typeinference.unify.model.PlaceholderType; +import de.dhbwstuttgart.typeinference.unify.model.SuperType; +import de.dhbwstuttgart.typeinference.unify.model.Type; +import de.dhbwstuttgart.typeinference.unify.model.MPair.PairOperator; /** diff --git a/test/unify/FiniteClosureBuilder.java b/test/unify/FiniteClosureBuilder.java index 815d637d..20552468 100644 --- a/test/unify/FiniteClosureBuilder.java +++ b/test/unify/FiniteClosureBuilder.java @@ -4,10 +4,10 @@ import java.util.HashSet; import java.util.Set; import de.dhbwstuttgart.typeinference.unify.interfaces.IFiniteClosure; -import de.dhbwstuttgart.typinference.unify.model.FiniteClosure; -import de.dhbwstuttgart.typinference.unify.model.MPair; -import de.dhbwstuttgart.typinference.unify.model.MPair.PairOperator; -import de.dhbwstuttgart.typinference.unify.model.Type; +import de.dhbwstuttgart.typeinference.unify.model.FiniteClosure; +import de.dhbwstuttgart.typeinference.unify.model.MPair; +import de.dhbwstuttgart.typeinference.unify.model.Type; +import de.dhbwstuttgart.typeinference.unify.model.MPair.PairOperator; public class FiniteClosureBuilder { diff --git a/test/unify/FiniteClosureTest.java b/test/unify/FiniteClosureTest.java index d3744abe..04017908 100644 --- a/test/unify/FiniteClosureTest.java +++ b/test/unify/FiniteClosureTest.java @@ -6,8 +6,8 @@ import java.util.Set; import org.junit.Test; import de.dhbwstuttgart.typeinference.unify.interfaces.IFiniteClosure; -import de.dhbwstuttgart.typinference.unify.model.MPair; -import de.dhbwstuttgart.typinference.unify.model.Type; +import de.dhbwstuttgart.typeinference.unify.model.MPair; +import de.dhbwstuttgart.typeinference.unify.model.Type; public class FiniteClosureTest { diff --git a/test/unify/RuleSetTest.java b/test/unify/RuleSetTest.java index fa08b1e7..1fe1359d 100644 --- a/test/unify/RuleSetTest.java +++ b/test/unify/RuleSetTest.java @@ -9,12 +9,12 @@ import junit.framework.Assert; import org.junit.Test; import de.dhbwstuttgart.typeinference.unify.interfaces.IRuleSet; +import de.dhbwstuttgart.typeinference.unify.model.ExtendsType; +import de.dhbwstuttgart.typeinference.unify.model.MPair; +import de.dhbwstuttgart.typeinference.unify.model.SimpleType; +import de.dhbwstuttgart.typeinference.unify.model.SuperType; +import de.dhbwstuttgart.typeinference.unify.model.MPair.PairOperator; import de.dhbwstuttgart.typeinference.unifynew.RuleSet; -import de.dhbwstuttgart.typinference.unify.model.ExtendsType; -import de.dhbwstuttgart.typinference.unify.model.MPair; -import de.dhbwstuttgart.typinference.unify.model.MPair.PairOperator; -import de.dhbwstuttgart.typinference.unify.model.SimpleType; -import de.dhbwstuttgart.typinference.unify.model.SuperType; public class RuleSetTest { diff --git a/test/unify/StandardUnifyTest.java b/test/unify/StandardUnifyTest.java index 41aff15f..33b4bde9 100644 --- a/test/unify/StandardUnifyTest.java +++ b/test/unify/StandardUnifyTest.java @@ -8,10 +8,10 @@ import junit.framework.Assert; import org.junit.Test; import de.dhbwstuttgart.typeinference.unify.interfaces.IUnify; +import de.dhbwstuttgart.typeinference.unify.model.MPair; +import de.dhbwstuttgart.typeinference.unify.model.Type; +import de.dhbwstuttgart.typeinference.unify.model.MPair.PairOperator; import de.dhbwstuttgart.typeinference.unifynew.MartelliMontanariUnify; -import de.dhbwstuttgart.typinference.unify.model.MPair; -import de.dhbwstuttgart.typinference.unify.model.Type; -import de.dhbwstuttgart.typinference.unify.model.MPair.PairOperator; public class StandardUnifyTest { diff --git a/test/unify/TypeFactory.java b/test/unify/TypeFactory.java index 46b6f7bf..7fb896ae 100644 --- a/test/unify/TypeFactory.java +++ b/test/unify/TypeFactory.java @@ -3,11 +3,11 @@ package unify; import java.util.Arrays; import java.util.stream.Collectors; -import de.dhbwstuttgart.typinference.unify.model.ExtendsType; -import de.dhbwstuttgart.typinference.unify.model.PlaceholderType; -import de.dhbwstuttgart.typinference.unify.model.SimpleType; -import de.dhbwstuttgart.typinference.unify.model.SuperType; -import de.dhbwstuttgart.typinference.unify.model.Type; +import de.dhbwstuttgart.typeinference.unify.model.ExtendsType; +import de.dhbwstuttgart.typeinference.unify.model.PlaceholderType; +import de.dhbwstuttgart.typeinference.unify.model.SimpleType; +import de.dhbwstuttgart.typeinference.unify.model.SuperType; +import de.dhbwstuttgart.typeinference.unify.model.Type; public class TypeFactory { diff --git a/test/unify/UnifyTest.java b/test/unify/UnifyTest.java index 356f6029..b1580d75 100644 --- a/test/unify/UnifyTest.java +++ b/test/unify/UnifyTest.java @@ -6,9 +6,9 @@ import java.util.Set; import org.junit.Test; import de.dhbwstuttgart.typeinference.unify.interfaces.IFiniteClosure; +import de.dhbwstuttgart.typeinference.unify.model.MPair; +import de.dhbwstuttgart.typeinference.unify.model.MPair.PairOperator; import de.dhbwstuttgart.typeinference.unifynew.Unify; -import de.dhbwstuttgart.typinference.unify.model.MPair; -import de.dhbwstuttgart.typinference.unify.model.MPair.PairOperator; public class UnifyTest extends Unify {