ba_example_001.aadl.out 560 Bytes
Newer Older
1 2 3 4 5 6 7







jhugues's avatar
jhugues committed
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 42
package Test
public
  data number
  end number;

  subprogram mul
  features
    x : in parameter number;
    y : in parameter number;
    z : out parameter number;

  end mul;

  subprogram cube
  features
    x : in parameter number;
    y : out parameter number;
    mul : requires subprogram access mul;

    annex behavior_specification {**
    variables
      tmp;
    states
      s : initial final state;
    transitions      
      t : s -[]-> s {
         mul!(x, x, tmp);
         mul!(tmp, x, y)
        };
    **};
  end cube;

end Test;