## A Monadic Interpretation of Tactics (2002)

Citations: | 1 - 0 self |

### BibTeX

@MISC{Martin02amonadic,

author = {Andrew Martin and Jeremy Gibbons},

title = {A Monadic Interpretation of Tactics},

year = {2002}

}

### OpenURL

### Abstract

Many proof tools use `tactic languages' as programs to direct their proofs. We present a simplified idealised tactic language, and describe its denotational semantics. The language has many applications outside theorem-proveo activ5QbG) The semantics is parametrised by a monad (plus additional structure). By instantiating this inv arious ways, the core semantics of a number of di#erent tactic languages is obtained. 1 Int roduct45 The notiB of a tactic as a program usedi the constructifi of a (machic[ assi46fi8 formal proof has become quie wie[S---#fifi[ Tacti# orifi---#z[ i the work of Gordon et al [GMW79] onEdi burgh LCF. The extent to whi h other`tacti4 based' systems istems[ t essentien[ the same style of programmifi faci---#---[I vari4 consi[I8#Bfi . InEdi burgh LCF, atacti does notit[8B construct a proof. Rather,i ti s usedi backwardreasoni[ to construct a vali#fiz[I functi[ whi h mayi46z8 prove thedesi6B property. Theoremhood i guarded by use of a `safe datatype', and only sound vali484[I functi[I may construct elements ofthi type. In other work, the type of theoremsi protected by havi8 the class oftacti--- icti protected, so thati i ia ossiSB tobui# unsound proofs. The account here tends towards the secondvion though the treatment oftacti6 i s actually so abstract that thi may not be an i[ edi---# t to i[ appli#[IS# i eipli sense. Whie. tacti[ arewiS---fi6[IS--- tacti programmi--- remai4 adiBfiBS task. Inthi paper, weconsi#[ abstractdescri[S#fi--- oftactifi[ wit the hope that modern algori------ desii techniSzS# such as thosedescri ed byBiS and de Moor [BdM97], can be brought to bear on thedi8S---fi[IS ontacti programmi#4 Earlia di#------S[ISS oftacti6 i n the abstract (wiract operati6z[ bii to any parti[ISS proof tool)i)[SS--- those by SchmiB [Sch84] and Mi4#...

### Citations

1335 | Monads for functional programming
- Wadler
- 1995
(Show Context)
Citation Context ... [ML98]. In a seminal paper, Moggi [Mog89] showed how monads can be used to model a number of computational effects in description of the semantics of programming languages. Spivey [Spi90] and Wadler =-=[Wad92] (am-=-ong others) have popularized this approach, showing how monads can simulate such computational effects within a pure value-oriented (‘functional’) language that does not explicitly provide these f... |

483 |
Programming from Specifications
- Morgan
- 1990
(Show Context)
Citation Context ..., for which we define the atomic tactic abort. This is different from mere failure of a tactic to apply, and is typically not something one would ever write in a tactic program, but (following Morgan =-=[Mor94]-=-) we find it convenient to be able to reason about it. We can extend our interpretation to cover recursion as follows. We define a type of variable names: > type Var = String and introduce three new c... |

465 | Comprehending Monads
- Wadler
- 1990
(Show Context)
Citation Context ...asses of monad. Therefore, a practical implemtation such as LCF will use State together with Maybe. We have not explored this monad combination here, though it is one of the combinations mentioned in =-=[KW93]-=-. A more general combination (capturing more accurately, for example, the choice semantics possible in Isabelle) involves combining State with lists. There are several ways to accomplish such a combin... |

450 | Computational lambda-calculus and monads
- Moggi
- 1989
(Show Context)
Citation Context ... more features of the languages in question, and the paper ends with some conclusions. 2 Monads Monads have been known as a categorical construction for some decades [ML98]. In a seminal paper, Moggi =-=[Mog89]-=- showed how monads can be used to model a number of computational effects in description of the semantics of programming languages. Spivey [Spi90] and Wadler [Wad92] (among others) have popularized th... |

428 | Isabelle: A Generic Theorem Prover
- Paulson
- 1994
(Show Context)
Citation Context ...on int t1 of the tactic in the List monad is > int t1 g = rule "allIntro" g ++ > concat (map (rule "allIntro") (rule "alphaConv" g)) essentially as before. Such behaviour=-= is also possible in Isabelle [Pau89]-=-, though several combinators are offered there. Interpretation in the exception monad gives rise (essentially) to the tactic language of Edinburgh (and Cambridge) LCF. To be more precise, LCF allows s... |

335 | Theorems for free
- Wadler
(Show Context)
Citation Context ..... so that every monad is a functor. The second omission is any mention of the laws a monad should satisfy: the naturality laws are essentially consequences of the polymorphic types of >>= and return =-=[Wad89], but -=-the coherence laws cannot be stated in Haskell. The equivalents in the Haskell presentation of the three monad coherence laws are: • return v >>= k = k v; • m >>= return = m; • (m >>= k) >>= h =... |

225 |
Categories for the working mathematician, volume 5 of Graduate Texts in Mathematics
- Lane
- 1998
(Show Context)
Citation Context ...treatment may be extended to cover more features of the languages in question, and the paper ends with some conclusions. 2 Monads Monads have been known as a categorical construction for some decades =-=[ML98]-=-. In a seminal paper, Moggi [Mog89] showed how monads can be used to model a number of computational effects in description of the semantics of programming languages. Spivey [Spi90] and Wadler [Wad92]... |

218 | An introduction to the theory of lists
- Bird
- 1987
(Show Context)
Citation Context ...ew bound variable, based only on the predicate presented to the rule. We will address this issue later.) The semantics given for Angel in [MGW96] is expressed using a simple theory of lists, based on =-=[Bir86]-=-. The lists are used to record alternative outcomes of tactic applications, thus offering backtracking/angelic nondeterminism. This is reflected in the name Angel. A simple (in the sense that it impos... |

165 |
Isabelle: a generic theorem prover, volume 828
- Paulson
- 1994
(Show Context)
Citation Context ... restricts the nondeterminism to the scope of t. This notation resembles the ‘cut’ of Prolog, but thanks to its scoping, the semantics of this ‘!’ are more compositional (similar to Isabelle��=-=�s DETERM [Pau94]-=-). For an example, consider tactics over a logical language of first-order predicates. Let the rule alphaConv perform alpha-conversion (renaming bound variables in a quantified expression), and allInt... |

132 |
Edinburgh LCF – A mechanised logic of computation
- Gordon, Milner, et al.
- 1979
(Show Context)
Citation Context ...is obtained. 1 Introduction The notion of a tactic as a program used in the construction of a (machineassisted) formal proof has become quite widespread. Tactics originate in the work of Gordon et al =-=[GMW79] on -=-Edinburgh LCF. The extent to which other ‘tacticbased’ systems implement essentially the same style of programming facilities varies considerably. In Edinburgh LCF, a tactic does not itself constr... |

95 | A new approach to generic functional programming
- Hinze
- 2000
(Show Context)
Citation Context ...anically derived. Similarly, the subexpression type (like BoolSubs) and the instantiation of the Subs type could also be mechanically derived. We see this as an elegant application of Generic Haskell =-=[Hin00]-=-, but have not yet had time to explore this connection. Another paper [MNU97b] explores the algebraic treatment of associative structural combinators in the Gumtree interpretation of Angel. Associativ... |

72 | 1.4: A non-strict, purely functional language - Haskell - 1997 |

71 | Composing monads - Jones, Duponcheel - 1993 |

41 |
A functional theory of exceptions
- Spivey
- 1990
(Show Context)
Citation Context ...on for some decades [ML98]. In a seminal paper, Moggi [Mog89] showed how monads can be used to model a number of computational effects in description of the semantics of programming languages. Spivey =-=[Spi90] and-=- Wadler [Wad92] (among others) have popularized this approach, showing how monads can simulate such computational effects within a pure value-oriented (‘functional’) language that does not explici... |

15 | R.: When do datatypes commute
- Hoogendijk, Backhouse
- 1997
(Show Context)
Citation Context ...bute labels an expression of type f bwith additional labels of type a drawn from a data structure of type g a.(Ifthef is single-shaped, then g and f will be equal and distribute will be a kind of zip =-=[HB97]-=-; but in general, f will be a sum with several variants, and the sums in f will be expanded to products in g.) The types BoolExprF and BoolSubs instantiate this class:sA Monadic Interpretation of Tact... |

14 | The use of machines to assist in rigorous proof - Milner - 1984 |

9 |
Numerical Calculus
- Eudoxus, Martin
- 1993
(Show Context)
Citation Context ...er discussions of tactics in the abstract (without operational bias to any particular proof tool) include those by Schmidt [Sch84] and Milner [Mil84]. The account here builds on the work described in =-=[MGW96]-=-. That paper describes an abstract tactic language, giving a large set of algebraic laws which show how tactics relate to one another, and how tactics may be transformed. A denotational semantics was ... |

9 |
Logic and Computation---Interactive Proof with Cambridge LCF
- Paulson
- 1987
(Show Context)
Citation Context ... framework for the composition of primitive inference rules in the construction of backwards proofs, but it turns out to be more general than this. Term rewriting, for example, which in Cambridge LCF =-=[Pau87]-=- is directed by a separate set of operators from those which describe tactics, could also be described using Angel. Because Angel is a small language, its semantic description is quite clean and easy ... |

5 | A tactic language for Ergo
- Martin, Nickson, et al.
- 1997
(Show Context)
Citation Context ...hich various goals and subgoals can be selected for consideration, or deferred until later. This is generally a very high level of interaction, and not part of the consideration of tactics. In Ergo 5 =-=[MNU97a] h-=-owever, those facilities are fully part of the tactic language — which in other respects implements state with lists, as above. In summary, the user is allowed to defer treatment of a goal at any ti... |

3 |
2OBJ: A Metalogical Theorem Prover based on Equational Logic
- Goguen, Stevens, et al.
- 1992
(Show Context)
Citation Context ...in the exception monad gives rise (essentially) to the tactic language of Edinburgh (and Cambridge) LCF. To be more precise, LCF allows side-effects in tactics (see below); the logical framework 2OBJ =-=[GSHH92]-=- implemented precisely this semantics. For clarity, we could define > try (Just x) _ = Just x > try Nothing y = y to try a second computation only if a first fails, and > lift f (Just x) = f x > lift ... |

3 | Improving Angel’s parallel operator: Gumtree’s approach
- Martin, Nickson, et al.
- 1997
(Show Context)
Citation Context ...nstantiation of the Subs type could also be mechanically derived. We see this as an elegant application of Generic Haskell [Hin00], but have not yet had time to explore this connection. Another paper =-=[MNU97b]-=- explores the algebraic treatment of associative structural combinators in the Gumtree interpretation of Angel. Associative matching potentially increases the complexity of tactic evaluation quite con... |

3 |
A programming notation for tactical reasoning
- Schmidt
- 1984
(Show Context)
Citation Context ...BdM97], can be brought to bear on the discipline on tactic programming. Earlier discussions of tactics in the abstract (without operational bias to any particular proof tool) include those by Schmidt =-=[Sch84]-=- and Milner [Mil84]. The account here builds on the work described in [MGW96]. That paper describes an abstract tactic language, giving a large set of algebraic laws which show how tactics relate to o... |

1 |
and Oege de Moor. Algebra of Programming. SeriesinComputer Science
- Bird
- 1997
(Show Context)
Citation Context ...c programming remains a difficult task. In this paper, we consider abstract descriptions of tactics, with the hope that modern algorithm design techniques, such as those described by Bird and de Moor =-=[BdM97]-=-, can be brought to bear on the discipline on tactic programming. Earlier discussions of tactics in the abstract (without operational bias to any particular proof tool) include those by Schmidt [Sch84... |