Browse Source

Added N-Version programming pattern description + mapping to simple seim

model in examples.
master
Arnaud Dieumegard 6 years ago
parent
commit
26b051b0cf
  1. 7
      examples/pseim.examples/.project
  2. 11
      examples/pseim.examples/n-version-programming/model.seimx
  3. 12
      examples/pseim.examples/n-version-programming/model_nverg.mapping
  4. 11
      examples/pseim.examples/n-version-programming/nverg.pseimx

7
examples/pseim.examples/.project

@ -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

@ -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
}
}

12
examples/pseim.examples/n-version-programming/model_nverg.mapping

@ -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

@ -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
}
}
Loading…
Cancel
Save