Collaborative Editing with PGIP A Fresh Look at the PGIP Display - - PowerPoint PPT Presentation

collaborative editing with pgip
SMART_READER_LITE
LIVE PREVIEW

Collaborative Editing with PGIP A Fresh Look at the PGIP Display - - PowerPoint PPT Presentation

Collaborative Editing with PGIP A Fresh Look at the PGIP Display Protocol David Aspinall, Christoph L uth November 1, 2007 Aspinall & L uth: Collaborative Editing with PGIP 1 November 1, 2007 PGIP Refresher Aspinall & L uth:


slide-1
SLIDE 1

Collaborative Editing with PGIP

A Fresh Look at the PGIP Display Protocol David Aspinall, Christoph L¨ uth November 1, 2007

Aspinall & L¨ uth: Collaborative Editing with PGIP 1 November 1, 2007

slide-2
SLIDE 2

PGIP Refresher

Aspinall & L¨ uth: Collaborative Editing with PGIP 2 November 1, 2007

slide-3
SLIDE 3

PGIP and PG Kit System Architecture

PGIPD PGIPD PGIPD Prover Prover Graphical User Interface Text Editor Eclipse Broker File System Theory Store Prover Components Display Components PGIP PGIP

P P

Aspinall & L¨ uth: Collaborative Editing with PGIP 3 November 1, 2007

slide-4
SLIDE 4

PGIP Status

Design & implementation started 2003 Supported in Isabelle (2005) Experiments with Coq (2007) RSN: Proof General Eclipse

Aspinall & L¨ uth: Collaborative Editing with PGIP 4 November 1, 2007

slide-5
SLIDE 5

PG Kit System Architecture

PGIPD PGIPD PGIPD Prover Prover Graphical User Interface Text Editor Eclipse Broker File System Theory Store Prover Components Display Components PGIP PGIP

P P

Aspinall & L¨ uth: Collaborative Editing with PGIP 5 November 1, 2007

slide-6
SLIDE 6

Sample Message Exchange

. . . . . . . . . . . . Text is successfully Text is successfully User requests file to be loaded. parsed. Broker Display Prover <parsescript> <parseresult> <loadparsefile> <parsescript> Users edits a text region. commands are successfully executed. <parseresult> Old text is deleted, edited text is inserted. User request <newcmd> <ready> <ready> prover command prover command parsed. <newcmd> <editcmd> <delcmd> <newcmd> <setcmdstatus> <cmdstatus> <cmdstatus> Broker creates new prover commands. command to be processed. Several prover Aspinall & L¨ uth: Collaborative Editing with PGIP 6 November 1, 2007

slide-7
SLIDE 7

Proof Language

Proof script: native language

lemma fn1: ”(∃ x. P (f x)) − → (∃ y. P y)” proof assume ”∃ x. P (f x)” thus ”∃ y. P y” proof fix a assume ”P (f a)” show ?thesis .. qed qed

Aspinall & L¨ uth: Collaborative Editing with PGIP 7 November 1, 2007

slide-8
SLIDE 8

Proof Language Markup

Proof scripts: native language plus PGIP markup

<opengoal name=”fn1”>lemma fn1: &quot;(<sym name=”exists”>EX</sym> x. <openblock/><proofstep>proof</proofstep> <proofstep>assume &quot;<sym name=”exists”>EX</sym> x. P (f x)&quot;</ <proofstep>thus &quot;<sym name=”exists”>EX</sym> y. P y&quot;</proofste <openblock/><proofstep>proof</proofstep> <proofstep>fix a</proofstep> <proofstep>assume &quot;P (f a)&quot;</proofstep> <proofstep>show ?thesis</proofstep><openblock/> <proofstep>..</proofstep><closeblock/> <proofstep>qed</proofstep><closeblock/> <closegoal>qed</closegoal><closeblock/>

Aspinall & L¨ uth: Collaborative Editing with PGIP 8 November 1, 2007

slide-9
SLIDE 9

Document States in Development

Unparsed Outdated Outdate request Processed Normal response response Send to prover Parsed

Being processed

proof Replay Error Parse command Edit command

Aspinall & L¨ uth: Collaborative Editing with PGIP 9 November 1, 2007

slide-10
SLIDE 10

PGIPD Revisited

Aspinall & L¨ uth: Collaborative Editing with PGIP 10 November 1, 2007

slide-11
SLIDE 11

Display commands: display − → broker

Provers: <launchprover>... Files: <loadparsefile url="file:///home/cxl/proof.thy" prvid="xyz.2007.25"/> <savefile url="file:///home/cxl/newproof.thy" srcid="f07"/> Editing: <createobj srcid="f07" objposition="a19" >apply (drule_tac x="f y" in spec)</createobj> <editobj src="f07" editfrom="a19" editto="a23">...</editobj> Proving: <setobjstate objid="a15" newstate="processed">

Aspinall & L¨ uth: Collaborative Editing with PGIP 11 November 1, 2007

slide-12
SLIDE 12

Display messages: broker − → displays

Provers: <proverstarted prvid="xyz.2007.25"/> Files: <newfile prvid="xyz.2007.25" srcid="f07" url="file:///home/cxl/proof.thy"/> Editing: <newobj srcid="f07" objid="a23"> <proofstep>apply (drule_tac x="f y" in spec)< /proofstep></newobj> Proving: <objstate objid="a23" newstate="processed"/>

Aspinall & L¨ uth: Collaborative Editing with PGIP 12 November 1, 2007

slide-13
SLIDE 13

PGIP Display Protocol Revisited

Display protocol has unique identifiers for:

provers (prvid) loaded files (srcid) commands (objid)

Aspinall & L¨ uth: Collaborative Editing with PGIP 13 November 1, 2007

slide-14
SLIDE 14

PGIP Display Protocol Revisited

Display protocol has unique identifiers for:

provers (prvid) loaded files (srcid) commands (objid)

Systematic view of broker:

provides stateless access to inherently stateful resources Resources organised hierarchically state changes communicated e.g. via XUpdate or HTTP

Aspinall & L¨ uth: Collaborative Editing with PGIP 13 November 1, 2007

slide-15
SLIDE 15

A Taxonomy of Resources

Broker:

global configurations, list of known provers, list of loaded files

Prover:

status, preferences, identifiers, menues; list of files loaded; messages; component specification: how to start, system attributes;

File:

list of links to all text spans source URL file status

Text span:

PGIP markup, text content status (unparsed . . . outdated)

Aspinall & L¨ uth: Collaborative Editing with PGIP 14 November 1, 2007

slide-16
SLIDE 16

Communicating Changes

The (asynchronous) RPC way: XUpdate

Load a file (<loadparsefile>) <xupdate:append select="provers/xyz.2007.25/files/"> <srcfile url="..."> </xupdate:append> Edit a text span: (<editobj>) <xupdate:update select="files/f07/[objid=a19 or objid=a20 or objid=a21]" >apply ...</xupdate:update>

The Web way: CRUD

Load a file: POST file to "provers/xyz.2007.25/files/" Edit a text span: DELETE files/f07#a19 files/f07#a20 files/f07#a21 PUT files/f07#a25 Alternatively: PUT files/f07.xml

Aspinall & L¨ uth: Collaborative Editing with PGIP 15 November 1, 2007

slide-17
SLIDE 17

Collaborative Editing

Aspinall & L¨ uth: Collaborative Editing with PGIP 16 November 1, 2007

slide-18
SLIDE 18

Wiki-style Collaboration

lemma fn1: ”(∃ x. P (f x)) − → (∃ y. P y)” proof Begin Conflict assume ”∃ x. P (f x)” Conflict -1+1 v1.1 assume ”∃ z. P z” Conflict -1+1 current assume ”∃ y. P y” End Conflict

Aspinall & L¨ uth: Collaborative Editing with PGIP 17 November 1, 2007

slide-19
SLIDE 19

Collaborative Proving?

Proving = problem-solving = wiki page editing Hypothesis: fine-grained collaboration useful

CSCW mode: distributed, synchronous plus additional side-channels for communication = ⇒ concurrent editing within proof text: WYSIWIS

Challenge: proof texts have rich inherent structure

Aspinall & L¨ uth: Collaborative Editing with PGIP 18 November 1, 2007

slide-20
SLIDE 20

Towards Collaborative Editing with PGIPD

Theorem 2 Theorem 1 Theory T1 Definition 1 Lemma 1 Lemma 2

Show dependencies Collaborate editing respects dependencies Extended notion of conflict

Aspinall & L¨ uth: Collaborative Editing with PGIP 19 November 1, 2007

slide-21
SLIDE 21

Conclusions

PGIP with XUpdate

a uniform mechanism for change propagation broker provides stateless view on stateful resources

Connections with MathWiki

API design for interactive proving multiple displays: going beyond traditional wikis — more collaborative

Aspinall & L¨ uth: Collaborative Editing with PGIP 20 November 1, 2007