Package daikon.derive.unary
Class StringLength
- Object
-
- Derivation
-
- UnaryDerivation
-
- StringLength
-
- All Implemented Interfaces:
Serializable
,Cloneable
public final class StringLength extends UnaryDerivation
Length of String variables.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static boolean
dkconfig_enabled
Boolean.-
Fields inherited from class UnaryDerivation
base
-
Fields inherited from class Derivation
debug, dkconfig_disable_derived_variables, missing_array_bounds
-
-
Constructor Summary
Constructors Constructor Description StringLength(VarInfo vi)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static boolean
applicable(VarInfo vi)
ValueAndModified
computeValueAndModifiedImpl(ValueTuple vt)
Actual implementation once mods are handled.String
csharp_name(String index)
Returns the ESC name.String
esc_name(String index)
Returns the ESC name.boolean
isSameFormula(Derivation other)
Returns true iff other and this represent the same derivation (modulo the variable they are applied to).String
jml_name(String index)
Returns the JML name.protected VarInfo
makeVarInfo()
Used by all child classes to actually create the VarInfo this represents, after which it is interned for getVarInfo().String
simplify_name()
Returns the simplify name.-
Methods inherited from class UnaryDerivation
base, canBeMissing, clone, computeValueAndModified, derivedDepth, getBase, getBases, isDerivedFromNonCanonical, isParam, switchVars
-
Methods inherited from class Derivation
complexity, get_array_var, get_lower_bound, get_upper_bound, getVarInfo, inside_csharp_name, inside_esc_name, inside_jml_name, is_prestate_version, makeVarInfo_common_setup, missingOutOfBounds, shift_str
-
-
-
-
Field Detail
-
dkconfig_enabled
public static boolean dkconfig_enabled
Boolean. True iff StringLength derived variables should be generated.
-
-
Constructor Detail
-
StringLength
public StringLength(VarInfo vi)
-
-
Method Detail
-
applicable
public static boolean applicable(VarInfo vi)
-
computeValueAndModifiedImpl
public ValueAndModified computeValueAndModifiedImpl(ValueTuple vt)
Description copied from class:UnaryDerivation
Actual implementation once mods are handled.- Specified by:
computeValueAndModifiedImpl
in classUnaryDerivation
-
makeVarInfo
protected VarInfo makeVarInfo()
Description copied from class:Derivation
Used by all child classes to actually create the VarInfo this represents, after which it is interned for getVarInfo().- Specified by:
makeVarInfo
in classDerivation
-
isSameFormula
@Pure public boolean isSameFormula(Derivation other)
Description copied from class:Derivation
Returns true iff other and this represent the same derivation (modulo the variable they are applied to). Default implentation will just checks run-time type, but subclasses with state (e.g. SequenceInitial index) should match that, too.- Specified by:
isSameFormula
in classDerivation
- Parameters:
other
- the Derivation to compare to- Returns:
- true iff other and this represent the same derivation
-
csharp_name
@SideEffectFree public String csharp_name(String index)
Returns the ESC name.- Overrides:
csharp_name
in classDerivation
-
esc_name
@SideEffectFree public String esc_name(String index)
Returns the ESC name.- Overrides:
esc_name
in classDerivation
-
jml_name
public String jml_name(String index)
Returns the JML name.- Overrides:
jml_name
in classDerivation
-
simplify_name
@SideEffectFree public String simplify_name()
Returns the simplify name.- Overrides:
simplify_name
in classDerivation
-
-