ALICe documentation

Model multcounters3

«  Model multcounters2   ::   Contents   ::   Model multcounters4  »

Model multcounters3

Cited in: [GulwaniMC09] fig. 4 p. 6.

Tags: complexity, nonlinear.

Figure

../_images/multcounters3.png

Source code

model gulwani_mehra_chilimbi_popl09_06g {

  var x, y, n, m, c1, c2;

  states q1, q2;

  transition t1 := {
    from   := q1;
    to     := q2;
    guard  := x < n;
    action := ;
  };

  transition t3 := {
    from   := q2;
    to     := q1;
    guard  := y >= m;
    action := y' = 0, x' = x + 1, c2' = c2 + 1;
  };

  transition t2 := {
    from   := q2;
    to     := q1;
    guard  := y < m;
    action := y' = y + 1, c1' = c1 + 1;
  };

}

strategy gulwani_mehra_chilimbi_popl09_06g_s {

  Region init := {state = q1 && x = 0 && y = 0 && c1 = 0 && c2 = 0 && n >= 0 && m >= 0};

}

«  Model multcounters2   ::   Contents   ::   Model multcounters4  »