Class Sig.SubsetSig

  extended by
      extended by
          extended by
              extended by
Enclosing class:

public static final class Sig.SubsetSig
extends Sig

Mutable; reresents a subset signature.

Nested Class Summary
Nested classes/interfaces inherited from class
Sig.Field, Sig.PrimSig, Sig.SubsetSig
Field Summary
 boolean exact
          If true, then this sig is EXACTLY equal to the union of its parents.
 ConstList<Sig> parents
          The list of Sig that it is a subset of; this list is never empty.
Fields inherited from class
attributes, builtin, decl, GHOST, isAbstract, isEnum, isLone, isMeta, isOne, isPrivate, isSome, isSubset, isSubsig, label, NONE, SEQIDX, SIGINT, STRING, UNIV
Fields inherited from class
ambiguous, closingBracket, errors, mult, pos, weight
Constructor Summary
Sig.SubsetSig(java.lang.String label, java.util.Collection<Sig> parents, Attr... attributes)
          Constructs a subset sig.
Method Summary
 boolean isSameOrDescendentOf(Sig that)
          Returns true iff "this is equal or subtype of that"
Methods inherited from class
addDefinedField, addFact, addField, addTrickyField, getDepth, getFacts, getFieldDecls, getFields, getHTML, getSubnodes, isSame, isTopLevel, resolve, span, toString, toString
Methods inherited from class
and, any_arrow_lone, any_arrow_one, any_arrow_some, cardinality, cast2int, cast2sigint, closure, comprehensionOver, deNOP, div, domain, equal, equals, findAllFunctions, forAll, forLone, forNo, forOne, forSome, gt, gte, hashCode, hasVar, iff, iminus, implies, in, intersect, iplus, isSeq_arrow_lone, ite, join, lone_arrow_any, lone_arrow_lone, lone_arrow_one, lone_arrow_some, lone, loneOf, loneOf, lt, lte, minus, mul, mult, no, not, one_arrow_any, one_arrow_lone, one_arrow_one, one_arrow_some, one, oneOf, oneOf, or, override, plus, pos, product, range, reflexiveClosure, rem, resolve_as_formula, resolve_as_int, resolve_as_set, setOf, setOf, sha, shl, shr, some_arrow_any, some_arrow_lone, some_arrow_one, some_arrow_some, some, someOf, someOf, sumOver, transpose, type, typecheck_as_formula, typecheck_as_int, typecheck_as_set
Methods inherited from class
make, make, make, make, showAsTree
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail


public final ConstList<Sig> parents
The list of Sig that it is a subset of; this list is never empty.


public final boolean exact
If true, then this sig is EXACTLY equal to the union of its parents.

Constructor Detail


public Sig.SubsetSig(java.lang.String label,
                     java.util.Collection<Sig> parents,
                     Attr... attributes)
              throws Err
Constructs a subset sig.

label - - the name of this sig (it does not need to be unique)
parents - - the list of parents (if this list is null or empty, we assume the caller means UNIV)
attributes - - the list of optional attributes such as EXACT, SUBSET, LONE, ONE, SOME, PRIVATE, or META
ErrorSyntax - if the signature has two or more multiplicities
ErrorType - if parents only contains NONE
Method Detail


public boolean isSameOrDescendentOf(Sig that)
Returns true iff "this is equal or subtype of that"

Specified by:
isSameOrDescendentOf in class Sig