Class AbstractInterleavingPhaseManager
- java.lang.Object
-
- de.rwth.swc.coffee4j.engine.process.interleaving.AbstractInterleavingPhaseManager
-
- All Implemented Interfaces:
PhaseManager
- Direct Known Subclasses:
DefaultGeneratingInterleavingPhaseManager,DefaultTestingInterleavingPhaseManager
public abstract class AbstractInterleavingPhaseManager extends Object implements PhaseManager
Abstract class implementing thePhaseManagerInterface for Interleaving CT. It provides general functionality and fields used by all sub-classes.Manages a
ResultCacheto execute every test input exactly once. If a test input has been executed before, thePhaseManagerloads the result from the cache instead of executing theExecutionPhase.
-
-
Field Summary
Fields Modifier and Type Field Description protected ResultCachecacheprotected CheckingPhasecheckingPhaseprotected InterleavingPhaseManagerConfigurationconfigurationprotected ExecutionContextexecutionContextprotected ExecutionPhaseexecutionPhaseprotected ExtensionExecutorextensionExecutorprotected InterleavingGenerationContextgenerationContextprotected InterleavingGenerationPhasegenerationPhaseprotected IdentificationPhaseidentificationPhase
-
Constructor Summary
Constructors Constructor Description AbstractInterleavingPhaseManager(InterleavingPhaseManagerConfiguration configuration)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected voidcreatePhases()protected abstract voidexecuteClassificationPhase(Map<Combination,TestResult> errorConstraintExceptionCausingTestInputs)Template method implemented by error-constraint generating managers.voidrun()Runs the automation of the phases defined in the managerprotected Map<Combination,TestResult>runTestInput(Combination nextTestInput)passes test input to execution phase if result is not present in cache.
-
-
-
Field Detail
-
cache
protected final ResultCache cache
-
configuration
protected InterleavingPhaseManagerConfiguration configuration
-
executionContext
protected ExecutionContext executionContext
-
generationContext
protected InterleavingGenerationContext generationContext
-
extensionExecutor
protected ExtensionExecutor extensionExecutor
-
executionPhase
protected ExecutionPhase executionPhase
-
generationPhase
protected InterleavingGenerationPhase generationPhase
-
identificationPhase
protected IdentificationPhase identificationPhase
-
checkingPhase
protected CheckingPhase checkingPhase
-
-
Constructor Detail
-
AbstractInterleavingPhaseManager
public AbstractInterleavingPhaseManager(InterleavingPhaseManagerConfiguration configuration)
-
-
Method Detail
-
run
public void run()
Description copied from interface:PhaseManagerRuns the automation of the phases defined in the manager- Specified by:
runin interfacePhaseManager
-
createPhases
protected void createPhases()
-
executeClassificationPhase
protected abstract void executeClassificationPhase(Map<Combination,TestResult> errorConstraintExceptionCausingTestInputs)
Template method implemented by error-constraint generating managers.- Parameters:
errorConstraintExceptionCausingTestInputs- map containing all executedCombinations and the correspondingTestResults causing an exceptional-pass.
-
runTestInput
protected Map<Combination,TestResult> runTestInput(Combination nextTestInput)
passes test input to execution phase if result is not present in cache.- Parameters:
nextTestInput- test input to obtain result for.- Returns:
- executed test input with corresponding execution result.
-
-