doc/examples/manexs/Mcounter.mod
raw| 1 | require Msimple-nat |
| 2 | |
| 3 | module* COUNTER { |
| 4 | protecting (SIMPLE-NAT) |
| 5 | *[ Counter ]* |
| 6 | bop read : Counter -> Nat |
| 7 | bop add : Nat Counter -> Counter |
| 8 | eq read(add(N:Nat, C:Counter)) = N + read(C) . |
| 9 | } |
| 10 | |
| 11 | provide Msimple-nat |
| 12 | -- |
| 13 | eof |
| 14 | ** $Id: Mcounter.mod,v 1.1.1.1 2003-06-19 08:30:11 sawada Exp $ |