edu.mit.csail.sdg.alloy4compiler.ast
Class Attr

java.lang.Object
  extended by edu.mit.csail.sdg.alloy4compiler.ast.Attr

public final class Attr
extends java.lang.Object

Immutable; represents attributes that can be associated with Signatures and some other AST objects.


Nested Class Summary
static class Attr.AttrType
          This class contains all possible attribute types.
 
Field Summary
static Attr ABSTRACT
          ABSTRACT; if a PrimSig is abstract, it is equal to the union of its subsigs.
static Attr BUILTIN
          BUILTIN; every builtin Sig has the BUILTIN attribute, and every non-builtin Sig does not.
static Attr ENUM
          ENUM; if a PrimSig has the ENUM attribute, it is toplevel and abstract and has only singleton children.
static Attr EXACT
          EXACT; if a SubsetSig is exact, it is equal to the union of its parents.
static Attr LONE
          LONE; if a Sig is lone, it has at most one atom.
static Attr META
          META; if a Sig has the META attribute, it means it is a META atom corresponding to some real signature or field.
static Attr ONE
          ONE; if a Sig is one, it has exactly one atom.
 Pos pos
          The position associated with this attribute.
static Attr PRIVATE
          PRIVATE; if a Sig has the PRIVATE attribute, it means its label is private within the same module.
static Attr SOME
          SOME; if a Sig is some, it has at least one atom.
static Attr SUBSET
          SUBSET; every SubsetSig has the SUBSET attribute set, and the SUBSIG attribute unset.
static Attr SUBSIG
          SUBSIG; every PrimSig (including the builtin sigs) has the SUBSIG attribute set, and the SUBSET attribute unset.
 Attr.AttrType type
          The type of this attribute.
 
Method Summary
 java.lang.String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

type

public final Attr.AttrType type
The type of this attribute.


pos

public final Pos pos
The position associated with this attribute.


ABSTRACT

public static final Attr ABSTRACT
ABSTRACT; if a PrimSig is abstract, it is equal to the union of its subsigs.


SOME

public static final Attr SOME
SOME; if a Sig is some, it has at least one atom.


ONE

public static final Attr ONE
ONE; if a Sig is one, it has exactly one atom.


LONE

public static final Attr LONE
LONE; if a Sig is lone, it has at most one atom.


EXACT

public static final Attr EXACT
EXACT; if a SubsetSig is exact, it is equal to the union of its parents.


SUBSIG

public static final Attr SUBSIG
SUBSIG; every PrimSig (including the builtin sigs) has the SUBSIG attribute set, and the SUBSET attribute unset.


SUBSET

public static final Attr SUBSET
SUBSET; every SubsetSig has the SUBSET attribute set, and the SUBSIG attribute unset.


META

public static final Attr META
META; if a Sig has the META attribute, it means it is a META atom corresponding to some real signature or field.


PRIVATE

public static final Attr PRIVATE
PRIVATE; if a Sig has the PRIVATE attribute, it means its label is private within the same module.


BUILTIN

public static final Attr BUILTIN
BUILTIN; every builtin Sig has the BUILTIN attribute, and every non-builtin Sig does not.


ENUM

public static final Attr ENUM
ENUM; if a PrimSig has the ENUM attribute, it is toplevel and abstract and has only singleton children.

Method Detail

toString

public final java.lang.String toString()

Overrides:
toString in class java.lang.Object