package const_data

  const data int X = 3, Y = 2*X, C = 10*X-5

  port type Port_t()
  port type Port_tt(int x)

  connector type CoT(Port_tt p1, Port_tt p2)
  data int ld

  define p1 p2
  on p1 p2
     provided (X <= 1000)
     down { p1.x = X + p2.x; p2.x = Y + p1.x;}
  end

 
  atom type AT(int dd)
    data int ld, ld1
    export port Port_tt p1(ld1)
    port Port_t p2()

    place S1, STOP

    initial to S1 do {ld = 0; ld1 = dd;}
    on p1 from S1 to S1 do {ld = ld + 1;}
    on p2 from S1 to STOP    

    priority single1 p2 < p1  provided (ld < C)
    priority single2 p1 < p2  provided (ld >= C)
  end


  compound type Top()
    component AT c1(10*X), c2(10*(X))//, c3(5*2*X), c4(X+X+8*X)

    connector CoT co12(c1.p1, c2.p1)//, co34(c3.p1, c4.p1)

//    priority test co12:* < co34:* provided (X <= Y)
  end
end
  