ARRAY_BOOLEAN_RESULT_VAR
public static final String ARRAY_BOOLEAN_RESULT_VAR
Relevant public and private literals.
ARRAY_COUNT_VAR
public static final String ARRAY_COUNT_VAR
ARRAY_DOUBLE_RESULT_VAR
public static final String ARRAY_DOUBLE_RESULT_VAR
ARRAY_INTEGER_RESULT_VAR
public static final String ARRAY_INTEGER_RESULT_VAR
ARRAY_ITER_VAR
public static final String ARRAY_ITER_VAR
ARRAY_SIZE_VAR
public static final String ARRAY_SIZE_VAR
MACRO_RETURNS_BOOLEAN_IND
public static final int MACRO_RETURNS_BOOLEAN_IND
MACRO_RETURNS_DOUBLE_IND
public static final int MACRO_RETURNS_DOUBLE_IND
MACRO_RETURNS_INTEGER_IND
public static final int MACRO_RETURNS_INTEGER_IND
MACRO_RETURN_TYPE
public static final char[] MACRO_RETURN_TYPE
MAXIMUM_ARRAY_METHOD
public static final int MAXIMUM_ARRAY_METHOD
MAXIMUM_METHOD
public static final int MAXIMUM_METHOD
MAX_VALID_MACRO_RETURNS
public static final int MAX_VALID_MACRO_RETURNS
METHOD_ANY_ARRAY
public static final int METHOD_ANY_ARRAY
METHOD_ANY_BUILTIN
public static final int METHOD_ANY_BUILTIN
METHOD_ARRAY_ALL
public static final int METHOD_ARRAY_ALL
METHOD_ARRAY_ANY
public static final int METHOD_ARRAY_ANY
METHOD_ARRAY_COUNT
public static final int METHOD_ARRAY_COUNT
METHOD_ARRAY_DIMEN
public static final int METHOD_ARRAY_DIMEN
METHOD_ARRAY_IRANGE
public static final int METHOD_ARRAY_IRANGE
METHOD_ARRAY_LOWER
public static final int METHOD_ARRAY_LOWER
METHOD_ARRAY_MAX
public static final int METHOD_ARRAY_MAX
METHOD_ARRAY_MIN
public static final int METHOD_ARRAY_MIN
METHOD_ARRAY_NEAR_EQUAL
public static final int METHOD_ARRAY_NEAR_EQUAL
METHOD_ARRAY_NONE
public static final int METHOD_ARRAY_NONE
METHOD_ARRAY_NON_DECR
public static final int METHOD_ARRAY_NON_DECR
METHOD_ARRAY_NON_INCR
public static final int METHOD_ARRAY_NON_INCR
METHOD_ARRAY_RANGE
public static final int METHOD_ARRAY_RANGE
METHOD_ARRAY_SIZE
public static final int METHOD_ARRAY_SIZE
METHOD_ARRAY_STRIDE
public static final int METHOD_ARRAY_STRIDE
METHOD_ARRAY_SUM
public static final int METHOD_ARRAY_SUM
METHOD_ARRAY_UPPER
public static final int METHOD_ARRAY_UPPER
METHOD_IRANGE
public static final int METHOD_IRANGE
METHOD_NEAR_EQUAL
public static final int METHOD_NEAR_EQUAL
METHOD_NOT_RESERVED
public static final int METHOD_NOT_RESERVED
METHOD_NUMERIC_ARRAY
public static final int METHOD_NUMERIC_ARRAY
METHOD_RANGE
public static final int METHOD_RANGE
METHOD_RELATION_BOTH
public static final int METHOD_RELATION_BOTH
METHOD_RELATION_LEFT
public static final int METHOD_RELATION_LEFT
METHOD_RELATION_NONE
public static final int METHOD_RELATION_NONE
METHOD_RELATION_RIGHT
public static final int METHOD_RELATION_RIGHT
MINIMUM_METHOD
public static final int MINIMUM_METHOD
RELATION_OP_EQUAL
public static final int RELATION_OP_EQUAL
WARNING: The following relation operators must
correspond to those found in sidlArray.h.
RELATION_OP_GREATER_EQUAL
public static final int RELATION_OP_GREATER_EQUAL
RELATION_OP_GREATER_THAN
public static final int RELATION_OP_GREATER_THAN
RELATION_OP_LESS_EQUAL
public static final int RELATION_OP_LESS_EQUAL
RELATION_OP_LESS_THAN
public static final int RELATION_OP_LESS_THAN
RELATION_OP_NOT_EQUAL
public static final int RELATION_OP_NOT_EQUAL
addArgument
public void addArgument(AssertionExpression arg)
Add the specified expression as an argument to the method call.
arg
- An assertion expression as an argument to the method call.
cExpression
public String cExpression(String epvVar,
int[] startInd)
Return the C version of the expression.
WARNING: Changes to the code generated below must match the validations
in the method that validates the semantics of the call.
- cExpression in interface AssertionExpression
getArgumentReturnTypes
public ArrayList getArgumentReturnTypes(Method meth)
Return a list of argument return type values (Integer) that correspond to
the Type class equivalents of the arguments associated with the specified
method. Each element of the ArrayList
is an
Integer
.
getArguments
public ArrayList getArguments()
Return an ArrayList
of argument expressions with each
element as a AssertionExpression
.
getArrayIterMacros
public ArrayList getArrayIterMacros(String epvVar,
int[] startInd)
Return the list of array iteration macros, if any.
WARNING: Changes to the code generated below must match the validations
in the method that validates the semantics of the call.
ASSUMPTION: None of the standard arguments to these macros has a macro
return type associated with it. That is, only the result that is
appended to the macros has the relevant index!
- getArrayIterMacros in interface AssertionExpression
getMethodName
public String getMethodName()
Return the name of the method call.
getNumArrayIterMacrosByType
public int getNumArrayIterMacrosByType(char type)
Returns the number of macros supported by this assertion of the
specified type. Valid types are MACRO_RETURN*.
- getNumArrayIterMacrosByType in interface AssertionExpression
hasCompatibleArgumentTypes
public boolean hasCompatibleArgumentTypes(ArrayList list)
throws AssertionException
Return TRUE if the specified argument type list is compatible with
the arguments in this call; otherwise, return FALSE.
AssertionException
- The exception is raised if there is a problem with any of the
argument return types (e.g., return type not yet determined).
hasMethodCall
public boolean hasMethodCall()
Return TRUE if the expression is, or has, at least one method call;
otherwise, return FALSE. In this case, this expression is a method
call so it always returns TRUE. Note that this method assumes there
is an associated method that is valid and is being invoked correctly.
- hasMethodCall in interface AssertionExpression
hasPure
public boolean hasPure()
Return TRUE if the expression is, or has, PURE clause; otherwise,
return FALSE. In this case, a PURE clause that shows up within the
method call would be a semantic error so FALSE is always returned.
- hasPure in interface AssertionExpression
hasReservedMethod
public boolean hasReservedMethod(int type)
Return TRUE if the expression is, or has, the specified reserved method;
otherwise, return FALSE. To facilitate checking, the following options
for type can also be used to check if the method is one of many:
METHOD_ANY_BUILTIN TRUE for any reserved method
METHOD_NUMERIC_ARRAY TRUE for any reserved, numeric array method
METHOD_ANY_ARRAY TRUE for any reserved array method
- hasReservedMethod in interface AssertionExpression
hasResult
public boolean hasResult()
Return TRUE if the expression contains RESULT; otherwise, return FALSE.
- hasResult in interface AssertionExpression
hasUnreservedMethod
public boolean hasUnreservedMethod(boolean any)
Return TRUE if the method is any unreserved method (when any is TRUE)
or it is an unreserved method with a throws clause (if any is FALSE);
otherwise, return FALSE.
- hasUnreservedMethod in interface AssertionExpression
isArrayMacroMethod
public boolean isArrayMacroMethod()
Return TRUE if the method is one of the special array macro ones;
otherwise, return FALSE.
isArrayMethod
public boolean isArrayMethod()
Return TRUE if the method is one of the special array ones; otherwise,
return FALSE.
isBuiltinNumericArrayMethod
public boolean isBuiltinNumericArrayMethod()
Return TRUE if the method is one of the special built-in ones whose
array argument(s) must contain numeric values only.
isBuiltinRelationMethod
public boolean isBuiltinRelationMethod()
Return TRUE if the method is one of the special built-in ones whose
only argument should be a relation; otherwise, return FALSE.
isStatic
public boolean isStatic()
Return TRUE if the (unreserved) method is static; otherwise, return
FALSE.
WARNING: This is not known until _after_ the method has been validated!
requiresExtendableContext
public boolean requiresExtendableContext()
Return TRUE if extendable context is required to validate the expression;
otherwise, return FALSE.
- requiresExtendableContext in interface AssertionExpression
requiresMethodContext
public boolean requiresMethodContext()
Return TRUE if method context is required to validate the expression;
otherwise, return FALSE. This is separate from and in addition to the
extendable context.
- requiresMethodContext in interface AssertionExpression
throwsExceptions
public boolean throwsExceptions()
Return TRUE if the (unreserved) method throws exceptions; otherwise,
return FALSE.
WARNING: This is not known until _after_ the method has been validated!
toString
public String toString()
Return the stringified version of the expression (in SIDL form).
- toString in interface AssertionExpression
validateSemantics
protected void validateSemantics(Extendable ext,
Method m)
throws AssertionException
Validate the expression semantics, if necessary, within the context of the
extendable and optional method.
WARNING: Changes to the validations, such as number or type of arguments,
must also be reflected in the method that generates the code.
- validateSemantics in interface AssertionExpression
ext
- The interface or class that owns this expression.m
- The method that owns this expression.