easily editing and browsing complex openmath markup with swim

20
OpenMath CDs SWiM Knowledge Representation Editing Related Work Outlook/Conclusion Easily Editing and Browsing Complex OpenMath Markup with SWiM Mathematical User Interfaces 2008 Christoph Lange, Alberto González Palomo Jacobs University, Bremen, Germany Universität des Saarlandes, Saarbrücken, Germany KWARC – Knowledge Adaptation and Reasoning for Content June 27, 2008 Lange/González Palomo (Jacobs/Saarland Univ.) Editing and Browsing OpenMath with SWiM June 27, 2008 1

Upload: christoph-lange

Post on 24-Jan-2015

822 views

Category:

Technology


4 download

DESCRIPTION

Mathematical User Interfaces, CICM 2008

TRANSCRIPT

Page 1: Easily Editing and Browsing Complex OpenMath Markup with SWiM

OpenMath CDs SWiM Knowledge Representation Editing Related Work Outlook/Conclusion

Easily Editing and Browsing Complex OpenMathMarkup with SWiM

Mathematical User Interfaces 2008

Christoph Lange, Alberto González Palomo

Jacobs University, Bremen, GermanyUniversität des Saarlandes, Saarbrücken, Germany

KWARC – Knowledge Adaptation and Reasoning for Content

June 27, 2008

Lange/González Palomo (Jacobs/Saarland Univ.) Editing and Browsing OpenMath with SWiM June 27, 2008 1

Page 2: Easily Editing and Browsing Complex OpenMath Markup with SWiM

OpenMath CDs SWiM Knowledge Representation Editing Related Work Outlook/Conclusion

OpenMath Content Dictionaries

OpenMath: semantic markup language for math. formulæ and contentdictionaries (CDs)CDs semi-formally define new mathematical symbols:

informal descriptionformal description in terms of other symbolsoptional: type declaration, human-readable notation

Formula editors exist, . . .. . . and ways to make CDs readable for humans(www.openmath.org/cd/) . . .but no proper editors for CDs

Lange/González Palomo (Jacobs/Saarland Univ.) Editing and Browsing OpenMath with SWiM June 27, 2008 2

Page 3: Easily Editing and Browsing Complex OpenMath Markup with SWiM

OpenMath CDs SWiM Knowledge Representation Editing Related Work Outlook/Conclusion

Why create or edit CDs?

standard CDs exist; pick your favourite ones fromwww.openmath.org/cd/

your favourite field of mathematics may not be covered (cf. geometry)or you want to have it more rigorouslycf. James Davenport’s landau_in operator for f = O(n)

Lange/González Palomo (Jacobs/Saarland Univ.) Editing and Browsing OpenMath with SWiM June 27, 2008 3

Page 4: Easily Editing and Browsing Complex OpenMath Markup with SWiM

OpenMath CDs SWiM Knowledge Representation Editing Related Work Outlook/Conclusion

Collaboration on CDs: The Good, the Bad, and the Ugly

writing, structuring; also browsing, collaboratingCDs reuse symbols from other CDs (link symbol occurrences to theirdefinitions)use case: revising a notation of a symbol in a CD; one author revises,the other one testsThe bad way: Notepad, send file to collaborator by e-mail

Manual transformation to XHTML+MathML, openbrowser

The ugly way: Emacs with nxml-mode, commit into sharedSubversion repositoryUpdate, run make, open browser (Michael Kohlhase’sfavorite ,)

The wiki way: interactive editing right in the browser ⇒ instantfeedback for both collaborators

Lange/González Palomo (Jacobs/Saarland Univ.) Editing and Browsing OpenMath with SWiM June 27, 2008 4

Page 5: Easily Editing and Browsing Complex OpenMath Markup with SWiM

OpenMath CDs SWiM Knowledge Representation Editing Related Work Outlook/Conclusion

Debugging Notation Definitions

Consider the symbol times in arith1.ocd :

<OMA><OMS name="times" cd="arith1"/><OMI>2</OMI><OMV name="x"/>

</OMA>

Possible renderings:2 · x , 2× x , or 2x(defined in arith1.ntn)

Typical workflow:Change/fix/improve/enhance the notation definition (ND) for asymbolCheck the appearance of a sample formula in a sample document

Lange/González Palomo (Jacobs/Saarland Univ.) Editing and Browsing OpenMath with SWiM June 27, 2008 5

Page 6: Easily Editing and Browsing Complex OpenMath Markup with SWiM

OpenMath CDs SWiM Knowledge Representation Editing Related Work Outlook/Conclusion

SWiM, a Semantic Wiki for Mathematics

SWiM: semantic wiki + OMDoc. Added OpenMath and MathML 3notation definitionsmmlproc/JOMDoc renderer (→ MKM talk “notations for livingdocuments”)editing, import, export (exchange with external repositories, legacyeditors)Try it at http://swim.kwarc.info, see more in the demo session!

Lange/González Palomo (Jacobs/Saarland Univ.) Editing and Browsing OpenMath with SWiM June 27, 2008 6

Page 7: Easily Editing and Browsing Complex OpenMath Markup with SWiM

OpenMath CDs SWiM Knowledge Representation Editing Related Work Outlook/Conclusion

SWiM, a Semantic Wiki for Mathematics

Lange/González Palomo (Jacobs/Saarland Univ.) Editing and Browsing OpenMath with SWiM June 27, 2008 7

Page 8: Easily Editing and Browsing Complex OpenMath Markup with SWiM

OpenMath CDs SWiM Knowledge Representation Editing Related Work Outlook/Conclusion

Knowledge Representation in OpenMath

CDs have metadata (e. g. review date) and contain symboldefinitions

Symbols havenameinformal, natural-language description (authoritative)metadatamathematical properties: informal (CMP), formal(FMP), examples

FMPs and Examples contain mathematical formulæ

Separate dictionary files withtype signaturesnotation definitions (in a few minutes)

for symbols.Lange/González Palomo (Jacobs/Saarland Univ.) Editing and Browsing OpenMath with SWiM June 27, 2008 8

Page 9: Easily Editing and Browsing Complex OpenMath Markup with SWiM

OpenMath CDs SWiM Knowledge Representation Editing Related Work Outlook/Conclusion

Knowledge Representation on the Semantic Web

Ontologies: smarter, extensible, web-scalable metadata vocabulariesRDF: graph with nodes and edges have types from ontologies, e. g.<christoph> foaf:knows <paul>.

We have developed an ontology that models the structures of CDssemantics given by OpenMath specmore expressive than Relax NG XML schemae. g. for dependent CDs (URIref vs. CD):<CDUses>arith1 transc1</CDUses>

reused existing vocabularies where appropriate (→ OpenMath 3)e. g. Dublin Core: om:Name 7→dc:identifier

Lange/González Palomo (Jacobs/Saarland Univ.) Editing and Browsing OpenMath with SWiM June 27, 2008 9

Page 10: Easily Editing and Browsing Complex OpenMath Markup with SWiM

OpenMath CDs SWiM Knowledge Representation Editing Related Work Outlook/Conclusion

Knowledge Representation in SWiM

small pages are more suitable for wiki collaborationpage granularity: CD, symbol, CMP, FMP, examplesplit imported CDs into these parts, preservecontainment information by XInclude links, reassembleon exportOpenMath 3: review units below CD granularity)extract RDF graph from OpenMath for a morenetworked, searchable, web-scalable representationexploit links for navigation, soon for editing, toorepresent formulæ shallowly (FMP/Example usessymbol)

Lange/González Palomo (Jacobs/Saarland Univ.) Editing and Browsing OpenMath with SWiM June 27, 2008 10

Page 11: Easily Editing and Browsing Complex OpenMath Markup with SWiM

OpenMath CDs SWiM Knowledge Representation Editing Related Work Outlook/Conclusion

Editing

SWiM uses the HTML WYSIWYG editor TinyMCEGreat potential for more user-friendliness, but first need to get thebasics runningMake any (OpenMath) XML element editable as a table, e. g.<element xml:id="id" attr="value">...</element>:element id attr=value. . .

Not user-friendly for deeply nested structuresDedicated editing support for special aspects of the markup

form-based metadata editor (e. g. CDName, CDDate)differently arranged tables in some cases:notationprototype rendering

visual formula editor (next slides)

Lange/González Palomo (Jacobs/Saarland Univ.) Editing and Browsing OpenMath with SWiM June 27, 2008 11

Page 12: Easily Editing and Browsing Complex OpenMath Markup with SWiM

OpenMath CDs SWiM Knowledge Representation Editing Related Work Outlook/Conclusion

The Formula Editor

visual OpenMath formula editor from Sentido environment integratedit into TinyMCEencode formulæ as HTML <span/> elements, editable in a “linear”ASCII/Unicode syntax

supporting own syntax, but also popular CAS syntaxespop-up window with linear input (undoable), OpenMath CD symboltool palette, 2D MathML previewwhen done with editing, linear formula is parsed to OpenMath XMLSorry, we cannot easily display MathML inside TinyMCE /

Lange/González Palomo (Jacobs/Saarland Univ.) Editing and Browsing OpenMath with SWiM June 27, 2008 12

Page 13: Easily Editing and Browsing Complex OpenMath Markup with SWiM

OpenMath CDs SWiM Knowledge Representation Editing Related Work Outlook/Conclusion

The Formula Editor

Lange/González Palomo (Jacobs/Saarland Univ.) Editing and Browsing OpenMath with SWiM June 27, 2008 13

Page 14: Easily Editing and Browsing Complex OpenMath Markup with SWiM

OpenMath CDs SWiM Knowledge Representation Editing Related Work Outlook/Conclusion

The Formula Editor

Lange/González Palomo (Jacobs/Saarland Univ.) Editing and Browsing OpenMath with SWiM June 27, 2008 14

Page 15: Easily Editing and Browsing Complex OpenMath Markup with SWiM

OpenMath CDs SWiM Knowledge Representation Editing Related Work Outlook/Conclusion

Defining Notations for Symbols

Notation definitions map patterns of semantic markup to fragmentsof presentation markup, apply rules recursively (MathML 3 extension→ MKM talk)e. g. @(arith1#root, arg, n) ` n

√arg (actually written in XML)link notation definition → symbol definition in RDF:<url/of/NotDef> omo:rendersSymbol <url/of/arith1/root>What if an author changes this?

1 identify the change: XML diff2 identify documents affected by the change: query RDF graph for all

resources using the symbol in a formula – and for all resources thatxi:include the former

Lange/González Palomo (Jacobs/Saarland Univ.) Editing and Browsing OpenMath with SWiM June 27, 2008 15

Page 16: Easily Editing and Browsing Complex OpenMath Markup with SWiM

OpenMath CDs SWiM Knowledge Representation Editing Related Work Outlook/Conclusion

Determining the Effect of Changing a Notation Definition

1 SELECT DISTINCT ?page WHERE 2 <changed-ntn-def> omo:rendersSymbol ?sym .3 ?page omo:usesSymbol ?sym UNION4 ?exOrFMP omo:usesSymbol ?sym .5 ?page omo:contains ?exOrFMP UNION6 ?page omo:contains ?symDef .7 ?symDef omo:contains ?exOrFMP

notDef sym

fmpfmpfmp

exexex

symDefsymDefsymDef cdcdcdrenders-

Symbol (2)usesSymbol (3,4)

usesSymbol (3,4)

contains (5,7)

contains (5,7)

contains (6)

Lange/González Palomo (Jacobs/Saarland Univ.) Editing and Browsing OpenMath with SWiM June 27, 2008 16

Page 17: Easily Editing and Browsing Complex OpenMath Markup with SWiM

OpenMath CDs SWiM Knowledge Representation Editing Related Work Outlook/Conclusion

Related Work

ProofWiki: wiki with Coq proof assistant integrated. Content eithercompletely formal or LATEX, SWiM aims at the full formalityscale between that (→ OMDoc)

OMPE: OpenMath Presentation Editor from ActiveMath, visualeditor for notation definitions (add this to our roadmap!).No integrated authoring/browsing environment ⇒ noimmediate debugging

PlatΩ: TEXmacs with semantic markup. Parsing notations fromnatural language (not a focus of SWiM), efficiently reactingto notation changes.

Visual editors: two examples of extending HTMLArea (former TinyMCEcompetitor) with Presentation MathMLASciencePad: Tiddly“Wiki” plus a translation from linear

math syntax to Presentation MathMLWIRIS: 2D visual editor (Java applet)

OpenMath editor exists, but not integratedLange/González Palomo (Jacobs/Saarland Univ.) Editing and Browsing OpenMath with SWiM June 27, 2008 17

Page 18: Easily Editing and Browsing Complex OpenMath Markup with SWiM

OpenMath CDs SWiM Knowledge Representation Editing Related Work Outlook/Conclusion

Future Work (OpenMath)

Cover full OpenMath object spec in linear syntax; particularlyCDBase!Deploy SWiM as an editor for the OpenMath CDs onwww.openmath.org

Integrate upcoming OpenMath 3 extensions (in ontology and GUI)

Lange/González Palomo (Jacobs/Saarland Univ.) Editing and Browsing OpenMath with SWiM June 27, 2008 18

Page 19: Easily Editing and Browsing Complex OpenMath Markup with SWiM

OpenMath CDs SWiM Knowledge Representation Editing Related Work Outlook/Conclusion

Future Work (Use Cases)

So far one notation per symbol. The mmlproc/JOMDoc renderer cando more (e. g. user’s preferred notation)Browsing CDs and SPARQL queries are nice, but formula search? –Integrate MathWebSearch! (→ MKM demo)Splitting CDs on import works, but users also want refactoring withinSWiM.

Lange/González Palomo (Jacobs/Saarland Univ.) Editing and Browsing OpenMath with SWiM June 27, 2008 19

Page 20: Easily Editing and Browsing Complex OpenMath Markup with SWiM

OpenMath CDs SWiM Knowledge Representation Editing Related Work Outlook/Conclusion

Conclusion

SWiM facilitates editing OpenMath CDs. . . by integrating a visual formula editor. . . by immediately re-rendering documents affected by notationalchanges

How would you like to edit your CDs?

Lange/González Palomo (Jacobs/Saarland Univ.) Editing and Browsing OpenMath with SWiM June 27, 2008 20