towards ltac 2 0
play

Towards Ltac 2.0 P.-M. Pdrot INRIA DeepSpec Workshop 8th June - PowerPoint PPT Presentation

. . . . . . . . . . . . . . . Towards Ltac 2.0 P.-M. Pdrot INRIA DeepSpec Workshop 8th June 2016 Pdrot (INRIA) Towards Ltac 2.0 8/06/2016 . . . . . . . . . . . . . . . . . . . . . . . . . 1 / 13 .


  1. . . . . . . . . . . . . . . . Towards Ltac 2.0 P.-M. Pédrot INRIA DeepSpec Workshop 8th June 2016 Pédrot (INRIA) Towards Ltac 2.0 8/06/2016 . . . . . . . . . . . . . . . . . . . . . . . . . 1 / 13

  2. . Goal (a:A)(m:list) (Null (cons a m)). . . . . . . . . . How did we get there? Tactics were introduced in Coq 4.10 (May 89). Red. . Intros. Do (resolve_unfolds) O_S. Exact (length m). Change <nat>(length nil)=(length (cons a m)). Do (incomplet [3]) (f_equal length). Assumption. Save nil_cons. Only primitive tactics at the time! Pédrot (INRIA) Towards Ltac 2.0 8/06/2016 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 / 13

  3. . . . . . . . . . . . . . . Ltac Ltac was introduced in the 7.x branch by David Delahaye (around 2000). Translated excerpt from the French CHANGES fjles: Ltac is a new layer of metalanguage to handle small automations. <blink> SMALL </blink> That sentence never made it into the English documentation. Pédrot (INRIA) Towards Ltac 2.0 8/06/2016 . . . . . . . . . . . . . . . . . . . . . . . . . . 3 / 13

  4. . . . . . . . . . . . . . . Ltac Ltac was introduced in the 7.x branch by David Delahaye (around 2000). Translated excerpt from the French CHANGES fjles: Ltac is a new layer of metalanguage to handle small automations. <blink> SMALL </blink> That sentence never made it into the English documentation. Pédrot (INRIA) Towards Ltac 2.0 8/06/2016 . . . . . . . . . . . . . . . . . . . . . . . . . . 3 / 13

  5. . . . . . . . . . . . . . . Ltac Ltac was introduced in the 7.x branch by David Delahaye (around 2000). Translated excerpt from the French CHANGES fjles: Ltac is a new layer of metalanguage to handle small automations. <blink> SMALL </blink> That sentence never made it into the English documentation. Pédrot (INRIA) Towards Ltac 2.0 8/06/2016 . . . . . . . . . . . . . . . . . . . . . . . . . . 3 / 13

  6. . . . . . . . . . . . . . . Ltac Ltac was introduced in the 7.x branch by David Delahaye (around 2000). Translated excerpt from the French CHANGES fjles: Ltac is a new layer of metalanguage to handle small automations. <blink> SMALL </blink> That sentence never made it into the English documentation. Pédrot (INRIA) Towards Ltac 2.0 8/06/2016 . . . . . . . . . . . . . . . . . . . . . . . . . . 3 / 13

  7. . . . . . . . . . . . . 15 years later . Not fjtted for that scale Not specifjed Not specifjable Brittle Slow A kludgy pile of random stufg nobody really understands « Ltac is the PHP of proof assistants » Pédrot (INRIA) Towards Ltac 2.0 8/06/2016 . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 / 13 2016: Probably more than 10 5 loc in Ltac (educated guess), which is:

  8. . . . . . . . . . . . . . . A little issue Facebook has billions of PHP loc, but if they were to start from scratch, they would probably use a decent language (Haskell, OCaml, …). We don’t have that luck. As of today, we don’t know what a good tactic language is. Experimental research: Mtac, Rtac, ssrefmect... Pédrot (INRIA) Towards Ltac 2.0 8/06/2016 . . . . . . . . . . . . . . . . . . . . . . . . . . 5 / 13

  9. . . . . . . . . . . . . Being Pragmatic . It looks like we can’t really do much more about Ltac than in 2000. WRONG! Since Coq 8.5, we have a new tactic engine (A. Spiwack). Features backtrack and term refjning Monadic ML API Ltac is built atop of it We can reason about the programs (hello, semantics!) Pédrot (INRIA) Towards Ltac 2.0 8/06/2016 . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 / 13

  10. . . . . . . . . . . . . Being Pragmatic . It looks like we can’t really do much more about Ltac than in 2000. WRONG! Since Coq 8.5, we have a new tactic engine (A. Spiwack). Features backtrack and term refjning Monadic ML API Ltac is built atop of it We can reason about the programs (hello, semantics!) Pédrot (INRIA) Towards Ltac 2.0 8/06/2016 . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 / 13

  11. . . . . . . . . . . . . . . Being Pragmatic II We can’t make a perfect language, let us make a better Ltac. Use the sane semantics of the tactic engine for Ltac 2.0 Ltac 2.0... will look like Ltac (syntax-wise) will kind of taste like Ltac (semantics-wise) but fortunately won’t be Ltac! (implementation-wise) Pédrot (INRIA) Towards Ltac 2.0 8/06/2016 . . . . . . . . . . . . . . . . . . . . . . . . . . 7 / 13

  12. . . . . . . . . . . . . . . . The rough bluesheet Following a very simple recipe: ... and voilá , you have Ltac 2.0. Estimated implementation time for a prototype: 2 weeks. Pédrot (INRIA) Towards Ltac 2.0 8/06/2016 . . . . . . . . . . . . . . . . . . . . . . . . . 8 / 13 1 Take the best minimalist language out there: ML 2 Interpret the ambient efgects as the engine monad 3 Add some meta-programming facilities 4 Sprinkle notations here and there

  13. . What’s for me in this? . . . . . . . . . . In particular, Ltac 2.0 will be: . typed supporting datatypes and programming features (partly) specifjed Problems Ltac 2.0 won’t solve: Unifjcation Unspecifjed / unstable primitive tactics Effjciency (in a fjrst time) Typing of metaprogramming Pédrot (INRIA) Towards Ltac 2.0 8/06/2016 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 / 13

  14. . Thanks to notations, certain idioms should be mostly compatible, e.g. . . . . . . . . . . Acknowledging the existing intros [H|H]; destruct H as x; exact x. . Following guidelines, we can recover a certain amount of forward compatibility, e.g. Don’t write let t := idtac; foo in … t … But write let t _ := foo in … t () … TODO: write the guidelines! (Un)luckily, crazy stufg is going to die in a horrible well-deserved sufgering. Pédrot (INRIA) Towards Ltac 2.0 8/06/2016 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 / 13

  15. . . . . . . . . . . . . . . Transition path Most probably, today’s Ltac is going to survive through a plugin. Require Import LegacyLtac. This should content the crazy stufg people. Other people would get a sane language when booting Coq. Hopefully, crazy stufg is going to be rewritten at some point. Pédrot (INRIA) Towards Ltac 2.0 8/06/2016 . . . . . . . . . . . . . . . . . . . . . . . . . . 11 / 13

  16. . . . . . . . . . . . . . . . . TODO I am going to write the specs of Ltac 2.0 in a CEP. Probably going to write a prototype as well at some point. Pédrot (INRIA) Towards Ltac 2.0 8/06/2016 . . . . . . . . . . . . . . . . . . . . . . . . 12 / 13

  17. . . . . . . . . . . . . . . . . I had a dream What if we fostered tactic DSL? Pédrot (INRIA) Towards Ltac 2.0 8/06/2016 . . . . . . . . . . . . . . . . . . . . . . . . 13 / 13

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend