package purity
- Alphabetic
- Public
- Protected
Type Members
- trait AbstractPurityAnalysis extends FPCFAnalysis
Base trait for analyses that analyze the purity of methods.
Base trait for analyses that analyze the purity of methods.
Provides types and methods needed for purity analyses.
- trait AssertionExceptionRater extends DomainSpecificRater
Mixin that treats some exception types typically used to assert program properties as domain-specific.
- class BaseDomainSpecificRater extends DomainSpecificRater
Basic rater that does nothing.
- trait DomainSpecificRater extends AnyRef
Rates, whether three address code statements perform actions that are domain-specific pure.
- trait ExceptionRater extends DomainSpecificRater
Mixin that treats all exceptions as domain-specific.
- class L1PurityAnalysis extends AbstractPurityAnalysis
An inter-procedural analysis to determine a method's purity.
An inter-procedural analysis to determine a method's purity.
- Note
This analysis is sound only up to the usual standards, i.e. it does not cope with VirtualMachineErrors and may be unsound in the presence of native code, reflection or
,sun.misc.Unsafe
. Calls to native methods are generally handled soundly as they are considered org.opalj.br.fpcf.properties.ImpureByAnalysis. There are no soundness guarantees in the presence of load-time transformation. Soundness in general depends on the soundness of the analyses that compute properties used by this analysis, e.g. field mutability.This analysis is sound even if the three address code hierarchy is not flat, it will produce better results for a flat hierarchy, though. This is because it will not assess the types of expressions other than org.opalj.tac.Vars.
,This analysis derives all purity levels except for the
Externally
variants. A configurable DomainSpecificRater is used to identify calls, expressions and exceptions that areLBDPure
instead ofLBImpure
or anySideEffectFree
purity level. Compared to theL0PurityAnalysis
, it deals with all methods, even if their reference type parameters are mutable. It can handle accesses of (effectively) final instance fields, array loads, array length and virtual/interface calls. Array stores and field writes as well as (useless) synchronization on locally created, non-escaping objects/arrays are also handled. Newly allocated objects/arrays returned from callees are not identified.
- trait L1PurityAnalysisScheduler extends FPCFAnalysisScheduler
- class L2PurityAnalysis extends AbstractPurityAnalysis
An inter-procedural analysis to determine a method's purity.
An inter-procedural analysis to determine a method's purity.
- Note
This analysis is sound only up to the usual standards, i.e. it does not cope with VirtualMachineErrors, LinkageErrors and ReflectiveOperationExceptions and may be unsound in the presence of native code, reflection or
,sun.misc.Unsafe
. Calls to native methods are handled soundly in general as they are considered org.opalj.br.fpcf.properties.ImpureByAnalysis, but native methods may break soundness of this analysis by invalidating assumptions such as which fields are effectively final.This analysis is sound even if the three address code hierarchy is not flat, it will produce better results for a flat hierarchy, though. This is because it will not assess the types of expressions other than org.opalj.tac.Vars.
,This analysis derives all purity level. A configurable org.opalj.tac.fpcf.analyses.purity.DomainSpecificRater is used to identify calls, expressions and exceptions that are
LBDPure
instead ofLBImpure
or anySideEffectFree
purity level. Compared toL1PurityAnaylsis
it identifies objects/arrays returned from pure callees that can be considered local. Synchronized methods are treated asExternallyPure
.
- trait L2PurityAnalysisScheduler extends FPCFAnalysisScheduler
- trait LoggingRater extends DomainSpecificRater
Mixin that rates whether a call is part of using logging.
- trait SystemOutErrRater extends DomainSpecificRater
Mixin that rates whether a call or GetStatic is part of using
System.out
orSystem.err
Value Members
- object EagerL1PurityAnalysis extends L1PurityAnalysisScheduler with FPCFEagerAnalysisScheduler
- object EagerL2PurityAnalysis extends L2PurityAnalysisScheduler with FPCFEagerAnalysisScheduler
- object L1PurityAnalysis
- object L2PurityAnalysis
- object LazyL1PurityAnalysis extends L1PurityAnalysisScheduler with FPCFLazyAnalysisScheduler
- object LazyL2PurityAnalysis extends L2PurityAnalysisScheduler with FPCFLazyAnalysisScheduler
- object SystemOutLoggingAllExceptionRater extends BaseDomainSpecificRater with SystemOutErrRater with LoggingRater with ExceptionRater
Implementation of a rater that handles the use of System.out/System.err and logging as well as all exceptions
- object SystemOutLoggingAssertionExceptionRater extends BaseDomainSpecificRater with SystemOutErrRater with LoggingRater with AssertionExceptionRater
Default implementation of a rater that handles the use of System.out/System.err and logging as well as some exception types typically used to assert program properties.