diff --git a/examples/pseim.examples/.project b/examples/pseim.examples/.project index 23ac598..d3c996c 100644 --- a/examples/pseim.examples/.project +++ b/examples/pseim.examples/.project @@ -15,4 +15,11 @@ <nature>org.eclipse.sirius.nature.modelingproject</nature> <nature>org.eclipse.xtext.ui.shared.xtextNature</nature> </natures> + <linkedResources> + <link> + <name>EXAMPLES</name> + <type>2</type> + <locationURI>PARENT-3-PROJECT_LOC/PATTERNS/CAML/EXAMPLES</locationURI> + </link> + </linkedResources> </projectDescription> diff --git a/examples/pseim.examples/n-version-programming/model.seimx b/examples/pseim.examples/n-version-programming/model.seimx new file mode 100644 index 0000000..a6eab65 --- /dev/null +++ b/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 + } +} \ No newline at end of file diff --git a/examples/pseim.examples/n-version-programming/model_nverg.mapping b/examples/pseim.examples/n-version-programming/model_nverg.mapping new file mode 100644 index 0000000..14405c3 --- /dev/null +++ b/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 +} \ No newline at end of file diff --git a/examples/pseim.examples/n-version-programming/nverg.pseimx b/examples/pseim.examples/n-version-programming/nverg.pseimx new file mode 100644 index 0000000..90387fa --- /dev/null +++ b/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 + } +} \ No newline at end of file