PML analyzer

The PML analyzer is an open source API providing a simple DSL to build a description of the architecture of your chip based on the PHYLOG Model Language (PML). 

From this representation a set of safety and interference model templates can be generated to perfom safety and interference analyses of your platform.
The only dependencies of the PML analyzer are:
  • The Java Runtime Environment version 8 JRE 1.8 or newer.
  • The Simple Build Tool SBT 
 

Installing dependencies

Java 8

You need a working installation of the Java Runtime Environment version 8 (either OpenJDK or Oracle will do).  Installation procedures may vary depending on your system (Windows, OSX, Linux), please follow the official guidelines for your system.
 

 SBT

The compilation of a PML model can be easily perform with SBT. Installation procedures may vary depending on your system (Windows, OSX, Linux),  please follow the official guidelines for your system.
 

 Using the PML analyzer

 Overview

There is no installation procedure for the PML analyzer itself, simply create your own model by importing the ``pml.model`` package containing the basic constructors of the PML language. 
The possible operation that can be performed on a PML model (such as linking or unlinking entities) are provided in the ``pml.operators``  package.
 
Exporters to yuml and graphviz are provided in the ``pml.exporters`` package.  
        
The compilation of a PML model can be easily perform with SBT
  1.  First launch sbt in the project repository (this operation may take some time)  ```sbt ```
  2.  Once sbt is ready to receive command launch the compilation and execution of your PML model ```runMain pathToYourModel```
 

 Editing a PML Model

The PML analyzer is based on a platform description provided in a Scala embedded Domain Specific Language 
called PML. Therefore, PML analyzer can be seen as an API to easily build your model and to carry out automatic analyses.
 
Any IDE can be used to edit PML models, we can recommend Intellij IDEA that provides support plugins for Scala and SBT. 
 
Various benchmark systems for platform modeling are provided in the ``pml.examples`` package. These benchmarks can be used as a starting point to your modeling activity.
 

 Examples

All the previous examples are provided in a pre-compiled JAR file taht can be run with the following command
```java -jar pmlkeystone.jar```
Argumentation patterns
The justification patterns considered for the CAST32-A are provided in the ``views.patterns`` package. 
These patterns  can be used as a starting point to start your argumentation activity.
 
To compile and run the PHYLOG patterns example please enter the following commands:
```sbt runMain views.patterns.examples.PhylogPatterns```
 
To compile and run the PHYLOG pattern instances example please enter the following commands:
```sbt runMain views.patterns.examples.PhylogPatternsInstances```
 
A full java minimalist textual editor can be used to model patterns using various notations (GSN, PHYLOG, TOULMIN, RESSAC ) and export to LaTeX graphical (forest) or textual representation.
 
Modelling
Various benchmark systems for platform modeling are provided in the ``pml.examples`` package. These benchmarks can be used as a starting point to your modeling activity.
 
To compile and run the Keystone example please enter the following commands:
```sbt runMain pml.examples.keystone.KeystoneExport```
 
To compile and run the SimplePlatform example please enter the following commands:
```sbt runMain pml.examples.simple.SimpleExport```
 
Analysis
For each view (interference, patterns and dependability) examples are provided in the dedicated ``views.X.examples``.
These benchmarks can be used as a starting point to your analysis activity. For instance, we can carry out the interference analysis of the Keystone platform with
 ```
# example of a PML model where an IDP interference model is generated
 sbt runMain views.interference.examples.KeystoneExport
 
 # example of a PML model where a Cecilia export is generated 
sbt runMain views.dependability.examples.KeystoneExport
 ```
 
If the tool is running on a Unix System you can use the Makefile to compile the DOT and LaTeX generated file:
```
# compile the DOT files
make pml
 
# compile the LaTeX Argumentation Patterns
make patterns
 
# transform PDF to PNG
make png
``` 
 

External tools

The PML modeling does not rely on any external dependency. Nevertheless, it is possible to connect some backend analysis tools IDP for interference analysis, CeciliaOCAS or OpenAltarica for the safety analysis) to directly perform analyses out of your PML model. 
 

Contact

For any problem with the installation or usage of the PML analyzer please contact Kevin Delmas (kevin.delmas@onera.fr)