mirror of
http://172.16.200.102/MOISE/Pattern-Instanciation-On-System-Engineering-Model.git
synced 2025-11-26 02:57:58 +01:00
Initial commit.
This commit is contained in:
18
examples/pseim.examples/.project
Normal file
18
examples/pseim.examples/.project
Normal file
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>pseim.examples</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.sirius.nature.modelingproject</nature>
|
||||
<nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
@@ -0,0 +1,2 @@
|
||||
eclipse.preferences.version=1
|
||||
encoding/README.html=UTF-8
|
||||
39
examples/pseim.examples/ArchiImplemOcaml.seimx
Normal file
39
examples/pseim.examples/ArchiImplemOcaml.seimx
Normal file
@@ -0,0 +1,39 @@
|
||||
model ImplemOcaml {
|
||||
component ID (out tIDENT)
|
||||
component MID (out tMIDENT)
|
||||
component MODELE (in IP, in OP, in SC, out tMODELE)
|
||||
component PATTERN (in IP, in OP, in SC, out tPATTERN)
|
||||
ID.tIDENT -> MODELE.IP
|
||||
ID.tIDENT -> MODELE.OP
|
||||
MID.tMIDENT -> MODELE.SC
|
||||
MID.tMIDENT -> PATTERN.IP
|
||||
MID.tMIDENT -> PATTERN.OP
|
||||
MID.tMIDENT -> PATTERN.SC
|
||||
component UNFOLD_MAPPING (in UM, in PM, out tMODELE, out PMAP, out IMAP, out UM) {
|
||||
component UNFOLD (in PM, out o)
|
||||
component PATTERN_MAPPING (in UM, in PM, out o)
|
||||
component INSTANCE_MAPPING (in i1, in i2, out o)
|
||||
UNFOLD_MAPPING.UM -> PATTERN_MAPPING.UM
|
||||
UNFOLD_MAPPING.PM -> PATTERN_MAPPING.PM
|
||||
UNFOLD_MAPPING.PM -> UNFOLD.PM
|
||||
UNFOLD.o -> INSTANCE_MAPPING.i2
|
||||
UNFOLD_MAPPING.PM -> INSTANCE_MAPPING.i1
|
||||
PATTERN_MAPPING.o -> PMAP
|
||||
INSTANCE_MAPPING.o -> IMAP
|
||||
}
|
||||
MODELE.tMODELE -> UNFOLD_MAPPING.UM
|
||||
PATTERN.tPATTERN -> UNFOLD_MAPPING.PM
|
||||
component APPLY (in IM, in PM, in i, out tMODELE) {
|
||||
component SOMME (out o)
|
||||
component MSOMME (out o)
|
||||
component MSOMME2 (out o)
|
||||
component MODELE (in IP, in OP, in SC, out tMODELE)
|
||||
SOMME.o -> MODELE.IP
|
||||
MSOMME.o -> MODELE.OP
|
||||
MSOMME2.o -> MODELE.SC
|
||||
MODELE.tMODELE -> tMODELE
|
||||
}
|
||||
MODELE.tMODELE -> ImplemOcaml.APPLY.IM
|
||||
UNFOLD_MAPPING.tMODELE -> APPLY.PM
|
||||
UNFOLD_MAPPING.IMAP -> APPLY.i
|
||||
}
|
||||
55
examples/pseim.examples/README.html
Normal file
55
examples/pseim.examples/README.html
Normal file
@@ -0,0 +1,55 @@
|
||||
<?xml version='1.0' encoding='utf-8' ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||
</head>
|
||||
<body>
|
||||
<h1 id="tests-and-instances-notes">Tests and instances notes</h1>
|
||||
<p>This folder contains some model instances conforms to the seim and pseim metamodels.</p>
|
||||
<h2 id="models-details">Models details</h2>
|
||||
<h3 id="archiimplemocaml-seimx">ArchiImplemOcaml.seimx</h3>
|
||||
<p>This model contains the structure of the OCaml code provided as an implementation of the pattern instantiation and application Event-B model.</p>
|
||||
<h3 id="test_moong_1">Test
|
||||
<em>MoonG</em>1
|
||||
</h3>
|
||||
<h4 id="first-test">First test</h4>
|
||||
<p>The pattern files for this test is N-Version Programing.pseimx. It represents the "N Version Programming" pattern provided in [1].</p>
|
||||
<p>Parameters of the pattern: </p>
|
||||
<ul>
|
||||
<li>comp: a component that is replicated</li>
|
||||
<li>nb_in: the number of input ports of the component that is replicated</li>
|
||||
<li>nb_out: the number of output ports of the component that is replicated</li>
|
||||
<li>nb_comp: the number of times the component is replicated</li>
|
||||
</ul>
|
||||
<h5 id="first-instantiation">First instantiation</h5>
|
||||
<p>Patter instanciation inputs:</p>
|
||||
<ul>
|
||||
<li>The source model (source.seimx)</li>
|
||||
<li>The pattern instantiation parameters values: comp = System.Sub1; nb_in = 2; nb_out = 1; nb_comp = 3</li>
|
||||
</ul>
|
||||
<p>Pattern elaboration: </p>
|
||||
<ul>
|
||||
<li>unfold.seimx </li>
|
||||
</ul>
|
||||
<p>Pattern application:</p>
|
||||
<ul>
|
||||
<li>result2.seimx</li>
|
||||
</ul>
|
||||
<h5 id="second-instantiation">Second instantiation</h5>
|
||||
<p>Patter instanciation inputs:</p>
|
||||
<ul>
|
||||
<li>The source model (source2.seimx)</li>
|
||||
<li>The pattern instantiation parameters values: comp = System.Sub1; nb_in = 2; nb_out = 2; nb_comp = 3</li>
|
||||
</ul>
|
||||
<p>Pattern elaboration: </p>
|
||||
<ul>
|
||||
<li>unfold_1.seimx </li>
|
||||
</ul>
|
||||
<p>Pattern application:</p>
|
||||
<ul>
|
||||
<li>result.seimx</li>
|
||||
</ul>
|
||||
<h2 id="references">References</h2>
|
||||
<p>[1] C. Preschern, N. Kajtazovic, et C. Kreiner, « Building a Safety Architecture Pattern System », in Proceedings of the 18th European Conference on Pattern Languages of Program, New York, NY, USA, 2015</p>
|
||||
</body>
|
||||
</html>
|
||||
50
examples/pseim.examples/README.md
Normal file
50
examples/pseim.examples/README.md
Normal file
@@ -0,0 +1,50 @@
|
||||
# Tests and instances notes
|
||||
|
||||
This folder contains some model instances conforms to the seim and pseim metamodels.
|
||||
|
||||
## Models details
|
||||
|
||||
### ArchiImplemOcaml.seimx
|
||||
|
||||
This model contains the structure of the OCaml code provided as an implementation of the pattern instantiation and application Event-B model.
|
||||
|
||||
### Test_MoonG_1
|
||||
|
||||
#### First test
|
||||
|
||||
The pattern files for this test is N-Version Programing.pseimx. It represents the "N Version Programming" pattern provided in [1].
|
||||
|
||||
Parameters of the pattern:
|
||||
* comp: a component that is replicated
|
||||
* nb\_in: the number of input ports of the component that is replicated
|
||||
* nb\_out: the number of output ports of the component that is replicated
|
||||
* nb\_comp: the number of times the component is replicated
|
||||
|
||||
##### First instantiation
|
||||
|
||||
Patter instanciation inputs:
|
||||
* The source model (source.seimx)
|
||||
* The pattern instantiation parameters values: comp = System.Sub1; nb\_in = 2; nb\_out = 1; nb\_comp = 3
|
||||
|
||||
Pattern elaboration:
|
||||
* unfold.seimx
|
||||
|
||||
Pattern application:
|
||||
* result2.seimx
|
||||
|
||||
##### Second instantiation
|
||||
|
||||
|
||||
Patter instanciation inputs:
|
||||
* The source model (source2.seimx)
|
||||
* The pattern instantiation parameters values: comp = System.Sub1; nb\_in = 2; nb\_out = 2; nb\_comp = 3
|
||||
|
||||
Pattern elaboration:
|
||||
* unfold_1.seimx
|
||||
|
||||
Pattern application:
|
||||
* result.seimx
|
||||
|
||||
## References
|
||||
|
||||
[1] C. Preschern, N. Kajtazovic, et C. Kreiner, « Building a Safety Architecture Pattern System », in Proceedings of the 18th European Conference on Pattern Languages of Program, New York, NY, USA, 2015
|
||||
@@ -0,0 +1,11 @@
|
||||
pattern N_Version_Programming(nb_in, nb_out, nb_comp) {
|
||||
component NVerProg(in i[nb_in], out o[nb_out]) {
|
||||
component dupl[nb_in](in i[1], out o[nb_comp])
|
||||
component comp[nb_comp](in i[nb_in], out o[nb_out])
|
||||
component vote[nb_out]( in i[nb_comp], out o)
|
||||
i -{Transpose}-> dupl.i
|
||||
dupl.o -{Transpose}-> comp.i
|
||||
comp.o -{Transpose}-> vote.i
|
||||
vote.o -{Transpose}-> o
|
||||
}
|
||||
}
|
||||
35
examples/pseim.examples/Test_MoonG_1/result.seimx
Normal file
35
examples/pseim.examples/Test_MoonG_1/result.seimx
Normal file
@@ -0,0 +1,35 @@
|
||||
model result {
|
||||
component System(in i1,in i2,out o1, out o2) {
|
||||
component Sub2(in i,out o)
|
||||
component Sub1(in i1,in i2,out o1,out o2) {
|
||||
component vote_2(in i_1,in i_2,in i_3,out o_1)
|
||||
component vote_1(in i_1,in i_2,in i_3,out o_1)
|
||||
component dupl_2(in i_1,out o_1,out o_2,out o_3)
|
||||
component dupl_1(in i_1,out o_1,out o_2,out o_3)
|
||||
component Sub1_3(in i_1,in i_2,out o_1,out o_2)
|
||||
component Sub1_2(in i_1,in i_2,out o_1,out o_2)
|
||||
component Sub1_1(in i_1,in i_2,out o_1,out o_2)
|
||||
i1 -> dupl_2.i_1
|
||||
i2 -> dupl_1.i_1
|
||||
dupl_2.o_3 -> Sub1_3.i_2
|
||||
dupl_2.o_2 -> Sub1_2.i_2
|
||||
dupl_2.o_1 -> Sub1_1.i_2
|
||||
dupl_1.o_3 -> Sub1_3.i_1
|
||||
dupl_1.o_2 -> Sub1_2.i_1
|
||||
dupl_1.o_1 -> Sub1_1.i_1
|
||||
Sub1_3.o_2 -> vote_2.i_3
|
||||
Sub1_3.o_1 -> vote_1.i_3
|
||||
Sub1_2.o_2 -> vote_2.i_2
|
||||
Sub1_2.o_1 -> vote_1.i_2
|
||||
Sub1_1.o_2 -> vote_2.i_1
|
||||
Sub1_1.o_1 -> vote_1.i_1
|
||||
vote_2.o_1 -> o1
|
||||
vote_1.o_1 -> o2
|
||||
}
|
||||
i1 -> Sub1.i1
|
||||
i2 -> Sub1.i2
|
||||
Sub1.o1 -> Sub2.i
|
||||
Sub1.o2 -> o2
|
||||
Sub2.o -> o1
|
||||
}
|
||||
}
|
||||
29
examples/pseim.examples/Test_MoonG_1/result2.seimx
Normal file
29
examples/pseim.examples/Test_MoonG_1/result2.seimx
Normal file
@@ -0,0 +1,29 @@
|
||||
model result {
|
||||
component System(in i1,in i2,out o1 ) {
|
||||
component Sub2(in i,out o)
|
||||
component Sub1(in i1,in i2,out o1 ) {
|
||||
component vote_1(in i_1,in i_2,in i_3,out o_1)
|
||||
component dupl_2(in i_1,out o_1,out o_2,out o_3)
|
||||
component dupl_1(in i_1,out o_1,out o_2,out o_3)
|
||||
component Sub1_3(in i_1,in i_2,out o_2)
|
||||
component Sub1_2(in i_1,in i_2,out o_2)
|
||||
component Sub1_1(in i_1,in i_2,out o_2)
|
||||
i1 -> dupl_2.i_1
|
||||
i2 -> dupl_1.i_1
|
||||
dupl_2.o_3 -> Sub1_3.i_2
|
||||
dupl_2.o_2 -> Sub1_2.i_2
|
||||
dupl_2.o_1 -> Sub1_1.i_2
|
||||
dupl_1.o_3 -> Sub1_3.i_1
|
||||
dupl_1.o_2 -> Sub1_2.i_1
|
||||
dupl_1.o_1 -> Sub1_1.i_1
|
||||
Sub1_3.o_2 -> vote_1.i_3
|
||||
Sub1_2.o_2 -> vote_1.i_2
|
||||
Sub1_1.o_2 -> vote_1.i_1
|
||||
vote_1.o_1 -> o1
|
||||
}
|
||||
i1 -> Sub1.i1
|
||||
i2 -> Sub1.i2
|
||||
Sub1.o1 -> Sub2.i
|
||||
Sub2.o -> o1
|
||||
}
|
||||
}
|
||||
10
examples/pseim.examples/Test_MoonG_1/source.seimx
Normal file
10
examples/pseim.examples/Test_MoonG_1/source.seimx
Normal file
@@ -0,0 +1,10 @@
|
||||
model source {
|
||||
component System(in i1, in i2, out o1) {
|
||||
component Sub1(in i1, in i2, out o)
|
||||
component Sub2(in i, out o)
|
||||
i1 -> Sub1.i1
|
||||
i2 -> Sub1.i2
|
||||
Sub1.o -> Sub2.i
|
||||
Sub2.o -> o1
|
||||
}
|
||||
}
|
||||
11
examples/pseim.examples/Test_MoonG_1/source2.seimx
Normal file
11
examples/pseim.examples/Test_MoonG_1/source2.seimx
Normal file
@@ -0,0 +1,11 @@
|
||||
model source {
|
||||
component System(in i1, in i2, out o1, out o2) {
|
||||
component Sub1(in i1, in i2, out o1, out o2)
|
||||
component Sub2(in i, out o)
|
||||
i1 -> Sub1.i1
|
||||
i2 -> Sub1.i2
|
||||
Sub1.o1 -> Sub2.i
|
||||
Sub2.o -> o1
|
||||
Sub1.o2 -> o2
|
||||
}
|
||||
}
|
||||
22
examples/pseim.examples/Test_MoonG_1/unfold.seimx
Normal file
22
examples/pseim.examples/Test_MoonG_1/unfold.seimx
Normal file
@@ -0,0 +1,22 @@
|
||||
model unfold {
|
||||
component NVerProg(in i_1,in i_2,out o_1) {
|
||||
component vote_1(in i_1,in i_2,in i_3,out o_1) {}
|
||||
component dupl_2(in i_1,out o_1,out o_2,out o_3) {}
|
||||
component dupl_1(in i_1,out o_1,out o_2,out o_3) {}
|
||||
component comp_3(in i_1,in i_2,out o_1) {}
|
||||
component comp_2(in i_1,in i_2,out o_1) {}
|
||||
component comp_1(in i_1,in i_2,out o_1) {}
|
||||
i_2 -> dupl_2.i_1
|
||||
i_1 -> dupl_1.i_1
|
||||
dupl_2.o_3 -> comp_3.i_2
|
||||
dupl_2.o_2 -> comp_2.i_2
|
||||
dupl_2.o_1 -> comp_1.i_2
|
||||
dupl_1.o_3 -> comp_3.i_1
|
||||
dupl_1.o_2 -> comp_2.i_1
|
||||
dupl_1.o_1 -> comp_1.i_1
|
||||
comp_3.o_1 -> vote_1.i_3
|
||||
comp_2.o_1 -> vote_1.i_2
|
||||
comp_1.o_1 -> vote_1.i_1
|
||||
vote_1.o_1 -> o_1
|
||||
}
|
||||
}
|
||||
41
examples/pseim.examples/Test_MoonG_1/unfold_1.seimx
Normal file
41
examples/pseim.examples/Test_MoonG_1/unfold_1.seimx
Normal file
@@ -0,0 +1,41 @@
|
||||
model unfold_NVerProg {
|
||||
component NVerProg(in i_1,in i_2,out o_1,out o_2) {
|
||||
component vote_2(in i_1,in i_2,in i_3,out o_1) {
|
||||
|
||||
}
|
||||
component vote_1(in i_1,in i_2,in i_3,out o_1) {
|
||||
|
||||
}
|
||||
component dupl_2(in i_1,out o_1,out o_2,out o_3) {
|
||||
|
||||
}
|
||||
component dupl_1(in i_1,out o_1,out o_2,out o_3) {
|
||||
|
||||
}
|
||||
component comp_3(in i_1,in i_2,out o_1,out o_2) {
|
||||
|
||||
}
|
||||
component comp_2(in i_1,in i_2,out o_1,out o_2) {
|
||||
|
||||
}
|
||||
component comp_1(in i_1,in i_2,out o_1,out o_2) {
|
||||
|
||||
}
|
||||
i_2 -> dupl_2.i_1
|
||||
i_1 -> dupl_1.i_1
|
||||
dupl_2.o_3 -> comp_3.i_2
|
||||
dupl_2.o_2 -> comp_2.i_2
|
||||
dupl_2.o_1 -> comp_1.i_2
|
||||
dupl_1.o_3 -> comp_3.i_1
|
||||
dupl_1.o_2 -> comp_2.i_1
|
||||
dupl_1.o_1 -> comp_1.i_1
|
||||
comp_3.o_2 -> vote_2.i_3
|
||||
comp_3.o_1 -> vote_1.i_3
|
||||
comp_2.o_2 -> vote_2.i_2
|
||||
comp_2.o_1 -> vote_1.i_2
|
||||
comp_1.o_2 -> vote_2.i_1
|
||||
comp_1.o_1 -> vote_1.i_1
|
||||
vote_2.o_1 -> o_2
|
||||
vote_1.o_1 -> o_1
|
||||
}
|
||||
}
|
||||
28977
examples/pseim.examples/representations.aird
Normal file
28977
examples/pseim.examples/representations.aird
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user