Package daikon.derive.ternary
Class TernaryDerivation
- Object
-
- Derivation
-
- TernaryDerivation
-
- All Implemented Interfaces:
Serializable
,Cloneable
- Direct Known Subclasses:
SequenceFloatArbitrarySubsequence
,SequenceScalarArbitrarySubsequence
,SequenceStringArbitrarySubsequence
public abstract class TernaryDerivation extends Derivation
Abstract class to represent a derived variable that came from three base variables.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class Derivation
debug, dkconfig_disable_derived_variables, missing_array_bounds
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
TernaryDerivation(VarInfo vi1, VarInfo vi2, VarInfo vi3)
Create a new TernaryDerivation from three varinfos.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description boolean
canBeMissing()
SeeVarInfo.canBeMissing
.TernaryDerivation
clone()
abstract ValueAndModified
computeValueAndModified(ValueTuple full_vt)
Returns a pair of: the derived value and whether the variable counts as modified.int
derivedDepth()
Returns how many levels of derivation this Derivation is based on.VarInfo
getBase(int i)
Returns thei
th VarInfo this was derived from.VarInfo[]
getBases()
Returns array of the VarInfos this was derived from.boolean
isDerivedFromNonCanonical()
protected boolean
isParam()
Derivation
switchVars(VarInfo[] old_vars, VarInfo[] new_vars)
-
Methods inherited from class Derivation
complexity, csharp_name, esc_name, get_array_var, get_lower_bound, get_upper_bound, getVarInfo, inside_csharp_name, inside_esc_name, inside_jml_name, is_prestate_version, isSameFormula, jml_name, makeVarInfo, makeVarInfo_common_setup, missingOutOfBounds, shift_str, simplify_name
-
-
-
-
Constructor Detail
-
TernaryDerivation
protected TernaryDerivation(VarInfo vi1, VarInfo vi2, VarInfo vi3)
Create a new TernaryDerivation from three varinfos.- Parameters:
vi1
- original variable 1vi2
- original variable 2vi3
- original variable 3
-
-
Method Detail
-
clone
@SideEffectFree public TernaryDerivation clone(@GuardSatisfied TernaryDerivation this)
-
getBases
@SideEffectFree public VarInfo[] getBases()
Description copied from class:Derivation
Returns array of the VarInfos this was derived from.- Specified by:
getBases
in classDerivation
- Returns:
- array of the VarInfos this was derived from
-
getBase
@Pure public VarInfo getBase(int i)
Description copied from class:Derivation
Returns thei
th VarInfo this was derived from.- Specified by:
getBase
in classDerivation
- Parameters:
i
- index into the array of Varinfos this was derived from- Returns:
- the
i
th VarInfo this was derived from
-
switchVars
public Derivation switchVars(VarInfo[] old_vars, VarInfo[] new_vars)
- Specified by:
switchVars
in classDerivation
-
computeValueAndModified
public abstract ValueAndModified computeValueAndModified(ValueTuple full_vt)
Description copied from class:Derivation
Returns a pair of: the derived value and whether the variable counts as modified.- Specified by:
computeValueAndModified
in classDerivation
- Parameters:
full_vt
- the set of values in a program point that will be used to derive the value- Returns:
- a pair of: the derived value and whether the variable counts as modified
-
isParam
@Pure protected boolean isParam()
- Specified by:
isParam
in classDerivation
-
derivedDepth
public int derivedDepth()
Description copied from class:Derivation
Returns how many levels of derivation this Derivation is based on. The depth counts this as well as the depths of its bases.- Specified by:
derivedDepth
in classDerivation
-
canBeMissing
public boolean canBeMissing()
Description copied from class:Derivation
SeeVarInfo.canBeMissing
.- Specified by:
canBeMissing
in classDerivation
- See Also:
VarInfo.canBeMissing
-
isDerivedFromNonCanonical
@Pure public boolean isDerivedFromNonCanonical()
- Specified by:
isDerivedFromNonCanonical
in classDerivation
-
-