Interface IAnalysis

All Known Implementing Classes:
AbstractAnalysis, AbstractLQNAnalysis, AnalysisProxy, CostEvaluator, FeatureEvaluator, LQNSolverAnalysis, LQSimAnalysis, ReliabilityAnalysis, SecurityEvaluator, SimuComAnalysis, SimulizarAnalysis

public interface IAnalysis
Interface for analysis approaches that can be used within PerOpteryx. Can be used to start the analysis (#analyse()) and retrieve the last result. Check the methods for detailed call instructions (the protocols are complicated). TODO: Refactor this (after having refactored DSEWorkflowConfiguration, see there) and use DSE configuration classes instead of Eclipse ones. Configuration and execution are now already separated a bit. However, the analyses need the blackboard before they can determine their objectives. Thus, now the AnalysisProxy and the other analyses have different protocols, which is bad. Refactor more. Probably I need to reconsider the whole AnalysisProxy idea...
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Analyses the current PCM instance from the blackboard.
    List<org.opt4j.core.Criterion>
    Can only be called after initialisation (#initialise(MDSDBlackboard, ILaunchConfiguration, ILaunch, IProgressMonitor)).
    Returns a String that represents the quality attribute that this analysis determines.
    boolean
    Returns whether this analysis provides one objective per usage scenario.
    boolean
    Returns whether this analysis also provides statistics for the objectives.
    void
    Saves the passed Run Configuration information so that we do not have to pass them as parameters all the time.
    retrieveResultsFor(PCMPhenotype pheno, org.opt4j.core.Criterion criterion)
    This method can only be called after calling a #analyse() for this phenotype and the current PCM models of this candidate have to be in the Blackboard partition LoadPCMModelsIntoBlackboardJob.PCM_MODELS_PARTITION_ID FIXME: Make this method independent of the blackboard state.
    void
    setBlackboard(de.uka.ipd.sdq.workflow.mdsd.blackboard.MDSDBlackboard blackboard)
     
  • Method Details

    • analyse

      void analyse(PCMPhenotype pheno, IProgressMonitor monitor) throws CoreException, de.uka.ipd.sdq.workflow.jobs.UserCanceledException, de.uka.ipd.sdq.workflow.jobs.JobFailedException, AnalysisFailedException
      Analyses the current PCM instance from the blackboard. This method can only be called after calling #initialise(MDSDBlackboard, ILaunchConfiguration, ILaunch). The PCM instance for this PCMPhenotype has to be copied to the Blackboard into partition LoadPCMModelsIntoBlackboardJob.PCM_MODELS_PARTITION_ID before callings this. Otherwise, a wrong PCM model is analysed. The Analysis has to store the results for this PCMPhenotype, so that retrieveResultsFor(PCMPhenotype, Criterion) can be called on it multiple times. The results should be stored in a memory-efficient way.
      Parameters:
      pheno - TODO
      monitor -
      Throws:
      CoreException
      de.uka.ipd.sdq.workflow.jobs.UserCanceledException
      de.uka.ipd.sdq.workflow.jobs.JobFailedException
      AnalysisFailedException
    • initialise

      void initialise(DSEWorkflowConfiguration configuration) throws CoreException
      Saves the passed Run Configuration information so that we do not have to pass them as parameters all the time. For real analyses, you need to call setBlackboard before this so that the objectives can be determined from the usage model. For the AnalysisProxy it is ok to call this first, you then need to call setBlackboard before calling analyse(PCMPhenotype, IProgressMonitor), #retrieveLastResultsForObjective(Objective), #getObjectives(), or hasObjectivePerUsageScenario().
      Parameters:
      configuration -
      Throws:
      CoreException
    • retrieveResultsFor

      IAnalysisResult retrieveResultsFor(PCMPhenotype pheno, org.opt4j.core.Criterion criterion) throws CoreException, AnalysisFailedException
      This method can only be called after calling a #analyse() for this phenotype and the current PCM models of this candidate have to be in the Blackboard partition LoadPCMModelsIntoBlackboardJob.PCM_MODELS_PARTITION_ID FIXME: Make this method independent of the blackboard state. Currently, the SimuComAnalysis and the LQN analyses still require the current PCM model to be on the blackboard.
      Parameters:
      pheno - TODO
      criterion -
      Returns:
      Throws:
      CoreException
      AnalysisFailedException
    • getQualityAttribute

      Returns a String that represents the quality attribute that this analysis determines. This method can be called without initialization.
      Returns:
      Throws:
      CoreException
    • hasStatisticResultsFor

      boolean hasStatisticResultsFor() throws CoreException
      Returns whether this analysis also provides statistics for the objectives. This method can be called without initialization.
      Returns:
      Throws:
      CoreException
    • getCriterions

      List<org.opt4j.core.Criterion> getCriterions() throws CoreException
      Can only be called after initialisation (#initialise(MDSDBlackboard, ILaunchConfiguration, ILaunch, IProgressMonitor)).
      Returns:
      Throws:
      CoreException
    • hasObjectivePerUsageScenario

      boolean hasObjectivePerUsageScenario() throws CoreException
      Returns whether this analysis provides one objective per usage scenario. This method can be called before calling #initialise(MDSDBlackboard, ILaunchConfiguration, ILaunch, IProgressMonitor).
      Throws:
      CoreException
    • setBlackboard

      void setBlackboard(de.uka.ipd.sdq.workflow.mdsd.blackboard.MDSDBlackboard blackboard)