| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.mit.csail.sdg.alloy4compiler.ast.Browsable
edu.mit.csail.sdg.alloy4compiler.ast.Expr
edu.mit.csail.sdg.alloy4compiler.ast.ExprHasName
edu.mit.csail.sdg.alloy4compiler.ast.ExprVar
public final class ExprVar
Immutable; represents a LET or QUANTIFICATION variable in the AST.
Invariant: type!=EMPTY => (type==expr.type && !expr.ambiguous)
| Field Summary | 
|---|
| Fields inherited from class edu.mit.csail.sdg.alloy4compiler.ast.ExprHasName | 
|---|
| label | 
| Fields inherited from class edu.mit.csail.sdg.alloy4compiler.ast.Expr | 
|---|
| ambiguous, closingBracket, errors, mult, pos, weight | 
| Method Summary | |
|---|---|
|  java.lang.String | getHTML()Returns the description (as HTML) to show for this node. | 
|  java.util.List<? extends Browsable> | getSubnodes()Returns a list of subnodes for this node. | 
| static ExprVar | make(Pos pos,
     java.lang.String label)Constructs an ExprVar variable with the EMPTY type | 
| static ExprVar | make(Pos pos,
     java.lang.String label,
     Type type)Constructs an ExprVar variable with the given type | 
|  Expr | resolve(Type p,
        java.util.Collection<ErrorWarning> warns)Resolves this expression if ambiguous. | 
|  void | toString(java.lang.StringBuilder out,
         int indent)Print a textual description of it and all subnodes to a StringBuilder, with the given level of indentation. | 
| Methods inherited from class edu.mit.csail.sdg.alloy4compiler.ast.ExprHasName | 
|---|
| getDepth, isSame, span | 
| 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, toString, 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 | 
| Method Detail | 
|---|
public void toString(java.lang.StringBuilder out,
                     int indent)
toString in class Expr
public static ExprVar make(Pos pos,
                           java.lang.String label)
pos - - the original position in the source file (can be null if unknown)label - - the label for this variable (it is only used for pretty-printing and does not have to be unique)
public static ExprVar make(Pos pos,
                           java.lang.String label,
                           Type type)
pos - - the original position in the source file (can be null if unknown)label - - the label for this variable (it is only used for pretty-printing and does not have to be unique)type - - the type
public Expr resolve(Type p,
                    java.util.Collection<ErrorWarning> warns)
On success: the return value will be well-typed and unambiguous
On failure: the return value's "errors" list will be nonempty
If we detect any type warnings, we will add the type warnings to the "warnings" collection.
resolve in class Exprwarns - - the list that will receive any warning we generate; can be null if we wish to ignore warningspublic java.lang.String getHTML()
getHTML in class Browsablepublic java.util.List<? extends Browsable> getSubnodes()
getSubnodes in class Browsable| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||