Interface InterpretationProcessor
-
- All Known Implementing Classes:
MaximizeInterpretationProcessor
public interface InterpretationProcessor
Performs further processing on interpretations, e.g. maximization.Note that sometimes it is necessary for processors to work on isolated states. Just consider a sat based maximization processor, which has to generate clauses to compute larger interpretations until we reach a maximum. Usually we do not want to pollute the shared state with these generated clauses, because it may cut off other solutions. In such cases we can tell the
Pipeline
to create a new state on which we perform the processing and which is only used by this processor.As a consequence the implementation of the
process
process} method must not rely on the fact that its state updates are seen by subsequent processors. Final updates on the shared state must therefore be performed in theupdateState(SatSolverState, PropositionalMapping, Interpretation, AbstractDialecticalFramework)
method, which is guaranteed to get the shared state.- Author:
- Mathias Hofer
-
-
Method Summary
Modifier and Type Method Description Interpretation
process(SatSolverState mainState, SatSolverState verificationState, PropositionalMapping mapping, Interpretation interpretation, AbstractDialecticalFramework adf)
Performs the processing of the given interpretation on a potential isolated state, meaning that the updates on this state are not seen by the subsequent processors.void
updateState(SatSolverState state, PropositionalMapping mapping, Interpretation processed, AbstractDialecticalFramework adf)
-
-
-
Method Detail
-
process
Interpretation process(SatSolverState mainState, SatSolverState verificationState, PropositionalMapping mapping, Interpretation interpretation, AbstractDialecticalFramework adf)
Performs the processing of the given interpretation on a potential isolated state, meaning that the updates on this state are not seen by the subsequent processors. If the given state is isolated or shared by the other processors depends on the configuration of thePipeline
and hence by the user.Necessary updates on the shared state have to be performed in the
updateState(SatSolverState, PropositionalMapping, Interpretation, AbstractDialecticalFramework)
method, which is called by the pipeline after the processing is done.- Parameters:
mainState
- a potentially isolated state or the shared oneverificationState
- the state which can be used for verification stepsmapping
- the shared encoding contextinterpretation
- the result of the previous processoradf
- the corresponding adf- Returns:
- an interpretation
-
updateState
void updateState(SatSolverState state, PropositionalMapping mapping, Interpretation processed, AbstractDialecticalFramework adf)
This method is called by thePipeline
on the shared state and the result of theprocess
method, hence after the processing is done.Note that if this processor has to update the shared state, it has to happen in this method. Since
process
may only have access to an isolated state to perform its processing.- Parameters:
state
- the shared statemapping
- the shared encoding contextprocessed
- the result of the process methodadf
- the corresponding adf
-
-