ALICe documentation

Model henry

«  Model halbwachs9   ::   Contents   ::   Model insertsort  »

Model henry

Cited in: [Henry_misc11] p. 19.

Tag: fixpoint.

Figure

../_images/henry.png

Source code

model henry_gdrgpl_19 {

  var x, d;

  states k;

  transition t3 := {
    from   := k;
    to     := k;
    guard  := x = 1000;
    action := d' = -1, x' = x + d;
  };

  transition t2 := {
    from   := k;
    to     := k;
    guard  := 1 <= x && x <= 999;
    action := x' = x + d;
  };

  transition t1 := {
    from   := k;
    to     := k;
    guard  := x = 0;
    action := d' = 1, x' = x + d;
  };

}

strategy henry_gdrgpl_19_s {

  Region init := {state = k && x = 0 && d = 1};

}

Expected invariant

{ k[v1, v2] : v2 <= 1 and v2 >= -1 and v1 >= 0 and v2 >= -1999 + 2v1 }

Results

  • With Aspic: { k[x, d] : d <= 2001 - 2x and d <= 1 } (0.05s), failed.
  • With ISL: { k[x__1, d__1] : (d__1 <= -1 + x__1 and d__1 >= -999 + x__1) or (d__1 >= -999 + x__1 and d__1 <= -x__1 and d__1 <= -1 + x__1) or (d__1 >= -999 + x__1 and d__1 >= 2 - x__1 and d__1 <= -1 + x__1); k[x__1, -1]; k[0, 1]; k[x__1, 1] } (0.02s), failed.

«  Model halbwachs9   ::   Contents   ::   Model insertsort  »