Packages

  • package root
    Definition Classes
    root
  • package org
    Definition Classes
    root
  • package opalj
    Definition Classes
    org
  • package fpcf

    The fixpoint computations framework (fpcf) is a general framework to perform fixpoint computations of properties ordered by a lattice.

    The fixpoint computations framework (fpcf) is a general framework to perform fixpoint computations of properties ordered by a lattice. The framework in particular supports the development of static analyses.

    In this case, the fixpoint computations/static analyses are generally operating on the code and need to be executed until the computations have reached their (implicit) fixpoint. The fixpoint framework explicitly supports resolving cyclic dependencies/computations. A prime use case of the fixpoint framework are all those analyses that may interact with the results of other analyses.

    For example, an analysis that analyzes all field write accesses to determine if we can refine a field's type (for the purpose of the analysis) can (reuse) the information about the return types of methods, which however may depend on the refined field types.

    The framework is generic enough to facilitate the implementation of anytime algorithms.

    Definition Classes
    opalj
    Note

    This framework assumes that all data-structures (e.g., dependee lists and properties) that are passed to the framework are effectively immutable! (Effectively immutable means that the datastructure is never updated after it was passed to the framework.)

    ,

    The dependency relation is as follows: “A depends on B” === “A is the depender, B is the dependee”. === “B is depended on by A”

    ,

    The very core of the framework is described in: Lattice Based Modularization of Static Analyses

  • package seq
    Definition Classes
    fpcf
  • DependeeUpdateHandling
  • EagerDependeeUpdateHandling
  • IntermediatePropertyValue
  • LazyDependeeUpdateHandling
  • PKESequentialPropertyStore
  • SeqPropertyStore
c

org.opalj.fpcf.seq

SeqPropertyStore

abstract class SeqPropertyStore extends PropertyStore

Non-concurrent implementation of the property store.

Linear Supertypes
PropertyStore, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. SeqPropertyStore
  2. PropertyStore
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new SeqPropertyStore()

Abstract Value Members

  1. abstract def apply[E <: Entity, P <: Property](epk: EPK[E, P]): EOptionP[E, P]

    Returns the property of the respective property kind pk currently associated with the given element e.

    Returns the property of the respective property kind pk currently associated with the given element e.

    This is the most basic method to get some property and it is the preferred way if (a) you know that the property is already available – e.g., because some property computation function was strictly run before the current one – or if (b) the property is computed using a lazy property computation - or if (c) it may be possible to compute a final answer even if the property of the entity is not yet available.

    epk

    An entity/property key pair.

    returns

    EPK(e,pk) if information about the respective property is not (yet) available. Final|IntermediateEP(e,Property) otherwise.

    Definition Classes
    PropertyStore
    Exceptions thrown

    IllegalStateException If setup phase was not called or a previous computation result contained an epk which was not queried. (Both state are ALWAYS illegal, but are only explicitly checked for if debug is turned on!)

    Note

    In general, the returned value may change over time but only such that it is strictly more precise.

    ,

    Querying a property may trigger the (lazy) computation of the property.

    ,

    setupPhase has to be called before calling apply!

  2. abstract def apply[E <: Entity, P <: Property](e: E, pk: PropertyKey[P]): EOptionP[E, P]

    Definition Classes
    PropertyStore
    See also

    apply(epk:EPK) for details.

  3. abstract val ctx: Map[Class[_], AnyRef]

    Immutable map which stores the context objects given at initialization time.

    Immutable map which stores the context objects given at initialization time.

    Definition Classes
    PropertyStore
  4. abstract def entities(propertyFilter: (SomeEPS) ⇒ Boolean): Iterator[Entity]

    The set of all entities which already have an entity property state that passes the given filter.

    The set of all entities which already have an entity property state that passes the given filter.

    This method returns a snapshot.

    Definition Classes
    PropertyStore
    Note

    Does not trigger lazy property computations.

  5. abstract def entities[P <: Property](lb: P, ub: P): Iterator[Entity]

    Returns all entities that currently have the given property bounds based on an "==" (equals) comparison..

    Returns all entities that currently have the given property bounds based on an "==" (equals) comparison.. (In case of final properties the bounds are equal.)

    Definition Classes
    PropertyStore
    Note

    Does not trigger lazy property computations.

  6. abstract def entities[P <: Property](pk: PropertyKey[P]): Iterator[EPS[Entity, P]]

    Returns all entities which have a property of the respective kind.

    Returns all entities which have a property of the respective kind. This method returns a consistent snapshot view of the store w.r.t. the given PropertyKey.

    Definition Classes
    PropertyStore
    Note

    Does not trigger lazy property computations.

  7. abstract def fastTrackPropertiesCount: Int

    The number of properties that were computed using a fast-track.

    The number of properties that were computed using a fast-track.

    Definition Classes
    PropertyStore
  8. abstract def force[E <: Entity, P <: Property](e: E, pk: PropertyKey[P]): Unit

    Enforce the evaluation of the specified property kind for the given entity, even if the property is computed lazily and no "eager computation" requires the results anymore.

    Enforce the evaluation of the specified property kind for the given entity, even if the property is computed lazily and no "eager computation" requires the results anymore. Force also ensures that the property is stored in the store even if the fallback value is used. Using force is in particular necessary in cases where a specific analysis should be scheduled lazily because the computed information is not necessary for all entities, but strictly required for some elements. E.g., if you want to compute a property for some piece of code, but not for those elements of the used library that are strictly necessary. For example, if we want to compute the purity of the methods of a specific application, we may have to compute the property for some entities of the libraries, but we don't want to compute them for all.

    Definition Classes
    PropertyStore
    Note

    Triggers lazy evaluations.

  9. abstract def handleResult(r: PropertyComputationResult, forceEvaluation: Boolean = false): Unit

    Processes the result eventually; generally, not directly called by analyses.

    Processes the result eventually; generally, not directly called by analyses. If this function is directly called, the caller has to ensure that we don't have overlapping results and that the given result is a meaningful update of the previous property associated with the respective entity - if any!

    Definition Classes
    PropertyStore
    Exceptions thrown

    IllegalStateException If the result cannot be applied.

    Note

    If any computation resulted in an exception, then handleResult will fail and the exception related to the failing computation will be thrown again.

  10. abstract def hasProperty(e: Entity, pk: PropertyKind): Boolean

    See hasProperty(SomeEPK) for details.

    See hasProperty(SomeEPK) for details. *

    Definition Classes
    PropertyStore
  11. abstract def immediateOnUpdateComputationsCount: Int

    The number of times a property was directly computed again due to an updated dependee.

    The number of times a property was directly computed again due to an updated dependee.

    Definition Classes
    PropertyStore
  12. abstract def isKnown(e: Entity): Boolean

    Returns true if the given entity is known to the property store.

    Returns true if the given entity is known to the property store. Here, isKnown can mean

    • that we actually have a property, or
    • a computation is scheduled/running to compute some property, or
    • an analysis has a dependency on some (not yet finally computed) property, or
    • that the store just eagerly created the data structures necessary to associate properties with the entity.
    Definition Classes
    PropertyStore
  13. implicit abstract val logContext: LogContext
    Definition Classes
    PropertyStore
  14. abstract def properties[E <: Entity](e: E): Iterator[EPS[E, Property]]

    Returns an iterator of the different properties associated with the given element.

    Returns an iterator of the different properties associated with the given element.

    This method is the preferred way to get a snapshot of all properties of an entity and should be used if you know that all properties are already computed. Using this method will not trigger the computation of a property.

    e

    An entity stored in the property store.

    returns

    Iterator[Property]

    Definition Classes
    PropertyStore
    Note

    The returned traversable operates on a snapshot.

    ,

    Does not trigger lazy property computations.

  15. abstract def quiescenceCount: Int

    The number of times the property store reached quiescence.

    The number of times the property store reached quiescence.

    Definition Classes
    PropertyStore
  16. abstract def registerLazyPropertyComputation[E <: Entity, P <: Property](pk: PropertyKey[P], pc: PropertyComputation[E]): Unit

    Registers a function that lazily computes a property for an element of the store if the property of the respective kind is requested.

    Registers a function that lazily computes a property for an element of the store if the property of the respective kind is requested. Hence, a first request of such a property will always first return no result.

    The computation is triggered by a(n in)direct call of this store's apply method.

    This store ensures that the property computation function pc is never invoked more than once for the same element at the same time. If pc is invoked again for a specific element then only because a dependee has changed!

    In general, the result can't be an IncrementalResult and scheduleLazyPropertyComputation cannot be used for properties which should be computed by phased analyses.

    A lazy computation must never return a NoResult; if the entity cannot be processed an exception has to be thrown or the bottom value has to be returned.

    Setting scheduleLazyPropertyComputation is only supported as long as the store is not queried. In general, this requires that lazy property computations are scheduled before any eager analysis that potentially reads the value.

    Definition Classes
    PropertyStore
  17. abstract def registerTriggeredComputation[E <: Entity, P <: Property](pk: PropertyKey[P], pc: PropertyComputation[E]): Unit

    Registers a property computation that is eagerly triggered when a property of the given kind is derived for some entity for the first time.

    Registers a property computation that is eagerly triggered when a property of the given kind is derived for some entity for the first time. Note, that the property computation function – as usual – has to be thread safe (only on-update continuation functions are guaranteed to be executed sequentially per E/PK pair). The primary use case is to kick-start the computation of some e/pk as soon as an entity "becomes relevant".

    In general, it also possible to have a standard analysis that just queries the properties of the respective entities and which maintains the list of dependees. However, if the list of dependees becomes larger and (at least initially) encompasses a significant fraction or even all entities of a specific kind, the overhead that is generated in the framework becomes very huge. In this case, it is way more efficient to register a triggered computation.

    For example, if you want to do some processing (kick-start further computations) related to methods that are reached, it is more efficient to register a property computation that is triggered when a method's Caller property is set. Please note, that the property computation is allowed to query and depend on the property that initially kicked-off the computation in the first place. Querying the property store may in particular be required to identify the reason why the property was set. For example, if the Caller property was set to the fallback due to a depending computation, it may be necessary to distinguish between the case "no callers" and "unknown callers"; in case of the final property "no callers" the result may very well be NoResult.

    pk

    The property key.

    pc

    The computation that is (potentially concurrently) called to kick-start a computation related to the given entity.

    Definition Classes
    PropertyStore
  18. abstract def resolvedCSCCsCount: Int

    The number of resolved closed strongly connected components.

    The number of resolved closed strongly connected components.

    Please note, that depending on the implementation strategy and the type of the closed strongly connected component, the resolution of one strongly connected component may require multiple phases. This is in particular true if a cSCC is resolved by committing an arbitrary value as a final value and we have a cSCC which is actually a chain-like cSCC. In the latter case committing a single value as final which just break up the chain, but will otherwise (in case of chains with more than three elements) lead to new cSCCs which the require detection and resolution.

    Definition Classes
    PropertyStore
  19. abstract def scheduleEagerComputationForEntity[E <: Entity](e: E)(pc: PropertyComputation[E]): Unit

    Schedules the execution of the given PropertyComputation function for the given entity.

    Schedules the execution of the given PropertyComputation function for the given entity. This is of particular interest to start an incremental computation (cf. IncrementalResult) which, e.g., processes the class hierarchy in a top-down manner.

    Definition Classes
    PropertyStore
    Note

    It is NOT possible to use scheduleEagerComputationForEntity for properties which are also computed by a lazy property computation; use force instead!

    ,

    If any computation resulted in an exception, then the scheduling will fail and the exception related to the failing computation will be thrown again.

  20. abstract def scheduledOnUpdateComputationsCount: Int

    Simple counter of the number of tasks (OnUpdateContinuations) that were executed in response to an updated property.

    Simple counter of the number of tasks (OnUpdateContinuations) that were executed in response to an updated property.

    Definition Classes
    PropertyStore
  21. abstract def scheduledTasksCount: Int

    Simple counter of the number of tasks that were executed to perform an initial computation of a property for some entity.

    Simple counter of the number of tasks that were executed to perform an initial computation of a property for some entity.

    Definition Classes
    PropertyStore
  22. abstract def set(e: Entity, p: Property): Unit

    Directly associates the given property p with property kind pk with the given entity e if e has no property of the respective kind.

    Directly associates the given property p with property kind pk with the given entity e if e has no property of the respective kind. The set property is always final. The store does not guarantee that the value is set before before a later scheduled analysis is executed. I.e., no guarantee is given that the value is set immediately.

    A use case is an analysis that does use the property store while executing the analysis, but which wants to store the results in the store. Such an analysis must be executed before any other analysis is scheduled.

    Definition Classes
    PropertyStore
    Exceptions thrown

    IllegalStateException If a different property is already associated with the given entity or a lazy computation is registered. I.e., set has to be called before respective lazy property computations are registered. The exception may be thrown eventually!

    Note

    This method must not be used if there might be another computation that computes the property kind pk for e and which returns the respective property as a result.

  23. abstract def setupPhase(computedPropertyKinds: Set[PropertyKind], delayedPropertyKinds: Set[PropertyKind] = Set.empty): Unit

    Needs to be called before an analysis is scheduled to inform the property store which properties will be computed now and which are computed in a later phase.

    Needs to be called before an analysis is scheduled to inform the property store which properties will be computed now and which are computed in a later phase. The later information is used to decide when we use a fallback.

    computedPropertyKinds

    The kinds of properties for which we will schedule computations.

    delayedPropertyKinds

    The set of property kinds which will (also) be computed in a later phase; no fallback will be used for dependencies to properties of the respective kind.

    Definition Classes
    PropertyStore
    Note

    setupPhase even needs to be called if just fallback values should be computed; in this case both sets have to be empty.

  24. abstract def shutdown(): Unit
    Definition Classes
    PropertyStore
  25. abstract def statistics: Map[String, Int]

    Core statistics.

    Core statistics.

    Definition Classes
    PropertyStore
  26. abstract def supportsFastTrackPropertyComputations: Boolean
    Definition Classes
    PropertyStore
  27. abstract def toString(printProperties: Boolean): String

    Returns a consistent snapshot of the stored properties.

    Returns a consistent snapshot of the stored properties.

    printProperties

    If true prints the properties of all entities.

    Definition Classes
    PropertyStore
    Note

    Some computations may still be running.

  28. abstract def waitOnPhaseCompletion(): Unit

    Awaits the completion of all property computations which were previously scheduled.

    Awaits the completion of all property computations which were previously scheduled. As soon as all initial computations have finished, dependencies on E/P pairs for which no value was computed and also will not be computed in the future(!) (see setupPhase for details), will be identified and the fallback value will be used. After that, cycle resolution will be performed. I.e., first all _closed_ strongly connected components will be identified that do not contain any properties for which we will compute (in a future phase) any more refined values. Then the values will be made final.

    If the store is suspended, waitOnPhaseCompletion will return as soon as all running computations are finished. By updating the isSuspended state and calling waitOnPhaseCompletion again computations can be continued.

    Definition Classes
    PropertyStore
    Note

    If a second thread is used to register org.opalj.fpcf.PropertyComputation functions no guarantees are given; it is recommended to schedule all property computation functions using one thread and to also use that thread to call this method.

    ,

    If a computation fails with an exception, the property store will stop in due time and return the thrown exception. No strong guarantees are given which exception is returned in case of concurrent execution with multiple exceptions.

    ,

    In case of an exception, the analyses are aborted as fast as possible and the store is no longer usable.

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. final def apply[E <: Entity, P <: Property](es: Traversable[E], pmi: PropertyMetaInformation { type Self <: P }): Traversable[EOptionP[E, P]]

    Returns a snapshot of the properties with the given kind associated with the given entities.

    Returns a snapshot of the properties with the given kind associated with the given entities.

    Definition Classes
    PropertyStore
    Note

    Querying the properties of the given entities will trigger lazy computations.

    ,

    The returned collection can be used to create an IntermediateResult.

    See also

    apply(epk:EPK) for details.

  5. final def apply[E <: Entity, P <: Property](es: Traversable[E], pk: PropertyKey[P]): Traversable[EOptionP[E, P]]

    Returns a snapshot of the properties with the given kind associated with the given entities.

    Returns a snapshot of the properties with the given kind associated with the given entities.

    Definition Classes
    PropertyStore
    Note

    Querying the properties of the given entities will trigger lazy computations.

    ,

    The returned collection can be used to create an IntermediateResult.

    See also

    apply(epk:EPK) for details.

  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  8. def collectAndThrowException(t: Throwable): Nothing
    Attributes
    protected[this]
    Definition Classes
    PropertyStore
    Annotations
    @inline()
  9. def collectException(t: Throwable): Unit
    Attributes
    protected[this]
    Definition Classes
    PropertyStore
  10. final def context[T](key: Class[T]): T

    Looks up the context object of the given type.

    Looks up the context object of the given type. This is a comparatively expensive operation; the result should be cached.

    Definition Classes
    PropertyStore
  11. final def debug: Boolean

    If "debug" is true and we have an update related to an ordered property, we will then check if the update is correct!

    If "debug" is true and we have an update related to an ordered property, we will then check if the update is correct!

    Definition Classes
    PropertyStore
  12. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  14. var exception: Throwable
    Attributes
    protected[this]
    Definition Classes
    PropertyStore
  15. def finalEntities[P <: Property](p: P): Iterator[Entity]

    Returns all final entities with the given property.

    Returns all final entities with the given property.

    Definition Classes
    PropertyStore
    Note

    Does not trigger lazy property computations.

  16. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  17. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  18. def handleExceptions[U](f: ⇒ U): U
    Attributes
    protected[this]
    Definition Classes
    PropertyStore
    Annotations
    @inline()
  19. final def hasProperty(epk: SomeEPK): Boolean

    Tests if we have a property for the entity with the respective kind.

    Tests if we have a property for the entity with the respective kind. If hasProperty returns true a subsequent apply will return an EPS (not an EPK).

    Definition Classes
    PropertyStore
  20. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  21. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  22. var isSuspended: () ⇒ Boolean

    The callback function that is regularly called by the property store to test if the property store should stop executing new tasks.

    The callback function that is regularly called by the property store to test if the property store should stop executing new tasks. Given that the given method is called frequently, it should be reasonably efficient. The method has to be thread-safe.

    The default method tests if the current thread is interrupted.

    Suspending the property store will leave the property store in a consistent state and the computation can be continued later on by updating this function (if necessary) and calling waitOnPhaseCompletion again. I.e., interruption can be used for debugging purposes!

    Definition Classes
    PropertyStore
  23. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  24. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  25. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  26. def onFirstException(t: Throwable): Unit

    Called when the first top-level exception occurs.

    Called when the first top-level exception occurs. Intended to be overridden by subclasses.

    Attributes
    protected[this]
    Definition Classes
    PropertyStore
  27. def registerLazyMultiPropertyComputation[E <: Entity, P <: Property](pc: PropertyComputation[E], pks: PropertyKey[P]*): Unit

    Registers a function that lazily computes multiple properties of different kinds at the same time for an element of the store.

    Registers a function that lazily computes multiple properties of different kinds at the same time for an element of the store.

    For further details see registerLazyPropertyComputation.

    Definition Classes
    PropertyStore
  28. def scheduleEagerComputationsForEntities[E <: Entity](es: TraversableOnce[E])(c: PropertyComputation[E]): Unit

    Will call the given function c for all elements of es in parallel.

    Will call the given function c for all elements of es in parallel.

    Definition Classes
    PropertyStore
    See also

    scheduleEagerComputationForEntity for details.

  29. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  30. def toString(): String

    Returns a short string representation of the property store showing core figures.

    Returns a short string representation of the property store showing core figures.

    Definition Classes
    PropertyStore → AnyRef → Any
  31. final def traceCycleResolutions: Boolean
    Definition Classes
    PropertyStore
  32. final def traceFallbacks: Boolean
    Definition Classes
    PropertyStore
  33. var useFastTrackPropertyComputations: Boolean
    Definition Classes
    PropertyStore
  34. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  35. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  36. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )

Inherited from PropertyStore

Inherited from AnyRef

Inherited from Any

Ungrouped