Class ReasonerAdapter.FrontendReasonerAdapter
- java.lang.Object
-
- net.ssehub.easy.reasoning.core.frontend.ReasonerAdapter.FrontendReasonerAdapter
-
- All Implemented Interfaces:
ReasonerAdapter.IReasonerAdapter
- Enclosing class:
- ReasonerAdapter
private class ReasonerAdapter.FrontendReasonerAdapter extends java.lang.Object implements ReasonerAdapter.IReasonerAdapter
Implements a full/fallback reasoner adapter.- Author:
- Holger Eichelberger
-
-
Constructor Summary
Constructors Modifier Constructor Description privateFrontendReasonerAdapter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ReasoningResultcheck(Configuration cfg, ReasonerConfiguration reasonerConfiguration, ProgressObserver observer)Checks the configuration according to the given project structure and does not affect the configuration.ValueCreationResultcreateValue(Configuration cfg, AbstractVariable var, IDatatype type, ReasonerConfiguration reasonerConfiguration, ProgressObserver observer)Creates the value for a certain IVML type/variable.EvaluationResultevaluate(Configuration cfg, java.util.List<Constraint> constraints, ReasonerConfiguration reasonerConfiguration, ProgressObserver observer)Evaluates a given list of constraints (in the sense of boolean conditions) which are related to and valid in the context of the given project and configuration.ReasoningResultisConsistent(Configuration cfg, ReasonerConfiguration reasonerConfiguration, ProgressObserver observer)Checks whether a given variability model (project) is satisfiable.ReasoningResultpropagate(Configuration cfg, ReasonerConfiguration rConfig, ProgressObserver observer)Checks the configuration according to the given model and propagates values, if possible.
-
-
-
Method Detail
-
propagate
public ReasoningResult propagate(Configuration cfg, ReasonerConfiguration rConfig, ProgressObserver observer)
Description copied from interface:ReasonerAdapter.IReasonerAdapterChecks the configuration according to the given model and propagates values, if possible.- Specified by:
propagatein interfaceReasonerAdapter.IReasonerAdapter- Parameters:
cfg- The configuration to reason on (may be modified as a side effect of value propagation)rConfig- the reasoner configuration to be used for reasoning (e.g. taken from the UI, may be null)observer- an optional progress observer, shall beProgressObserver.NO_OBSERVERif unused- Returns:
- The result of this reasoning step. Can have the status
Status.UNSUPPORTEDif the concrete reasoner does not support this operation.
-
isConsistent
public ReasoningResult isConsistent(Configuration cfg, ReasonerConfiguration reasonerConfiguration, ProgressObserver observer)
Description copied from interface:ReasonerAdapter.IReasonerAdapterChecks whether a given variability model (project) is satisfiable.- Specified by:
isConsistentin interfaceReasonerAdapter.IReasonerAdapter- Parameters:
cfg- The configuration to reason on.reasonerConfiguration- the reasoner configuration to be used for reasoning (e.g. taken from the UI, may be null)observer- an optional progress observer, shall beProgressObserver.NO_OBSERVERif unused- Returns:
- The result of this reasoning step. Can have the status
Status.UNSUPPORTEDif the concrete reasoner does not support this operation.
-
check
public ReasoningResult check(Configuration cfg, ReasonerConfiguration reasonerConfiguration, ProgressObserver observer)
Description copied from interface:ReasonerAdapter.IReasonerAdapterChecks the configuration according to the given project structure and does not affect the configuration.- Specified by:
checkin interfaceReasonerAdapter.IReasonerAdapter- Parameters:
cfg- The configuration to reason on.reasonerConfiguration- the reasoner configuration to be used for reasoning (e.g. taken from the UI, may be null)observer- an optional progress observer, shall beProgressObserver.NO_OBSERVERif unused- Returns:
- The result of this reasoning step. Can have the status
Status.UNSUPPORTEDif the concrete reasoner does not support this operation.
-
evaluate
public EvaluationResult evaluate(Configuration cfg, java.util.List<Constraint> constraints, ReasonerConfiguration reasonerConfiguration, ProgressObserver observer)
Description copied from interface:ReasonerAdapter.IReasonerAdapterEvaluates a given list of constraints (in the sense of boolean conditions) which are related to and valid in the context of the given project and configuration.- Specified by:
evaluatein interfaceReasonerAdapter.IReasonerAdapter- Parameters:
cfg- The configuration to reason on.constraints- the constraints (expressions which evaluate to a boolean value)reasonerConfiguration- the reasoner configuration to be used for reasoning (e.g. taken from the UI, may be null)observer- an optional progress observer, shall beProgressObserver.NO_OBSERVERif unused- Returns:
- The result of this reasoning step. Can have the status
Status.UNSUPPORTEDif the concrete reasoner does not support this operation.
-
createValue
public ValueCreationResult createValue(Configuration cfg, AbstractVariable var, IDatatype type, ReasonerConfiguration reasonerConfiguration, ProgressObserver observer)
Description copied from interface:ReasonerAdapter.IReasonerAdapterCreates the value for a certain IVML type/variable.- Specified by:
createValuein interfaceReasonerAdapter.IReasonerAdapter- Parameters:
cfg- the configuration to operate on (will not be modified)var- the variable to create the value for (may be null iftypeis given, may imply additional constraints)type- the type to create the value for (may be null ifvaris given)reasonerConfiguration- the reasoner configuration to be used for reasoning (e.g. taken from the UI, may be null)observer- an optional progress observer, shall beProgressObserver.NO_OBSERVERif unused- Returns:
- the value creation result
-
-