Packages

trait Expr[+V <: Var[V]] extends ASTNode[V]

Represents an expression. In general, every expression should be a simple expression, where the child expressions are just Vars or Consts. However, when the code is going to be transformed to human readable code (e.g., Java oder Scala), then it is possible to build up complex/nested expressions after all transformations and static analyses have been performed.

Source
Expr.scala
Linear Supertypes
ASTNode[V], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Expr
  2. ASTNode
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Abstract Value Members

  1. abstract def astID: Int

    Each type of node is assigned a different id to make it easily possible to do a switch over all nodes.

    Each type of node is assigned a different id to make it easily possible to do a switch over all nodes.

    Definition Classes
    ASTNode
  2. abstract def cTpe: ComputationalType

    The computational type of the underlying value.

    The computational type of the underlying value.

    I.e., an approximation of the type of the underlying value. It is the best type information directly available. The precision of the type information depends on the number of pre-/post-processing steps that are done.

  3. abstract def forallSubExpressions[W >: V <: Var[W]](p: (Expr[W]) => Boolean): Boolean

    Returns true if the given predicate evaluates to true for all direct subexpressions of this expression; if the evaluation should perform a recursive decent then it needs to be done by the predicate!

  4. abstract def isSideEffectFree: Boolean

    true if the statement/expression is GUARANTEED to have no externally observable effect if it is not executed.

    true if the statement/expression is GUARANTEED to have no externally observable effect if it is not executed. Sideeffect free instructions can be removed if the result of the evaluation of the expression/statement is not used. For those instructions, which may result in an exception, it has to be guaranteed that the exception is NEVER thrown. For example, a div instruction is sideeffect free if it is (statically) known that the divisor is always not equal to zero; otherwise, even if the result value is not used, the expression is not (potentially) side effect free. An array load is only side effect free if the array reference is non-null and if the index is valid.

    returns

    true if the expression is GUARENTEED to have no side effect other than wasting some CPU cycles if it is not executed.

    Definition Classes
    ASTNode
    Note

    Deeply nested expressions are not supported; i.e. an expression's sub-expressions have to be Var or Const expressions. Generally, a statements expressions have to to simple expressions too - except of the Assignment statement; in the latter case the right-expression can have references to simple expressions. Hence, in case of Assignment statements the side-effect freenes is determined by the referenced expression; in all other cases the side-effect freeness is determined directly by the statement/expression.

  5. abstract def isValueExpression: Boolean

    true if this expression is a Var.

  6. abstract def isVar: Boolean
  7. abstract def subExpr(index: Int): Expr[V]

    Returns the sub expression with the given index; if the index is wrong the result is undefined!

  8. abstract def subExprCount: Int

    The number of sub expression directly referenced by this expression.

    The number of sub expression directly referenced by this expression. A unary expression has one sub expression (the operand), a binary expression has two and a method has as many as explicit and implicit (this) parameters exist.

    Note

    Transitive dependencies are not counted.

  9. abstract def toCanonicalForm(implicit ev: <:<[V, DUVar[ValueInformation]]): Expr[DUVar[ValueInformation]]

    See org.opalj.value.ValueInformation.toCanonicalForm for detail.

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def asArrayLength: ArrayLength[V]
  5. def asArrayLoad: ArrayLoad[V]
  6. def asBinaryExpr: BinaryExpr[V]
  7. def asClassConst: ClassConst
  8. def asCompare: Compare[V]
  9. def asDoubleConst: DoubleConst
  10. def asDynamicConst: DynamicConst
  11. def asFieldRead: FieldRead[V]
  12. def asFloatConst: FloatConst
  13. def asFunctionCall: FunctionCall[V]
  14. def asGetField: GetField[V]
  15. def asGetStatic: GetStatic
  16. def asInstanceFunctionCall: InstanceFunctionCall[V]
  17. def asInstanceOf: InstanceOf[V]
  18. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  19. def asIntConst: IntConst
  20. def asInvokedynamicFunctionCall: InvokedynamicFunctionCall[V]
  21. def asLongConst: LongConst
  22. def asMethodHandleConst: MethodHandleConst
  23. def asMethodTypeConst: MethodTypeConst
  24. def asNew: New
  25. def asNewArray: NewArray[V]
  26. def asNonVirtualFunctionCall: NonVirtualFunctionCall[V]
  27. def asNullExpr: NullExpr
  28. def asParam: Param
  29. def asPrefixExpr: PrefixExpr[V]
  30. def asPrimitiveTypeCastExpr: PrimitiveTypecastExpr[V]
  31. def asStaticFunctionCall: StaticFunctionCall[V]
  32. def asStringConst: StringConst
  33. def asVar: V
  34. def asVirtualFunctionCall: VirtualFunctionCall[V]
  35. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
  36. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  37. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  38. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  39. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  40. def isArrayLoad: Boolean
  41. def isClassConst: Boolean
  42. def isCompare: Boolean
  43. def isConst: Boolean
  44. def isDoubleConst: Boolean
  45. def isDynamicConst: Boolean
  46. def isFieldRead: Boolean
  47. def isFloatConst: Boolean
  48. def isFunctionCall: Boolean
  49. def isGetField: Boolean
  50. def isGetStatic: Boolean
  51. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  52. def isIntConst: Boolean
  53. def isLongConst: Boolean
  54. def isMethodHandleConst: Boolean
  55. def isMethodTypeConst: Boolean
  56. def isNew: Boolean
  57. def isNewArray: Boolean
  58. def isNullExpr: Boolean
  59. def isStaticFunctionCall: Boolean
  60. def isStringConst: Boolean
  61. def isVirtualFunctionCall: Boolean
  62. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  63. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  64. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  65. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  66. def toString(): String
    Definition Classes
    AnyRef → Any
  67. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  68. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  69. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

Inherited from ASTNode[V]

Inherited from AnyRef

Inherited from Any

Ungrouped