edu.mit.csail.sdg.alloy4compiler.ast
Class Sig.SubsetSig

java.lang.Object
  extended by edu.mit.csail.sdg.alloy4compiler.ast.Browsable
      extended by edu.mit.csail.sdg.alloy4compiler.ast.Expr
          extended by edu.mit.csail.sdg.alloy4compiler.ast.Sig
              extended by edu.mit.csail.sdg.alloy4compiler.ast.Sig.SubsetSig
Enclosing class:
Sig

public static final class Sig.SubsetSig
extends Sig

Mutable; reresents a subset signature.


Nested Class Summary
 
Nested classes/interfaces inherited from class edu.mit.csail.sdg.alloy4compiler.ast.Sig
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 edu.mit.csail.sdg.alloy4compiler.ast.Sig
attributes, builtin, decl, GHOST, isAbstract, isEnum, isLone, isMeta, isOne, isPrivate, isSome, isSubset, isSubsig, label, NONE, SEQIDX, SIGINT, STRING, UNIV
 
Fields inherited from class edu.mit.csail.sdg.alloy4compiler.ast.Expr
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 edu.mit.csail.sdg.alloy4compiler.ast.Sig
addDefinedField, addFact, addField, addTrickyField, getDepth, getFacts, getFieldDecls, getFields, getHTML, getSubnodes, isSame, isTopLevel, resolve, span, toString, toString
 
Methods inherited from class edu.mit.csail.sdg.alloy4compiler.ast.Expr
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 edu.mit.csail.sdg.alloy4compiler.ast.Browsable
make, make, make, make, showAsTree
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

parents

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


exact

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

Constructor Detail

Sig.SubsetSig

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

Parameters:
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
Throws:
ErrorSyntax - if the signature has two or more multiplicities
ErrorType - if parents only contains NONE
Err
Method Detail

isSameOrDescendentOf

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

Specified by:
isSameOrDescendentOf in class Sig