Packages

final class EPK[+E <: Entity, +P <: Property] extends EOptionP[E, P]

A simple pair consisting of an Entity and a PropertyKey.

Source
EOptionP.scala
Linear Supertypes
EOptionP[E, P], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. EPK
  2. EOptionP
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new EPK(e: E, pk: PropertyKey[P])

Value Members

  1. def asEPK: EPK[E, P]
    Definition Classes
    EPKEOptionP
  2. def asEPS: EPS[E, P]

    This EOptionP as an EPS object; defined iff at least a preliminary property exists.

    This EOptionP as an EPS object; defined iff at least a preliminary property exists.

    Definition Classes
    EPKEOptionP
  3. def asFinal: FinalEP[E, P]
    Definition Classes
    EPKEOptionP
  4. def asInterim: InterimEP[E, P]
    Definition Classes
    EPKEOptionP
  5. val e: E

    The entity.

    The entity. E.g., a class, method or field. In general, it is recommended to use entities that stand for specific elements in the code, but which are not the concrete source code entities themselves. This greatly facilitates associating properties with entities where the respective code is not available. For example, by using an object which acts as a representative for a concrete method it is possible to associate (predetermined) properties with (selected) library methods even if those methods are not part of the analysis.

    Definition Classes
    EPKEOptionP
    Note

    Entities have to implement equals/hashCode methods which are very efficient, because entity based comparisons happen very frequently!

  6. def equals(other: Any): Boolean
    Definition Classes
    EPK → AnyRef → Any
  7. def hasLBP: Boolean

    returns

    true if the entity is associated with a (preliminary) property which represents a lower bound. Always true in case of a FinalP.

    Definition Classes
    EPKEOptionP
  8. final def hasNoLBP: Boolean
    Definition Classes
    EOptionP
  9. final def hasNoUBP: Boolean
    Definition Classes
    EOptionP
  10. def hasUBP: Boolean

    returns

    true if the entity is associated with a (preliminary) property which represents an upper bound. Always true in case of a FinalP.

    Definition Classes
    EPKEOptionP
  11. lazy val hashCode: Int
    Definition Classes
    EPK → AnyRef → Any
  12. def is(p: AnyRef): Boolean

    Combines the test if we have a final property and – if we have one – if it is equal (by means of an equality check) to the given one.

    Combines the test if we have a final property and – if we have one – if it is equal (by means of an equality check) to the given one.

    Definition Classes
    EOptionP
  13. def isEPK: Boolean
    Definition Classes
    EPKEOptionP
  14. def isEPS: Boolean
    Definition Classes
    EPKEOptionP
  15. def isFinal: Boolean

    Returns true if and only if we have a property and the property was stored in the store using (Multi)Result.

    Returns true if and only if we have a property and the property was stored in the store using (Multi)Result.

    Definition Classes
    EPKEOptionP
  16. final def isRefinable: Boolean
    Definition Classes
    EOptionP
  17. def lb: Nothing

    Returns the lower bound of the property if it is available, otherwise an UnsupportedOperationException is thrown.

    Returns the lower bound of the property if it is available, otherwise an UnsupportedOperationException is thrown. For details regarding the precise semantics see the discussion for ub.

    Definition Classes
    EPKEOptionP
    Note

    If the property is final, lb (and ub) will return the final property p.

  18. val pk: PropertyKey[P]

    The property key of the optionally available property.

    The property key of the optionally available property.

    Definition Classes
    EPKEOptionP
  19. def toEPK: EPK.this.type

    This EOptionP as a pair of an entity and a property key.

    This EOptionP as a pair of an entity and a property key.

    Definition Classes
    EPKEOptionP
  20. def toEPS: Option[EPS[E, P]]
    Definition Classes
    EPKEOptionP
  21. def toString(): String
    Definition Classes
    EPK → AnyRef → Any
  22. def ub: Nothing

    Returns the upper bound of the property if it is available – hasUBP has to be true – otherwise an UnsupportedOperationException is thrown.

    Returns the upper bound of the property if it is available – hasUBP has to be true – otherwise an UnsupportedOperationException is thrown.

    The upper bound always models the best/most precise result w.r.t. the underlying lattice. Here, "best" means that the set of potentially reachable states/instructions that the analyzed program can ever assume is potentially smaller when compared to a worse property.

    The upper bound models the sound and precise result under the assumption that the properties of all explicitly and implicitly relevant entities is as last queried or implicitly assumed. I.e., unless a dependee is updated the upper bound represents the correct and most precise result.

    The lower bound models the worst case property that a specific entity can have under the assumption that all other relevant properties will get their worst properties. This can – but does not have to be – the underlying lattice's bottom value. The lower bound is generally helpful for client analyses to determine final results quicker. For example, imagine the following code:

    def f(a : AnyRef) : Unit = a match {
      case a : List[_] => if (a.exists( _ == null)) throw  new IllegalArgumentException
      case _ => throw new UnknownError
    }
    def m(){
      try {
        f(List(1,2,3))
      } catch {
        case nfe:  NumberFormatException => ...
      }
    }

    In that case – assuming we do not perform context sensitive analyses – if the lower bound for f for the set of thrown exceptions is determined to be Set(IllegalArgumentException,UnkownError), then the catch of the NumberFormatException can be ruled out and a final result for m can be computed.

    Definition Classes
    EPKEOptionP
    Note

    If the property is final, lb (and ub) will return the final property p.