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

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.ExprHasName
Direct Known Subclasses:
ExprVar, Sig.Field

public abstract class ExprHasName
extends Expr

Immutable; represents a named entity (such as a Field, or a LET or QUANTIFICATION variable, or a function/predicate parameter).


Field Summary
 java.lang.String label
          The label associated with this object; it's used for pretty-printing and does not have to be unique.
 
Fields inherited from class edu.mit.csail.sdg.alloy4compiler.ast.Expr
ambiguous, closingBracket, errors, mult, pos, weight
 
Method Summary
 int getDepth()
          Returns the height of the abstract syntax tree starting from this node.
 boolean isSame(Expr obj)
          Returns true if we can determine the two expressions are equivalent; may sometimes return false.
 Pos span()
          Returns a Pos object representing the entire span of this Expr and all its subexpressions.
 
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, resolve, setOf, setOf, sha, shl, shr, some_arrow_any, some_arrow_lone, some_arrow_one, some_arrow_some, some, someOf, someOf, sumOver, toString, toString, transpose, type, typecheck_as_formula, typecheck_as_int, typecheck_as_set
 
Methods inherited from class edu.mit.csail.sdg.alloy4compiler.ast.Browsable
getHTML, getSubnodes, make, make, make, make, showAsTree
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

label

public final java.lang.String label
The label associated with this object; it's used for pretty-printing and does not have to be unique.

Method Detail

isSame

public final boolean isSame(Expr obj)
Returns true if we can determine the two expressions are equivalent; may sometimes return false.

Overrides:
isSame in class Expr

span

public final Pos span()
Returns a Pos object representing the entire span of this Expr and all its subexpressions.

Overrides:
span in class Browsable

getDepth

public final int getDepth()
Returns the height of the abstract syntax tree starting from this node.

Specified by:
getDepth in class Expr