# 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 MoonG1

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