C# Class CyPhyMasterInterpreter.AnalysisModelProcessor

Provides the following functionalities: expand a context [design space -> configurations], run interpreters, post jobs to job manager.
ファイルを表示 Open project: metamorph-inc/meta-core Class Usage Examples

Protected Properties

Property Type Description
OriginalCurrentFCOName string

Public Methods

Method Description
DeleteTemporaryObjects ( ) : void

Deletes all temporary objects in the right order.

Expand ( ISIS.GME.Dsml.CyPhyML.Interfaces configuration ) : void

Expands the current context and sets the expanded object.

GetAnalysisModelProcessor ( IMgaModel context ) : AnalysisModelProcessor

Factory method to get a new analysis model processor instance based on a given context.

GetExpandedObject ( ) : MgaModel

Gets the expanded version of the invoked object.

GetInvokedObject ( ) : MgaModel

Gets the object from which the analysis model processor was instantiated.

GetResultsDirectory ( ) : string

Gets the results directory. Project directory/results/ All interpreters will get a subdirectory inside this one.

GetWorkflow ( ) : Queue

Gets the set of Interpreters form the workflow.

PostToJobManager ( JobManagerDispatch manager ) : bool

Posts the generated analysis packages to the JobManager for execution.

RunCAExporter ( IEnumerable cwcs ) : IEnumerable

Runs the Component Assembly exporter. Exports CWC configurations into Component Assemblies.

RunInterpreters ( bool passTraceability, bool verboseConsole ) : void

Runs all interpreters on the expanded context.

SaveDesign ( AVM projectManifest ) : bool

Exports the design into design interchange format AVM Design Model and indexes the file in the project manifest.

SaveDesignSpace ( AVM projectManifest ) : bool

Exports the design space into design interchange format AVM Design Model and indexes the file in the project manifest.

SaveTestBench ( AVM projectManifest ) : bool

Saves the test bench descriptor file to the test bench directory and indexes the newly generated file in the project manifest.

SaveTestBenchManifest ( AVM projectManifest, string configurationName, DateTime analysisStartTime ) : bool

Saves the test bench manifest file to interpreter's output directory and indexes the newly generated file in the project manifest.

ShowInterpreterConfigs ( CyPhyGUIs.IInterpreterConfiguration>.Dictionary interpreterConfigurations, bool firstTimeOnly = true, bool interactive = true ) : void

Shows all configuration dialog boxes for all interpreters that have to be configured. InterpretersToConfiguration

UpdateTestBenchManifestExecutionSteps ( AVM manifest ) : bool

Updates the execution steps in the test bench manifest file based on the Tasks and Execution tasks in the workflow.

Protected Methods

Method Description
AddToTraceabilityAndTemporary ( IMgaObject copied, IMgaObject original, bool recursive = true ) : void

Adds an object ID pair to the traceability map and adds the copied object to the temporary object list keeping track of the object to be deleted.

EnsureOutputDirectory ( ) : void

Ensures that output directory is not null and creates it if it does not exist already.

ExecuteInTransaction ( Action doWork, bool flushUndoQueue = true, bool abort = false ) : void

Helper function to execute an action within a transaction.

GetTemporaryFolderName ( IMgaObject originalObject ) : string

Gets the temporary folder name for a given object in GME.

GetTemporaryObjectName ( IMgaObject originalObject, IMgaObject configuration ) : string

Gets the temporary object name for a given object (context and configuration pair) in GME.

OnInterpreterProgress ( InterpreterProgressEventArgs eventArgs ) : void

Called when run interpreters make progress, like get configuration, initialize, etc.

ThrowIfNotExpanded ( ) : void

Checks if the original model is expanded or not.

Private Methods

Method Description
AddToTraceability ( IMgaObject copied, IMgaObject original, bool recursive = true ) : void

Adds an object ID pair to the traceability map.

CreateOutputDirectory ( ) : string

Create the output directory if it does not exist yet.

GetRandomSubDirectory ( string outputDir ) : string

Gets a randomly named subdirectory inside a given output directory.

The new directory will not start with a number.

Method Details

AddToTraceabilityAndTemporary() protected method

Adds an object ID pair to the traceability map and adds the copied object to the temporary object list keeping track of the object to be deleted.
protected AddToTraceabilityAndTemporary ( IMgaObject copied, IMgaObject original, bool recursive = true ) : void
copied IMgaObject Copy of the original object
original IMgaObject Original object
recursive bool Adds traceability recursively, but it does not add to the temporary objects recursively.
return void

DeleteTemporaryObjects() public method

Deletes all temporary objects in the right order.
public DeleteTemporaryObjects ( ) : void
return void

EnsureOutputDirectory() protected method

Ensures that output directory is not null and creates it if it does not exist already.
protected EnsureOutputDirectory ( ) : void
return void

ExecuteInTransaction() protected method

Helper function to execute an action within a transaction.
protected ExecuteInTransaction ( Action doWork, bool flushUndoQueue = true, bool abort = false ) : void
doWork Action Work that has to be done within a transaction.
flushUndoQueue bool Flushes undo queue to keep the memory usage down.
abort bool Aborts the transaction.
return void

Expand() public abstract method

Expands the current context and sets the expanded object.
public abstract Expand ( ISIS.GME.Dsml.CyPhyML.Interfaces configuration ) : void
configuration ISIS.GME.Dsml.CyPhyML.Interfaces Top level system under test will be redirected to this object.
return void

GetAnalysisModelProcessor() public static method

Factory method to get a new analysis model processor instance based on a given context.
If context is null. If context is not supported.
public static GetAnalysisModelProcessor ( IMgaModel context ) : AnalysisModelProcessor
context IMgaModel Model context
return AnalysisModelProcessor

GetExpandedObject() public abstract method

Gets the expanded version of the invoked object.
public abstract GetExpandedObject ( ) : MgaModel
return MgaModel

GetInvokedObject() public abstract method

Gets the object from which the analysis model processor was instantiated.
public abstract GetInvokedObject ( ) : MgaModel
return MgaModel

GetResultsDirectory() public method

Gets the results directory. Project directory/results/ All interpreters will get a subdirectory inside this one.
public GetResultsDirectory ( ) : string
return string

GetTemporaryFolderName() protected static method

Gets the temporary folder name for a given object in GME.
protected static GetTemporaryFolderName ( IMgaObject originalObject ) : string
originalObject IMgaObject Object to get the temporary folder name.
return string

GetTemporaryObjectName() protected static method

Gets the temporary object name for a given object (context and configuration pair) in GME.
protected static GetTemporaryObjectName ( IMgaObject originalObject, IMgaObject configuration ) : string
originalObject IMgaObject Object to get the temporary object name.
configuration IMgaObject Configuration generated from design space.
return string

GetWorkflow() public abstract method

Gets the set of Interpreters form the workflow.
public abstract GetWorkflow ( ) : Queue
return Queue

OnInterpreterProgress() protected method

Called when run interpreters make progress, like get configuration, initialize, etc.
protected OnInterpreterProgress ( InterpreterProgressEventArgs eventArgs ) : void
eventArgs InterpreterProgressEventArgs Interpreter event arguments.
return void

PostToJobManager() public abstract method

Posts the generated analysis packages to the JobManager for execution.
public abstract PostToJobManager ( JobManagerDispatch manager ) : bool
manager JobManagerDispatch JobManager instance to post the job to.
return bool

RunCAExporter() public method

Runs the Component Assembly exporter. Exports CWC configurations into Component Assemblies.
public RunCAExporter ( IEnumerable cwcs ) : IEnumerable
cwcs IEnumerable Set of CWCs to export.
return IEnumerable

RunInterpreters() public method

Runs all interpreters on the expanded context.
public RunInterpreters ( bool passTraceability, bool verboseConsole ) : void
passTraceability bool If true passes traceability information for the interpreters.
verboseConsole bool Passes value to the interpreter if they can write verbose (debug) messages to the console or not.
return void

SaveDesign() public method

Exports the design into design interchange format AVM Design Model and indexes the file in the project manifest.
public SaveDesign ( AVM projectManifest ) : bool
projectManifest AVM Given project manifest object.
return bool

SaveDesignSpace() public method

Exports the design space into design interchange format AVM Design Model and indexes the file in the project manifest.
public SaveDesignSpace ( AVM projectManifest ) : bool
projectManifest AVM Given project manifest object.
return bool

SaveTestBench() public abstract method

Saves the test bench descriptor file to the test bench directory and indexes the newly generated file in the project manifest.
public abstract SaveTestBench ( AVM projectManifest ) : bool
projectManifest AVM Manifest object of the project.
return bool

SaveTestBenchManifest() public abstract method

Saves the test bench manifest file to interpreter's output directory and indexes the newly generated file in the project manifest.
public abstract SaveTestBenchManifest ( AVM projectManifest, string configurationName, DateTime analysisStartTime ) : bool
projectManifest AVM Manifest object of the project.
configurationName string
analysisStartTime DateTime
return bool

ShowInterpreterConfigs() public method

Shows all configuration dialog boxes for all interpreters that have to be configured. InterpretersToConfiguration
public ShowInterpreterConfigs ( CyPhyGUIs.IInterpreterConfiguration>.Dictionary interpreterConfigurations, bool firstTimeOnly = true, bool interactive = true ) : void
interpreterConfigurations CyPhyGUIs.IInterpreterConfiguration>.Dictionary Map that stores the configurations.
firstTimeOnly bool If true shows the configurations at the first time only, otherwise it shows always.
interactive bool
return void

ThrowIfNotExpanded() protected method

Checks if the original model is expanded or not.
If Expand was not called before.
protected ThrowIfNotExpanded ( ) : void
return void

UpdateTestBenchManifestExecutionSteps() public abstract method

Updates the execution steps in the test bench manifest file based on the Tasks and Execution tasks in the workflow.
public abstract UpdateTestBenchManifestExecutionSteps ( AVM manifest ) : bool
manifest AVM
return bool

Property Details

OriginalCurrentFCOName protected_oe property

protected string OriginalCurrentFCOName
return string