Package daikon.split.misc
Class CallerContextSplitter
-
- All Implemented Interfaces:
Serializable
public final class CallerContextSplitter extends Splitter
This splitter tests the condition "$caller one of { some set of integers }".- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description String
CALLER_INDICATOR_NAME_STRING
Name of the variable used by the front end to store caller (callsite) information.-
Fields inherited from class Splitter
instantiated
-
-
Constructor Summary
Constructors Constructor Description CallerContextSplitter(long[] ids, String condition)
Create a prototype (factory) splitter for the given set of ids and condition.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
condition()
Returns the condition being tested, as a String.@Nullable DummyInvariant
getDummyInvariant()
On an instantiated Splitter, give back an appropriate instantiated DummyInvariant.Splitter
instantiateSplitter(@UnknownInitialization(Ppt.class) Ppt ppt)
Create a new splitter for the given ppt using this as a prototype.boolean
test(ValueTuple vt)
Returns true or false according to whether the values in the specified ValueTuple satisfy the condition represented by this Splitter.String
toString()
boolean
valid()
Returns true or false according to whether this was instantiated correctly and test(ValueTuple) can be called without error.-
Methods inherited from class Splitter
instantiated, instantiateDummy, makeDummyInvariantFactory
-
-
-
-
Field Detail
-
CALLER_INDICATOR_NAME_STRING
public final String CALLER_INDICATOR_NAME_STRING
Name of the variable used by the front end to store caller (callsite) information.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CallerContextSplitter
public CallerContextSplitter(long[] ids, String condition)
Create a prototype (factory) splitter for the given set of ids and condition.
-
-
Method Detail
-
instantiateSplitter
public Splitter instantiateSplitter(@UnknownInitialization(Ppt.class) Ppt ppt)
Create a new splitter for the given ppt using this as a prototype.- Specified by:
instantiateSplitter
in classSplitter
-
valid
@EnsuresNonNullIf(result=true, expression="caller_varinfo") public boolean valid()
Description copied from class:Splitter
Returns true or false according to whether this was instantiated correctly and test(ValueTuple) can be called without error. An alternate design would haveSplitter.instantiateSplitter(Ppt)
check this, but it's a bit easier on implementers of subclasses of Splitter for the work to be done (in just one place) by the caller.
-
test
@RequiresNonNull("caller_varinfo") public boolean test(ValueTuple vt)
Description copied from class:Splitter
Returns true or false according to whether the values in the specified ValueTuple satisfy the condition represented by this Splitter. Requires that valid() returns true.
-
condition
public String condition()
Description copied from class:Splitter
Returns the condition being tested, as a String.
-
getDummyInvariant
public @Nullable DummyInvariant getDummyInvariant()
Description copied from class:Splitter
On an instantiated Splitter, give back an appropriate instantiated DummyInvariant.- Specified by:
getDummyInvariant
in classSplitter
-
-