double_compound.bip 572 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
package double_compound
  port type IntPort(int i)

  connector type Single(IntPort p)
    define p
  end

  atom type Atom()
    data int v
    export port IntPort p(v)

    place LOOP

    initial to LOOP
      do { v=0; }

    on p from LOOP to LOOP
      provided (v<=1000)
      do { v=v+1; }
  end


  compound type Compound1()
    component Atom a()

    export port a.p as p
  end

  compound type Compound2()
    component Compound1 c()

    export port c.p as p
  end

  compound type System()
    component Compound2 c()

    connector Single s(c.p)
  end
end