mirror of
http://172.16.200.102/MOISE/Pattern-Instanciation-On-System-Engineering-Model.git
synced 2025-11-26 00:27:59 +01:00
Added N-Version programming pattern description + mapping to simple seim
model in examples.
This commit is contained in:
@@ -15,4 +15,11 @@
|
|||||||
<nature>org.eclipse.sirius.nature.modelingproject</nature>
|
<nature>org.eclipse.sirius.nature.modelingproject</nature>
|
||||||
<nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
|
<nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
|
||||||
</natures>
|
</natures>
|
||||||
|
<linkedResources>
|
||||||
|
<link>
|
||||||
|
<name>EXAMPLES</name>
|
||||||
|
<type>2</type>
|
||||||
|
<locationURI>PARENT-3-PROJECT_LOC/PATTERNS/CAML/EXAMPLES</locationURI>
|
||||||
|
</link>
|
||||||
|
</linkedResources>
|
||||||
</projectDescription>
|
</projectDescription>
|
||||||
|
|||||||
11
examples/pseim.examples/n-version-programming/model.seimx
Normal file
11
examples/pseim.examples/n-version-programming/model.seimx
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
model test {
|
||||||
|
component comp (in i1, in i2, out o1) {
|
||||||
|
component sc1(in i1, in i2, out o1, out o2)
|
||||||
|
component sc2(in i1, in i2, out o)
|
||||||
|
i1 -> sc1.i1
|
||||||
|
i2 -> sc1.i2
|
||||||
|
sc1.o1 -> sc2.i1
|
||||||
|
sc1.o2 -> sc2.i2
|
||||||
|
sc2.o -> o1
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
transform test using nverG {
|
||||||
|
multiplicity
|
||||||
|
nverG.nb_in -> 2
|
||||||
|
nverG.nb_vin -> 6
|
||||||
|
nverG.nb_out -> 2
|
||||||
|
nverG.nb_comp -> 3
|
||||||
|
components
|
||||||
|
test.comp -> nverG.top
|
||||||
|
ports
|
||||||
|
test.comp.sc1.i1, test.comp.sc1.i2 -> nverG.top.i
|
||||||
|
test.comp.sc1.o1, test.comp.sc1.o2 -> nverG.top.o
|
||||||
|
}
|
||||||
11
examples/pseim.examples/n-version-programming/nverg.pseimx
Normal file
11
examples/pseim.examples/n-version-programming/nverg.pseimx
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
pattern nverG (nb_in, nb_out, nb_comp, nb_vin) {
|
||||||
|
component top (in i[nb_in], out o[nb_out]) {
|
||||||
|
component split[nb_in](in i[1], out o[nb_comp])
|
||||||
|
component comp[nb_comp](in i[nb_in], out o[nb_out])
|
||||||
|
component vote[1](in i[nb_vin], out o[nb_out])
|
||||||
|
i -{Transpose}-> split.i
|
||||||
|
split.o -{Transpose}-> comp.i
|
||||||
|
comp.o -{FlattenC}-> vote.i
|
||||||
|
vote.o -{Identity}-> o
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user