author | paulson |
Sat, 23 Sep 2000 16:02:01 +0200 | |
changeset 10064 | 1a77667b21ef |
parent 8251 | 9be357df93d4 |
permissions | -rw-r--r-- |
7513 | 1 |
(* Title: HOL/UNITY/TimerArray.thy |
2 |
ID: $Id$ |
|
3 |
Author: Lawrence C Paulson, Cambridge University Computer Laboratory |
|
4 |
Copyright 1998 University of Cambridge |
|
5 |
||
6 |
A trivial example of reasoning about an array of processes |
|
7 |
*) |
|
8 |
||
9 |
TimerArray = PPROD + |
|
10 |
||
8251
9be357df93d4
New treatment of "guarantees" with polymorphic components and bijections.
paulson
parents:
7537
diff
changeset
|
11 |
types 'a state = "nat * 'a" (*second component allows new variables*) |
9be357df93d4
New treatment of "guarantees" with polymorphic components and bijections.
paulson
parents:
7537
diff
changeset
|
12 |
|
7513 | 13 |
constdefs |
8251
9be357df93d4
New treatment of "guarantees" with polymorphic components and bijections.
paulson
parents:
7537
diff
changeset
|
14 |
count :: "'a state => nat" |
9be357df93d4
New treatment of "guarantees" with polymorphic components and bijections.
paulson
parents:
7537
diff
changeset
|
15 |
"count s == fst s" |
7537 | 16 |
|
8251
9be357df93d4
New treatment of "guarantees" with polymorphic components and bijections.
paulson
parents:
7537
diff
changeset
|
17 |
decr :: "('a state * 'a state) set" |
9be357df93d4
New treatment of "guarantees" with polymorphic components and bijections.
paulson
parents:
7537
diff
changeset
|
18 |
"decr == UN n uu. {((Suc n, uu), (n,uu))}" |
9be357df93d4
New treatment of "guarantees" with polymorphic components and bijections.
paulson
parents:
7537
diff
changeset
|
19 |
|
9be357df93d4
New treatment of "guarantees" with polymorphic components and bijections.
paulson
parents:
7537
diff
changeset
|
20 |
Timer :: 'a state program |
10064
1a77667b21ef
added compatibility relation: AllowedActs, Allowed, ok,
paulson
parents:
8251
diff
changeset
|
21 |
"Timer == mk_program (UNIV, {decr}, UNIV)" |
7513 | 22 |
|
23 |
end |