public class TypeHelper
extends java.lang.Object
Constructor and Description |
---|
TypeHelper() |
Modifier and Type | Method and Description |
---|---|
static java.util.Set<TypeJudgement> |
getDirectJudgements(java.util.Set<PConstraint> constraints,
IQueryMetaContext context)
Gets direct judgements reported by constraints.
|
static java.util.Map<PVariable,java.util.Set<TypeJudgement>> |
inferUnaryTypes(java.util.Set<PConstraint> constraints,
IQueryMetaContext context)
Infers unary type information for variables, based on the given constraints.
|
static java.util.Set<TypeJudgement> |
subsumeTypes(java.util.Set<TypeJudgement> subsumableTypes,
java.util.Set<TypeJudgement> subsumingTypes,
IQueryMetaContext context)
Calculates a remainder set of types from a larger set, that are not subsumed by a given set of subsuming types.
|
static java.util.Set<TypeJudgement> |
typeClosure(java.util.Set<TypeJudgement> typesToClose,
IQueryMetaContext context)
Calculates the closure of a set of type judgements, with respect to supertyping.
|
public static java.util.Map<PVariable,java.util.Set<TypeJudgement>> inferUnaryTypes(java.util.Set<PConstraint> constraints, IQueryMetaContext context)
constraints
- the set of constraints to extract type info frompublic static java.util.Set<TypeJudgement> getDirectJudgements(java.util.Set<PConstraint> constraints, IQueryMetaContext context)
public static java.util.Set<TypeJudgement> typeClosure(java.util.Set<TypeJudgement> typesToClose, IQueryMetaContext context)
public static java.util.Set<TypeJudgement> subsumeTypes(java.util.Set<TypeJudgement> subsumableTypes, java.util.Set<TypeJudgement> subsumingTypes, IQueryMetaContext context)
subsumableTypes
- a set of types from which some may be implied by the subsuming typessubsumingTypes
- a set of types that may imply some of the subsuming types