|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
ObjectDerivation
public abstract class Derivation
Structure that represents a derivation; can generate values and derived variables from base variables. A Derivation has a set of base VarInfo from which the Derivation is derived. Use getVarInfo() to get the VarInfo representation of this Derivation. When we want the actual value of this derivation, we pass in a ValueTuple; the Derivation picks out the values of its base variables and finds the value of the derived variable. Use computeValueandModified() to get value. Derivations are created by DerivationFactory.
| Field Summary | |
|---|---|
static Logger |
debug
Debug tracer. |
static boolean |
dkconfig_disable_derived_variables
Boolean. |
boolean |
missing_array_bounds
|
| Constructor Summary | |
|---|---|
Derivation()
|
|
| Method Summary | |
|---|---|
abstract boolean |
canBeMissing()
|
int |
complexity()
Return the complexity of this derivation. |
abstract ValueAndModified |
computeValueAndModified(ValueTuple full_vt)
|
abstract int |
derivedDepth()
Returns how many levels of derivation this Derivation is based on. |
String |
esc_name(String index)
Returns the name of this variable in ESC format. |
VarInfo |
get_array_var()
Returns the array variable that underlies this slice. |
Quantify.Term |
get_lower_bound()
Returns the lower bound of a slice. |
Quantify.Term |
get_upper_bound()
Returns the lower bound of a slice. |
abstract VarInfo[] |
getBases()
|
VarInfo |
getVarInfo()
Get the VarInfo that this would represent. |
protected String |
inside_esc_name(VarInfo vi,
boolean in_orig,
int shift)
Returns the esc name of a variable which is included inside an an expression (such as orig(a[vi])). |
protected String |
inside_jml_name(VarInfo vi,
boolean in_orig,
int shift)
Returns the jml name of a variable which is included inside an an expression (such as orig(a[vi])). |
boolean |
is_prestate_version(Derivation d)
Returns true if d is the prestate version of this. |
abstract boolean |
isDerivedFromNonCanonical()
|
protected abstract boolean |
isParam()
|
abstract boolean |
isSameFormula(Derivation other)
|
String |
jml_name(String index)
Returns the name of this variable in JML format. |
protected void |
makeVarInfo_common_setup(VarInfo vi)
|
protected abstract VarInfo |
makeVarInfo()
Used by all child classes to actually create the VarInfo this represents, after which it is interned for getVarInfo(). |
boolean |
missingOutOfBounds()
True if we have encountered to date any missing values in this derivation due to array indices being out of bounds. |
protected String |
shift_str(int shift)
Returns a string that corresponds to the the specified shift |
String |
simplify_name()
Returns the name of this variable in simplify format |
abstract Derivation |
switchVars(VarInfo[] old_vars,
VarInfo[] new_vars)
|
| Methods inherited from class Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static boolean dkconfig_disable_derived_variables
array[index] if array and
index appeared, can
increase the number of properties Daikon finds, especially over
sequences. However, derived variables increase Daikon's time and
memory usage, sometimes dramatically. If false, individual kinds of
derived variables can be enabled or disabled individually using
configuration options under daikon.derive.
public static final Logger debug
public boolean missing_array_bounds
| Constructor Detail |
|---|
public Derivation()
| Method Detail |
|---|
public abstract Derivation switchVars(VarInfo[] old_vars,
VarInfo[] new_vars)
public abstract VarInfo[] getBases()
public abstract ValueAndModified computeValueAndModified(ValueTuple full_vt)
full_vt - The set of values in a program point that will be
used to derive the value.
public VarInfo getVarInfo()
computeValueAndModified(daikon.ValueTuple)protected abstract VarInfo makeVarInfo()
protected void makeVarInfo_common_setup(VarInfo vi)
protected abstract boolean isParam()
public boolean missingOutOfBounds()
public abstract boolean isDerivedFromNonCanonical()
public abstract int derivedDepth()
public abstract boolean isSameFormula(Derivation other)
public abstract boolean canBeMissing()
public Quantify.Term get_lower_bound()
public Quantify.Term get_upper_bound()
public VarInfo get_array_var()
public String esc_name(String index)
public String jml_name(String index)
public String simplify_name()
public boolean is_prestate_version(Derivation d)
public int complexity()
protected String shift_str(int shift)
protected String inside_esc_name(VarInfo vi,
boolean in_orig,
int shift)
protected String inside_jml_name(VarInfo vi,
boolean in_orig,
int shift)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||