| author | nipkow | 
| Wed, 29 Mar 2000 15:09:51 +0200 | |
| changeset 8604 | c99e0024050c | 
| parent 8251 | 9be357df93d4 | 
| child 10064 | 1a77667b21ef | 
| 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: 
7537diff
changeset | 11 | types 'a state = "nat * 'a" (*second component allows new variables*) | 
| 
9be357df93d4
New treatment of "guarantees" with polymorphic components and bijections.
 paulson parents: 
7537diff
changeset | 12 | |
| 7513 | 13 | constdefs | 
| 8251 
9be357df93d4
New treatment of "guarantees" with polymorphic components and bijections.
 paulson parents: 
7537diff
changeset | 14 | count :: "'a state => nat" | 
| 
9be357df93d4
New treatment of "guarantees" with polymorphic components and bijections.
 paulson parents: 
7537diff
changeset | 15 | "count s == fst s" | 
| 7537 | 16 | |
| 8251 
9be357df93d4
New treatment of "guarantees" with polymorphic components and bijections.
 paulson parents: 
7537diff
changeset | 17 |   decr  :: "('a state * 'a state) set"
 | 
| 
9be357df93d4
New treatment of "guarantees" with polymorphic components and bijections.
 paulson parents: 
7537diff
changeset | 18 |     "decr == UN n uu. {((Suc n, uu), (n,uu))}"
 | 
| 
9be357df93d4
New treatment of "guarantees" with polymorphic components and bijections.
 paulson parents: 
7537diff
changeset | 19 | |
| 
9be357df93d4
New treatment of "guarantees" with polymorphic components and bijections.
 paulson parents: 
7537diff
changeset | 20 | Timer :: 'a state program | 
| 7537 | 21 |     "Timer == mk_program (UNIV, {decr})"
 | 
| 7513 | 22 | |
| 23 | end |