author | Walther Neuper <neuper@ist.tugraz.at> |
Thu, 12 Aug 2010 15:03:34 +0200 | |
branch | isac-from-Isabelle2009-2 |
changeset 37913 | 20e3616b2d9c |
parent 30168 | 9a20be5be90b |
child 43467 | 6c621a9d612a |
permissions | -rw-r--r-- |
wenzelm@26840 | 1 |
theory HOLCF_Specific |
wenzelm@26840 | 2 |
imports HOLCF |
wenzelm@26840 | 3 |
begin |
wenzelm@26840 | 4 |
|
wenzelm@26852 | 5 |
chapter {* Isabelle/HOLCF \label{ch:holcf} *} |
wenzelm@26841 | 6 |
|
wenzelm@26841 | 7 |
section {* Mixfix syntax for continuous operations *} |
wenzelm@26841 | 8 |
|
wenzelm@26841 | 9 |
text {* |
wenzelm@26841 | 10 |
\begin{matharray}{rcl} |
wenzelm@28761 | 11 |
@{command_def (HOLCF) "consts"} & : & @{text "theory \<rightarrow> theory"} \\ |
wenzelm@26841 | 12 |
\end{matharray} |
wenzelm@26841 | 13 |
|
wenzelm@26841 | 14 |
HOLCF provides a separate type for continuous functions @{text "\<alpha> \<rightarrow> |
wenzelm@26841 | 15 |
\<beta>"}, with an explicit application operator @{term "f \<cdot> x"}. |
wenzelm@26841 | 16 |
Isabelle mixfix syntax normally refers directly to the pure |
wenzelm@26841 | 17 |
meta-level function type @{text "\<alpha> \<Rightarrow> \<beta>"}, with application @{text "f |
wenzelm@26841 | 18 |
x"}. |
wenzelm@26841 | 19 |
|
wenzelm@26841 | 20 |
The HOLCF variant of @{command (HOLCF) "consts"} modifies that of |
wenzelm@26841 | 21 |
Pure Isabelle (cf.\ \secref{sec:consts}) such that declarations |
wenzelm@26841 | 22 |
involving continuous function types are treated specifically. Any |
wenzelm@26841 | 23 |
given syntax template is transformed internally, generating |
wenzelm@26841 | 24 |
translation rules for the abstract and concrete representation of |
wenzelm@26841 | 25 |
continuous application. Note that mixing of HOLCF and Pure |
wenzelm@26841 | 26 |
application is \emph{not} supported! |
wenzelm@26841 | 27 |
*} |
wenzelm@26841 | 28 |
|
wenzelm@26841 | 29 |
|
wenzelm@26841 | 30 |
section {* Recursive domains *} |
wenzelm@26841 | 31 |
|
wenzelm@26841 | 32 |
text {* |
wenzelm@26841 | 33 |
\begin{matharray}{rcl} |
wenzelm@28761 | 34 |
@{command_def (HOLCF) "domain"} & : & @{text "theory \<rightarrow> theory"} \\ |
wenzelm@26841 | 35 |
\end{matharray} |
wenzelm@26841 | 36 |
|
wenzelm@26841 | 37 |
\begin{rail} |
wenzelm@26841 | 38 |
'domain' parname? (dmspec + 'and') |
wenzelm@26841 | 39 |
; |
wenzelm@26841 | 40 |
|
wenzelm@26841 | 41 |
dmspec: typespec '=' (cons + '|') |
wenzelm@26841 | 42 |
; |
wenzelm@26841 | 43 |
cons: name (type *) mixfix? |
wenzelm@26841 | 44 |
; |
wenzelm@26841 | 45 |
dtrules: 'distinct' thmrefs 'inject' thmrefs 'induction' thmrefs |
wenzelm@26841 | 46 |
\end{rail} |
wenzelm@26841 | 47 |
|
wenzelm@26841 | 48 |
Recursive domains in HOLCF are analogous to datatypes in classical |
wenzelm@26841 | 49 |
HOL (cf.\ \secref{sec:hol-datatype}). Mutual recursion is |
wenzelm@26841 | 50 |
supported, but no nesting nor arbitrary branching. Domain |
wenzelm@26841 | 51 |
constructors may be strict (default) or lazy, the latter admits to |
wenzelm@26841 | 52 |
introduce infinitary objects in the typical LCF manner (e.g.\ lazy |
wenzelm@26841 | 53 |
lists). See also \cite{MuellerNvOS99} for a general discussion of |
wenzelm@26841 | 54 |
HOLCF domains. |
wenzelm@26841 | 55 |
*} |
wenzelm@26841 | 56 |
|
wenzelm@26840 | 57 |
end |