## Axiomatic constructor classes in Isabelle/HOLCF (2005)

### Cached

### Download Links

- [web.cecs.pdx.edu]
- [www.cse.ogi.edu]
- [web.cecs.pdx.edu]
- DBLP

### Other Repositories/Bibliography

Venue: | In Proc. 18th International Conference on Theorem Proving in Higher Order Logics (TPHOLs’05), Volume 3603 of Lecture Notes in Computer Science |

Citations: | 16 - 5 self |

### BibTeX

@INPROCEEDINGS{Huffman05axiomaticconstructor,

author = {Brian Huffman and John Matthews and Peter White},

title = {Axiomatic constructor classes in Isabelle/HOLCF},

booktitle = {In Proc. 18th International Conference on Theorem Proving in Higher Order Logics (TPHOLs’05), Volume 3603 of Lecture Notes in Computer Science},

year = {2005},

pages = {147--162},

publisher = {Springer}

}

### OpenURL

### Abstract

Abstract We have definitionally extended Isabelle/HOLCF to support axiomatic Haskell-style constructor classes. We have subsequently defined the functor and monad classes, together with their laws, and implemented state and resumption monad transformers as generic constructor class instances. This is a step towards our goal of giving modular denotational semantics for concurrent lazy functional programming languages, such as GHC Haskell. 1

### Citations

475 |
Interactive Theorem Proving and Program Development. Coq’Art: The Calculus of Inductive Constructions
- Bertot, Castéran
- 2004
(Show Context)
Citation Context ...s (mechanisms for reasoning about class-constrained formulas in Clean have recently been developed, and will soon be released). 7.3 Alternatives to axiomatic type classes Proof assistants such as Coq =-=[4]-=- and MetaPRL [10] whose type systems are based on dependent type theory can encode instances of axiomatic type and constructor classes as records whose fields contain implementations of the class meth... |

457 | Domain theory
- Abramsky, Jung
- 1994
(Show Context)
Citation Context ...To do formal reasoning about types, we need to be able to talk about what it means to embed one type into another. An appropriate concept in domain theory is the embedding-projection pair, or ep-pair =-=[1,2,8]-=-. Let A and B be types in class pcpo. A pair of continuous functions e :: A → B and p :: B → A is an ep-pair if p ◦ e = IDA and e ◦ p ⊑ IDB. The existence of such a pair shows that the type A can be e... |

111 | Noninterference, transitivity, and channelcontrol security
- Rushby
- 1992
(Show Context)
Citation Context ...cal control-flow, and reference values. Papaspyrou has given a denotational semantics for a significant subset of ANSI C using the same methods [21]. Harrison et al. [9] argue that separation kernels =-=[25]-=- can be constructed by encapsulating the effects of computations (such as updates to stores) in monads. A separation kernel provides minimal operating system kernel functionality while strictly enforc... |

71 | Type classes and overloading in higher-order logic
- Wenzel
- 1997
(Show Context)
Citation Context ...g. In this way an effect can be specified once, as a monad tranformer, and then reused in other language semantics. 1.1 Axiomatic constructor classes Isabelle supports overloaded constant definitions =-=[27]-=-. Polymorphic constants usually have a single definition that covers all type instances, but multiple definitions are allowed if they apply to separate types. For example, unary negation in Isabelle/H... |

38 | Locales and locale expressions in Isabelle/Isar
- Ballarin
(Show Context)
Citation Context ... were willing to specify a “default” morphism for any given type scheme in the same way that class instances are defined. Isabelle has a lightweight implementation of theory morphisms, called locales =-=[3,14]-=-. However, locales can not not instantiate type constructors, so they are unsuitable for modeling constructor classes. A more general theory morphism mechanism has recently been implemented for Isabel... |

35 | Locales: A sectioning concept for Isabelle
- Kammüller, Wenzel, et al.
- 1999
(Show Context)
Citation Context ... were willing to specify a “default” morphism for any given type scheme in the same way that class instances are defined. Isabelle has a lightweight implementation of theory morphisms, called locales =-=[3,14]-=-. However, locales can not not instantiate type constructors, so they are unsuitable for modeling constructor classes. A more general theory morphism mechanism has recently been implemented for Isabel... |

33 | Order-sorted polymorphism in Isabelle
- Nipkow
- 1993
(Show Context)
Citation Context ...ms, and therefore cannot be applied anonymously to subterms. Also, most-general class instantiations for a well-typed term can always be inferred by Isabelle’s order-sorted type unification algorithm =-=[19]-=-. Larger Haskell programs rely on this heavily, and it prevents type annotations from swamping the actual code. To our knowledge, no similar capability is available for current theory morphism impleme... |

32 | Theory Interpretations in PVS
- Owre, Shankar
- 2001
(Show Context)
Citation Context ...LCF. Theory morphisms are an alternative to axiomatic type classes for allowing theorems to be reused across families of types, and have been implemented in theorem provers such as IMPS [7,6] and PVS =-=[20]-=-. For example, an abstract theory of groups G can be defined whose signature contains an uninterpreted type C, operators e : C, (·) : C ⇒ C ⇒ C, and the usual group axioms for (e, ·). A theory morphis... |

24 | HOLCF: higher order logic of computable functions
- Regensburger
- 1995
(Show Context)
Citation Context ...constdefs. Theories introduce new types with the typedef command, which defines a type isomorphic to a given non-empty set. The keywords lemma and theorem introduce theorems. 2.1 Isabelle/HOLCF HOLCF =-=[18,24]-=- is an object logic for Isabelle designed for reasoning about functional programs. It is implemented as a layer on top of Isabelle/HOL, so it includes all the theories and syntax of the HOL object log... |

23 | A Formal Semantics for the C Programming Language
- Papaspyrou
- 1998
(Show Context)
Citation Context ... structural language features such as procedures, non-local control-flow, and reference values. Papaspyrou has given a denotational semantics for a significant subset of ANSI C using the same methods =-=[21]-=-. Harrison et al. [9] argue that separation kernels [25] can be constructed by encapsulating the effects of computations (such as updates to stores) in monads. A separation kernel provides minimal ope... |

19 | The HOL logic extended with quantification over type variables
- Melham
- 1993
(Show Context)
Citation Context ..., fmap is still polymorphic; and for a type constructor to be admitted into the functor class, the above laws must hold at all type instances. If Isabelle supported quantification over type variables =-=[17]-=- this would be simple to express, but we must find another way. Our solution is to express the functor laws in an untyped setting, by replacing universally-quantified type variables with U, the univer... |

17 |
Amadio and Pierre-Louis Curien. Domains and Lambda Calculi, volume 46 of Cambridge Tracts
- Roberto
- 1998
(Show Context)
Citation Context ...To do formal reasoning about types, we need to be able to talk about what it means to embed one type into another. An appropriate concept in domain theory is the embedding-projection pair, or ep-pair =-=[1,2,8]-=-. Let A and B be types in class pcpo. A pair of continuous functions e :: A → B and p :: B → A is an ep-pair if p ◦ e = IDA and e ◦ p ⊑ IDB. The existence of such a pair shows that the type A can be e... |

14 | An infrastructure for intertheory reasoning
- Farmer
- 2000
(Show Context)
Citation Context ...in Isabelle/HOLCF. Theory morphisms are an alternative to axiomatic type classes for allowing theorems to be reused across families of types, and have been implemented in theorem provers such as IMPS =-=[7,6]-=- and PVS [20]. For example, an abstract theory of groups G can be defined whose signature contains an uninterpreted type C, operators e : C, (·) : C ⇒ C ⇒ C, and the usual group axioms for (e, ·). A t... |

14 |
Information flow control revisited: Noninfluence = noninterference + nonleakage
- Oheimb
- 2004
(Show Context)
Citation Context ...stores) in monads. A separation kernel provides minimal operating system kernel functionality while strictly enforcing process independence, except through carefully controlled communication channels =-=[26]-=-. Harrison constructs a separation kernel by a series of monad transformers. The proof of separation shown in the paper rests to a large degree on the monad laws. As an application of our work, we wan... |

12 | A proof tool for reasoning about functional programs
- Collins
- 1996
(Show Context)
Citation Context ...to constructor classes is compatible with HasCasl’s internal logic. Lazy functional languages can also be modeled operationally. This has been carried out for the HOL system theorem prover by Collins =-=[5]-=-, where a language consisting of PCF plus streams is modeled as a labeled transition system.sProgram equivalence is defined as applicative bisimularity, and equivalences are proved via coinduction. A ... |

8 |
Thayer Fábrega. imps: An updated system description
- Farmer, Guttman, et al.
- 1996
(Show Context)
Citation Context ...in Isabelle/HOLCF. Theory morphisms are an alternative to axiomatic type classes for allowing theorems to be reused across families of types, and have been implemented in theorem provers such as IMPS =-=[7,6]-=- and PVS [20]. For example, an abstract theory of groups G can be defined whose signature contains an uninterpreted type C, operators e : C, (·) : C ⇒ C ⇒ C, and the usual group axioms for (e, ·). A t... |

8 | MetaPRL — A modular logical environment
- Hickey, Nogin, et al.
(Show Context)
Citation Context ...r reasoning about class-constrained formulas in Clean have recently been developed, and will soon be released). 7.3 Alternatives to axiomatic type classes Proof assistants such as Coq [4] and MetaPRL =-=[10]-=- whose type systems are based on dependent type theory can encode instances of axiomatic type and constructor classes as records whose fields contain implementations of the class methods, as well as p... |

8 | Theorem reuse by proof term transformation
- Johnsen, Lüth
- 2004
(Show Context)
Citation Context ...not not instantiate type constructors, so they are unsuitable for modeling constructor classes. A more general theory morphism mechanism has recently been implemented for Isabelle by Johnsen and Lüth =-=[11]-=-, that relies on the theorem prover’s ability to attach proof objects to theorems. This allows theorems to be safely instantiated, without needing to modify Isabelle’s kernel. The Specware system [16,... |

8 | A study of evaluation order semantics in expressions with side effects
- Papaspyrou, Macos
(Show Context)
Citation Context ...pe checker to implement the slogan “process separation mostly by type-checking, a little bit by theorem proving.” 7 Related Work 7.1 Applications of monads and monad transformers Papaspyrou and Macos =-=[22]-=- illustrate how monads and monad transformers can provide a modular denotational semantics for a range of programming language features. They define a simple eager language of expressions with side ef... |

8 | Isabelle HOL: A Proof Assistant for Higher-Order Logic, volume 2283 of LNCS - Nipkow, Paulson, et al. - 2002 |

6 | Colimits for Concurrent Collectors
- Pavlovic, Pepper, et al.
(Show Context)
Citation Context ...d with mechanisms similar to theory morphisms. The specifications can be refined to implementations, with the ability to discharge the resulting proof obligations in a theorem prover. Pavlovic et al. =-=[23]-=- show how monads and monad tranformers can be specified in the Specware language meta-slang. 8 Conclusion Using purely definitional means, we have developed a framework within Isabelle/HOLCF that perm... |

3 |
Semantic domains. In Handbook of theoretical computer science (vol. B): formal models and semantics
- Gunter, Scott
(Show Context)
Citation Context ...To do formal reasoning about types, we need to be able to talk about what it means to embed one type into another. An appropriate concept in domain theory is the embedding-projection pair, or ep-pair =-=[1,2,8]-=-. Let A and B be types in class pcpo. A pair of continuous functions e :: A → B and p :: B → A is an ep-pair if p ◦ e = IDA and e ◦ p ⊑ IDB. The existence of such a pair shows that the type A can be e... |

3 | Domain separation by construction
- Harrison, Tullsen, et al.
- 2003
(Show Context)
Citation Context ...eatures such as procedures, non-local control-flow, and reference values. Papaspyrou has given a denotational semantics for a significant subset of ANSI C using the same methods [21]. Harrison et al. =-=[9]-=- argue that separation kernels [25] can be constructed by encapsulating the effects of computations (such as updates to stores) in monads. A separation kernel provides minimal operating system kernel ... |

1 |
Programatica web page
- Jones
- 2005
(Show Context)
Citation Context ...itely-branching trees, which would be a good candidate for a universal type that could represent these function spaces. 6 Application: Programatica The authors are members of the Programatica project =-=[12]-=-, which is building a high assurance software development environment for Haskell98 [13]. Programatica allows users to embed desired correctness assertions and environmental assumptions in Haskell pro... |