Teaching logic using a web interface for Coq October 31 Cezary Kaliszyk Radboud University Nijmegen cek@cs.ru.nl Cezary Kaliszyk Teaching logic using a web interface for Coq 1
Presentation Plan ■ Web Interface ● Presentation Plan ● Why the Web? ◆ Motivation ● Web Technologies ● Proof Assistants ◆ Requirements ● Architecture (1/2) ● Architecture (2/2) ◆ Architecture ● Implementation of a prototype ◆ Efficiency and Security ● User Security and Efficiency ● Server Security ● Server Efficiency ■ Teaching Logic Teaching logic ◆ Tactics ◆ Graphical presentation of proofs ◆ Problem set Cezary Kaliszyk Teaching logic using a web interface for Coq 2
Why the Web? ● Presentation Plan ● Why the Web? ● Web Technologies ● Proof Assistants ● Architecture (1/2) ■ Popular - No installation or configuration ● Architecture (2/2) ● Implementation of a prototype ■ e-mail clients, calendars, maps, chats, word processing, ... ● User Security and Efficiency ● Server Security ■ wikis and Wikipedia ● Server Efficiency ■ some tools for proofs Teaching logic Cezary Kaliszyk Teaching logic using a web interface for Coq 3
Web Technologies ● Presentation Plan ■ Plugins: Java, Flash ● Why the Web? ● Web Technologies ● Proof Assistants ● Architecture (1/2) ■ JavaScript ● Architecture (2/2) ● Implementation of a prototype ■ DOM ● User Security and Efficiency ● Server Security ■ XmlHttp ● Server Efficiency ■ Asynchronous DOM modifications Teaching logic ◆ sometimes called AJAX or Web Application Cezary Kaliszyk Teaching logic using a web interface for Coq 4
Proof Assistants ● Presentation Plan ● Why the Web? ● Web Technologies ● Proof Assistants ● Architecture (1/2) ■ Often complicated to install ● Architecture (2/2) ● Implementation of a prototype ■ Proofs are developed locally ● User Security and Efficiency ● Server Security ◆ Versioning systems ● Server Efficiency ■ Static web pages are generated to display proofs on the web Teaching logic ◆ tactic-mode proofs Cezary Kaliszyk Teaching logic using a web interface for Coq 5
Architecture (1/2) ● Presentation Plan ● Why the Web? ● Web Technologies ● Proof Assistants ● Architecture (1/2) ■ Lightweight client part in browser ● Architecture (2/2) ◆ User does not need to install anything ● Implementation of a prototype ● User Security and Efficiency ● Server Security ■ Specialized web-server ● Server Efficiency ◆ Prover sub-processes Teaching logic ■ Minimal communication Cezary Kaliszyk Teaching logic using a web interface for Coq 6
Architecture (2/2) User of ProofWeb ● Presentation Plan ● Why the Web? ● Web Technologies ● Proof Assistants ● Architecture (1/2) Web Presented page ● Architecture (2/2) Browser ● Implementation of a prototype ● User Security and Efficiency ● Server Security ● Server Efficiency DOM handling of keypresses Teaching logic and clicks Callback XmlHttp JavaScript User’s User’s Web Session Session Server User’s User’s Prover Prover Cezary Kaliszyk Teaching logic using a web interface for Coq 7
Implementation of a prototype ● Presentation Plan ● Why the Web? ■ Client part: 30kB of JavaScript and HTML ● Web Technologies ● Proof Assistants ● Architecture (1/2) ■ Server part: 800 lines of OCaml code, uses OCamlHttpd ● Architecture (2/2) ● Implementation of a prototype runs prover subprocesses ● User Security and Efficiency ● Server Security ■ Tested with Mozilla based browsers, Internet Explorer and ● Server Efficiency Opera Teaching logic ■ On any platform/architecture one can easily access the interface ◆ No java, plugins installations or privileges are required Cezary Kaliszyk Teaching logic using a web interface for Coq 8
User Security and Efficiency ● Presentation Plan ● Why the Web? ● Web Technologies ■ System and browser errors ● Proof Assistants ● Architecture (1/2) ■ Efficiency of an interpreted language ● Architecture (2/2) ● Implementation of a prototype ◆ Browser efficiency ● User Security and Efficiency ● Server Security ■ Network latency ● Server Efficiency ◆ TCP Ping time Teaching logic Cezary Kaliszyk Teaching logic using a web interface for Coq 9
Server Security ■ Crackers, “Too-powerful” provers ● Presentation Plan ● Why the Web? ● Web Technologies ● Proof Assistants ■ Availability of work and files and equal sharing of all resources ● Architecture (1/2) ● Architecture (2/2) ● Implementation of a prototype ● User Security and Efficiency ■ The communication mechanism ● Server Security ● Server Efficiency Teaching logic ■ Compilation and dependencies Cezary Kaliszyk Teaching logic using a web interface for Coq 10
Server Security ■ Crackers, “Too-powerful” provers ● Presentation Plan ◆ Sandboxing ● Why the Web? ● Web Technologies ● Proof Assistants ■ Availability of work and files and equal sharing of all resources ● Architecture (1/2) ● Architecture (2/2) ◆ disk quota, CPU quota, memory quota ● Implementation of a prototype ● User Security and Efficiency ■ The communication mechanism ● Server Security ● Server Efficiency ◆ HTTPS Teaching logic ■ Compilation and dependencies Cezary Kaliszyk Teaching logic using a web interface for Coq 10
Server Efficiency ● Presentation Plan ● Why the Web? ● Web Technologies ● Proof Assistants ● Architecture (1/2) ■ Depends on: ● Architecture (2/2) ◆ Number of users, server configuration, provers, usage of ● Implementation of a prototype ● User Security and Efficiency automated techniques, . . . ● Server Security ● Server Efficiency ■ Possible to start provers on different machines Teaching logic ■ We expect compilation of dependencies to be the main bottleneck in bigger projects (more in Pierre’s talk) Cezary Kaliszyk Teaching logic using a web interface for Coq 11
Project parts ● Presentation Plan ● Why the Web? ● Web Technologies ● Proof Assistants ● Architecture (1/2) ■ programming the interface ● Architecture (2/2) ● Implementation of a prototype ■ tactics for first-order logic ● User Security and Efficiency ● Server Security ■ graphical presentation of proofs ● Server Efficiency ■ a problem set Teaching logic ● Project parts ● Example of a tactic ■ course notes / manual ● Example of an exercise ● Example of a proof tree ● Example of a Fitch proof tree ● Proofweb in practice ● Coq (with Proofweb) vs. Jape (or cousins) ● Work in progress Cezary Kaliszyk Teaching logic using a web interface for Coq 12
Example of a tactic disjunction elimination: ● Presentation Plan ● Why the Web? ● Web Technologies ● Proof Assistants Ltac dis_el X H1 H2 := ● Architecture (1/2) ● Architecture (2/2) match X with ● Implementation of a prototype | ( _ \/ _ ) => ● User Security and Efficiency ● Server Security assert X; ● Server Efficiency [ idtac | Teaching logic match goal with ● Project parts | x : X |- _ => ● Example of a tactic ● Example of an exercise elim x; [intro H1 | intro H2]; clear x ● Example of a proof tree end ● Example of a Fitch proof tree ● Proofweb in practice ] ● Coq (with Proofweb) vs. Jape | _ => fail "The first argument is not a disjunction" (or cousins) ● Work in progress end. Cezary Kaliszyk Teaching logic using a web interface for Coq 13
Example of an exercise Theorem exercise_024 : (A \/ B) /\ ˜A -> B. ● Presentation Plan ● Why the Web? Proof. ● Web Technologies imp_in z. ● Proof Assistants ● Architecture (1/2) dis_el (A \/ B) y1 y2. ● Architecture (2/2) con_ell (˜A). ● Implementation of a prototype ass z. ● User Security and Efficiency ● Server Security neg_el A. ● Server Efficiency con_elr (A \/ B). Teaching logic ass z. ● Project parts ● Example of a tactic ass y1. ● Example of an exercise ass y2. ● Example of a proof tree Qed. ● Example of a Fitch proof tree ● Proofweb in practice ● Coq (with Proofweb) vs. Jape (or cousins) ● Work in progress Cezary Kaliszyk Teaching logic using a web interface for Coq 14
Example of a proof tree ● Presentation Plan ● Why the Web? ● Web Technologies ● Proof Assistants ● Architecture (1/2) ● Architecture (2/2) ● Implementation of a prototype ● User Security and Efficiency ● Server Security ● Server Efficiency Teaching logic ● Project parts ● Example of a tactic ● Example of an exercise ● Example of a proof tree ● Example of a Fitch proof tree ● Proofweb in practice ● Coq (with Proofweb) vs. Jape (or cousins) ● Work in progress Cezary Kaliszyk Teaching logic using a web interface for Coq 15
Example of a Fitch proof tree ● Presentation Plan ● Why the Web? ● Web Technologies ● Proof Assistants ● Architecture (1/2) ● Architecture (2/2) ● Implementation of a prototype ● User Security and Efficiency ● Server Security ● Server Efficiency Teaching logic ● Project parts ● Example of a tactic ● Example of an exercise ● Example of a proof tree ● Example of a Fitch proof tree ● Proofweb in practice ● Coq (with Proofweb) vs. Jape (or cousins) ● Work in progress Cezary Kaliszyk Teaching logic using a web interface for Coq 16
Recommend
More recommend