trait Configuration extends AnyRef
Centralizes all configuration options related to how a domain should handle situations in which the information about a value is (often) not completely available and which could lead to some kind of exception.
Basically all domains that perform some kind of abstraction should mix in this trait and query the respective method to decide if a respective exception should be thrown if it is possible that an exception may be thrown.
Usage
If you need to adapt a setting just override the respective method in your domain.
In general, the org.opalj.ai.domain.ThrowAllPotentialExceptionsConfiguration should be used as a foundation as it generates all exceptions that may be thrown; however, configuring the behavior of method calls may be worth while.
- Source
- Configuration.scala
- Alphabetic
- By Inheritance
- Configuration
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Abstract Value Members
- abstract def abortProcessingExceptionsOfCalledMethodsOnUnknownException: Boolean
If
true
the processing of the exception handlers related to an invoke statement will be aborted if the relation between the type of the thrown exception and the caught type is unknown.If
true
the processing of the exception handlers related to an invoke statement will be aborted if the relation between the type of the thrown exception and the caught type is unknown.- Note
Directly used by the AI itself.
- abstract def abortProcessingThrownExceptionsOnUnknownException: Boolean
If
true
the processing of the exception handlers related to an athrow statement will be aborted if the relation between the type of the thrown exception and the caught type is unknown.If
true
the processing of the exception handlers related to an athrow statement will be aborted if the relation between the type of the thrown exception and the caught type is unknown.- Note
Directly used by the AI itself.
- abstract def throwArithmeticExceptions: Boolean
If
true
, all instructions that may raise an arithmetic exception (e.g., idiv, ldiv) should do so if it is impossible to statically determine that no exception will occur.If
true
, all instructions that may raise an arithmetic exception (e.g., idiv, ldiv) should do so if it is impossible to statically determine that no exception will occur. But, if we can statically determine that the operation will raise an exception then the exception will be thrown – independently of this setting. Furthermore, if we can statically determine that no exception will be raised, no exception will be thrown. Hence, this setting only affects computations with values with incomplete information. - abstract def throwArrayIndexOutOfBoundsException: Boolean
If
true
anArrayIndexOutOfBoundsException
is thrown if the index cannot be verified to be valid. - abstract def throwArrayStoreException: Boolean
If
true
anArrayStoreException
is thrown if it cannot be verified that the value can be stored in the array. - abstract def throwClassCastException: Boolean
If
true
aClassCastException
is thrown byCHECKCAST
instructions if it cannot be verified that noClassCastException
will be thrown.If
true
aClassCastException
is thrown byCHECKCAST
instructions if it cannot be verified that noClassCastException
will be thrown.- Note
Directly used by the AI itself.
- abstract def throwClassNotFoundException: Boolean
Throw a
ClassNotFoundException
if the a specific reference type is not known in the current context.Throw a
ClassNotFoundException
if the a specific reference type is not known in the current context. The context is typically a specificProject
. - abstract def throwExceptionsOnMethodCall: ExceptionsRaisedByCalledMethod
Determines the behavior how method calls are handled when the exceptions that the called method may throw are unknown.
Determines the behavior how method calls are handled when the exceptions that the called method may throw are unknown.
- Note
Used by domains which handle method invokations.
- abstract def throwIllegalMonitorStateException: Boolean
If
true
thenmonitorexit
and the(XXX)return
instructions will throwIllegalMonitorStateException
s unless the analysis is able to determine that the exception is guaranteed not to be raised. - abstract def throwNegativeArraySizeException: Boolean
If
true
aNegativeArraySizeException
is thrown if the index cannot be verified to be positive. - abstract def throwNullPointerExceptionOnArrayAccess: Boolean
Returns
true
if potentialNullPointerExceptions
should be thrown andfalse
if suchNullPointerExceptions
should be ignored.Returns
true
if potentialNullPointerExceptions
should be thrown andfalse
if suchNullPointerExceptions
should be ignored. However, if the interpreter identifies a situation in which aNullPointerException
is guaranteed to be thrown, it will be thrown. - abstract def throwNullPointerExceptionOnFieldAccess: Boolean
Returns
true
if potentialNullPointerExceptions
should be thrown andfalse
if suchNullPointerExceptions
should be ignored.Returns
true
if potentialNullPointerExceptions
should be thrown andfalse
if suchNullPointerExceptions
should be ignored. However, if the interpreter identifies a situation in which aNullPointerException
is guaranteed to be thrown, it will be thrown. - abstract def throwNullPointerExceptionOnMethodCall: Boolean
Returns
true
if potentialNullPointerExceptions
should be thrown andfalse
if suchNullPointerExceptions
should be ignored.Returns
true
if potentialNullPointerExceptions
should be thrown andfalse
if suchNullPointerExceptions
should be ignored. However, if the interpreter identifies a situation in which aNullPointerException
is guaranteed to be thrown, it will be thrown. Example:def demo(o : Object) { o.toString // - If "true", a NullPointerException will ALSO be thrown; // the operation also succeeds. // - If "false" the operation will "just" succeed }
- Note
Used by domains which handle method invokations.
- abstract def throwNullPointerExceptionOnMonitorAccess: Boolean
Returns
true
if potentialNullPointerExceptions
should be thrown andfalse
if suchNullPointerExceptions
should be ignored.Returns
true
if potentialNullPointerExceptions
should be thrown andfalse
if suchNullPointerExceptions
should be ignored. However, if the interpreter identifies a situation in which aNullPointerException
is guaranteed to be thrown, it will be thrown. - abstract def throwNullPointerExceptionOnThrow: Boolean
If
true
a VM levelNullPointerExceptions
is thrown if the exception that is to be thrown may be null.If
true
a VM levelNullPointerExceptions
is thrown if the exception that is to be thrown may be null.- Note
Directly used by the AI itself.
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated