General Information on the Machine Code Analysis Component
Machine Code Analysis is integrated into EcoStruxure Machine Expert to analyze applications.
Machine Code Analysis focuses on the following key elements:
oUnderstanding the structure of the source code. Software developers can visualize, for example, code dependencies and explore it step by step.
oIdentification of code deficiencies to harmonize and improve the source code by defined programming guidelines.
oMeasurement of source code quality and identifying the KPIs (Key Performance Indicators).
oReporting the KPIs to the software developers for personal purpose.
Beside the system requirements for EcoStruxure Machine Expert, Machine Code Analysis has additional requirements regarding the hardware and the operating system.
The minimum requirements are:
o4 CPU cores for parallel query execution
o4 GB RAM
To analyze projects, the following requirements are suggested:
oWindows 64 bit
o≥4 CPU cores for parallel query execution
o≥8 GB RAM
To use Machine Code Analysis in EcoStruxure Machine Expert Logic Builder, the component has to be installed with the EcoStruxure Machine Expert Installer.
Machine Code Analysis is under license protection:
Function |
Without license |
With license |
---|---|---|
Dependency View |
Limited to two diagrams. |
Not limited. |
Metrics Table |
Limited to two objects and three active queries. |
Not limited. |
Conventions Table |
Limited to two objects and three active queries. |
Not limited. |
Query Editor |
Not available. |
Available. |
Python CodeAnalysis API |
Not available. |
Available. |
NOTE: For more information about product licensing, contact your local Schneider Electric representative.
With the three code analysis editors in EcoStruxure Machine Expert Logic Builder you can analyze and interpret the results of a code analysis:
oConventions Table editor
Parts of the application that violate the defined coding conventions (based on coding rules).
oDependency View editor
Dependencies between namespaces, libraries, objects (function blocks, POUs, and so on).
oMetrics Table editor
Results of code quality figures, like LOC (Lines of Code), complexity, and so on.
Multiple instances of code analysis objects can be added beneath Application, folders, or Code Analysis Manager.
Several code analysis objects can be added to an application.
So it is possible to store analysis results for example, for each module of an application.
Adding a code analysis object to an application automatically adds a Code Analysis Manager to the Application object.
A BlockList object can be added beneath a Code Analysis Manager object. The BlockList object contains elements that should not appear in Conventions Table, Metrics Table, or Dashboard results.
With the Code Analysis Manager, you can configure analysis queries, analysis depth, and the Triple Storage. It also provides a quick overview via dashboard.
The Code Analysis Manager provides seven tabs:
oDashboard tab
Overview of the analyzed application.
oConfiguration tab
Analysis depth and Triple Storage configuration.
oCloud Connection tab
Cloud connection configuration.
oDependency (Filter) Queries tab
Queries and query chains available in the Filters of the Dependency View editor can be organized and edited.
oDependency (Select) Queries tab
Queries and query chains available in the Select and Add dialog of the Dependency View editor can be organized and edited.
oMetric Queries tab
Queries and query chains available in the Metrics Table editor can be organized and edited.
oConvention Queries tab
Queries and query chains available in the Conventions Table editor can be organized and edited.