automatic library compilation and proof tree
play

Automatic Library Compilation and Proof Tree Visualisation for Coq - PowerPoint PPT Presentation

Automatic Library Compilation Proof Tree Visualisation Conclusion Automatic Library Compilation and Proof Tree Visualisation for Coq Proof General Hendrik Tews Technische Universit at Dresden Third Coq Workshop, August 26, 2011 Hendrik


  1. Automatic Library Compilation Proof Tree Visualisation Conclusion Automatic Library Compilation and Proof Tree Visualisation for Coq Proof General Hendrik Tews Technische Universit¨ at Dresden Third Coq Workshop, August 26, 2011 Hendrik Tews New Coq PG features Coq-3 1 / 16

  2. Automatic Library Compilation Proof Tree Visualisation Conclusion Outline Automatic Library Compilation Proof Tree Visualisation Conclusion Hendrik Tews New Coq PG features Coq-3 2 / 16

  3. Automatic Library Compilation Proof Tree Visualisation Conclusion Automatic Library Compilation Goals ◮ make coq makefile obsolete for the ordinary Coq user ◮ Proof General keeps a consistent Coq session, while the user ◮ freely changes arbitrary files ◮ synchronises files with co-workers (possibly through some version control system) ◮ asserts text in arbitrary buffers See http://askra.de/software/multiple-coq/ Hendrik Tews New Coq PG features Coq-3 3 / 16

  4. Automatic Library Compilation Proof Tree Visualisation Conclusion Demonstration (using the contribution ConCat from Amokrane Sa¨ ıbi) Hendrik Tews New Coq PG features Coq-3 4 / 16

  5. Automatic Library Compilation Proof Tree Visualisation Conclusion New Features ◮ save files and compile libraries before Require commands are processed ◮ Lock ancestors ◮ Restart coqtop when the active scripting buffer changes ◮ two compilation modes: Internal Proof General calls coqdep and coqc itself External Proof General starts compilation e.g., make -C dir lib.vo ◮ Implementation is rather straightforward ◮ current cvs head, will be released with Proof General 4.1. Hendrik Tews New Coq PG features Coq-3 5 / 16

  6. Automatic Library Compilation Proof Tree Visualisation Conclusion Problems ◮ Incompatible with current customisation habbits ◮ put nonstandard load path into coq-load-path ◮ delete -I options from coq-prog-name and coq-prog-args ◮ enable coq-compile-before-require ◮ Impossible to map Required modules to file names ◮ Locate Library fails if .vo file is missing ◮ Locate File fails for modules with logical path’ e.g., Coq.Init.Wf vs. Coq.Program.Wf ◮ coqdep does not process Add LoadPath Hendrik Tews New Coq PG features Coq-3 6 / 16

  7. Automatic Library Compilation Proof Tree Visualisation Conclusion Limitations ◮ Currently no support for Declare ML Module and Require "x.vo" ◮ Synchronous compilation in internal mode locks Emacs ◮ a change in an ancestor will change the current scripting buffer ◮ file modification times are compared with a precision of 1 second Hendrik Tews New Coq PG features Coq-3 7 / 16

  8. Automatic Library Compilation Proof Tree Visualisation Conclusion Outline Automatic Library Compilation Proof Tree Visualisation Conclusion Hendrik Tews New Coq PG features Coq-3 8 / 16

  9. Automatic Library Compilation Proof Tree Visualisation Conclusion Demonstration Hendrik Tews New Coq PG features Coq-3 9 / 16

  10. Automatic Library Compilation Proof Tree Visualisation Conclusion Features ◮ proof tree visualisation in external window ◮ expands and shrinks when commands are asserted or undone ◮ update sequents with instantiated existentials (as far as possible) ◮ branches are marked with different colours: proved, current, open, admitted ◮ full sequent or proof command text can be displayed in separate windows ◮ cloned windows freeze a snapshot of current proof tree Hendrik Tews New Coq PG features Coq-3 10 / 16

  11. Automatic Library Compilation Proof Tree Visualisation Conclusion The Need for Patching Coq Problems ◮ very difficult or impossible to reconstruct the proof tree externally (which goals are new and which are old?) ◮ no information about which existential variables got instantiated and which sequents changed because of that ◮ no information about what to delete after retract/Backtrack Need a patched version of Coq that ◮ annotates sequents with unique tags ( make evar , evar declare and mk goal increment a counter and store its value in the created evar info .) ◮ print tags and the list of instantiated existentials for option -emacs or -emacs-U Hendrik Tews New Coq PG features Coq-3 11 / 16

  12. Automatic Library Compilation Proof Tree Visualisation Conclusion Implementation ◮ divided between Proof General and the program Prooftree ◮ Information flow is one-way: From Proof General to Prooftree Proof General part ◮ parse prover output for new sequents and existentials ◮ keeps as internal state ◮ hash of known sequent tags ◮ mapping from existentials to sequent tags ◮ complete undo information for the previous two items ◮ sends text messages to Prooftree ◮ code is divided in a general and a Coq specific part ◮ available in branch ProofTreeBranch in Proof General cvs Prooftree ◮ builds and draws tree ◮ keeps complete undo information ◮ about 5000 lines of Ocaml + Lablgtk code Hendrik Tews New Coq PG features Coq-3 12 / 16

  13. Automatic Library Compilation Proof Tree Visualisation Conclusion Installation ◮ see http://askra.de/software/prooftree/ ◮ need consistent versions of ◮ Coq ID patches ◮ ProofTreeBranch version of Proof General ◮ Prooftree ◮ compile Coq and Prooftree manually ◮ configure Emacs to use ProofTreeBranch and the patched Coq version Hendrik Tews New Coq PG features Coq-3 13 / 16

  14. Automatic Library Compilation Proof Tree Visualisation Conclusion Outline Automatic Library Compilation Proof Tree Visualisation Conclusion Hendrik Tews New Coq PG features Coq-3 14 / 16

  15. Automatic Library Compilation Proof Tree Visualisation Conclusion Wish List ◮ a tool mapping logical path’ to file names, working as filter (stdin − → stdout) ◮ unique sequent ID’s ◮ print instantiated existentials ◮ Show ID num for displaying the subgoal with ID num ◮ fix coqdep ( Add LoadPath . . . ) Hendrik Tews New Coq PG features Coq-3 15 / 16

  16. Automatic Library Compilation Proof Tree Visualisation Conclusion Thanks for your attention Comments / Questions are welcome at proofgeneral-devel@inf.ed.ac.uk and coq-club@inria.fr Hendrik Tews New Coq PG features Coq-3 16 / 16

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