Back to table

Replicated PAR test

The following is a valid µOCCAM program that performs I/O. This program tests replicated parallels.

Program file: /public/cs3/web/ipptests/reppar.io

[10]INT a:
[10]INT b:
SEQ
  PAR i = 0 FOR 10
    SEQ
      a[i] := i
      PAR j = 0 FOR 10
        b[j] := j
  SEQ i = 0 FOR 10
    stdout ! a[i]
  SEQ i = 0 FOR 10
    stdout ! b[i]
      

When provided with this input: /public/cs3/web/ipptests/reppar.in



it should generate the following output: /public/cs3/web/ipptests/reppar.out

==> 0
==> 1
==> 2
==> 3
==> 4
==> 5
==> 6
==> 7
==> 8
==> 9
==> 0
==> 1
==> 2
==> 3
==> 4
==> 5
==> 6
==> 7
==> 8
==> 9