org.overturetool.vdmj.expressions
Class StringLiteralExpression
java.lang.Object
org.overturetool.vdmj.expressions.Expression
org.overturetool.vdmj.expressions.StringLiteralExpression
- All Implemented Interfaces:
- java.io.Serializable
public class StringLiteralExpression
- extends Expression
- See Also:
- Serialized Form
| Methods inherited from class org.overturetool.vdmj.expressions.Expression |
abort, abort, concern, detail, detail, detail2, detail2, findExpression, getPreName, getProofObligations, report, warning |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
value
public final LexStringToken value
StringLiteralExpression
public StringLiteralExpression(LexStringToken value)
toString
public java.lang.String toString()
- Specified by:
toString in class Expression
typeCheck
public Type typeCheck(Environment env,
TypeList qualifiers,
NameScope scope)
- Description copied from class:
Expression
- Perform a type check of the expression. The method returns the
Type of the expression it checked, and is used
recursively across an expression tree. For example, a boolean "and"
expression would type check its left and right hand sides, check that the
types returned were both compatible with BooleanType
and then return a BooleanType (regardless of any errors).
The qualifiers argument is passed when checking function and operation
application. It contains the list of argument types of the application,
and is used to choose between overloaded function/operation definitions.
- Specified by:
typeCheck in class Expression
- Parameters:
env - The static environment for resolving names.qualifiers - The argument type qualifiers for overloading.scope - The scope of applicable names from the environment.
- Returns:
- The type of the expression.
eval
public Value eval(Context ctxt)
- Description copied from class:
Expression
- Evaluate the expression in the given runtime context. The
Value object
returned can hold any type of value (int, bool, sequences, sets etc).
- Specified by:
eval in class Expression
- Parameters:
ctxt - The context in which to evaluate the expression.
- Returns:
- The value of the expression.
kind
public java.lang.String kind()
- Description copied from class:
Expression
- A short descriptive string for the expression. An example would
be "forall" or "map comprehension".
- Specified by:
kind in class Expression
- Returns:
- A short name for the expression.
Copyright © 2009. All Rights Reserved.