• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Integrating Web Services into Interactive Mathematical Documents
 

Integrating Web Services into Interactive Mathematical Documents

on

  • 895 views

Conferences on Intelligent Computer Mathematics 2009, Mathematical Knowledge Management

Conferences on Intelligent Computer Mathematics 2009, Mathematical Knowledge Management

Statistics

Views

Total Views
895
Views on SlideShare
894
Embed Views
1

Actions

Likes
0
Downloads
1
Comments
0

1 Embed 1

http://www.slideshare.net 1

Accessibility

Upload Details

Uploaded via as Adobe PDF

Usage Rights

CC Attribution-ShareAlike LicenseCC Attribution-ShareAlike License

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Integrating Web Services into Interactive Mathematical Documents Integrating Web Services into Interactive Mathematical Documents Presentation Transcript

    • Einführung Architecture Web Services Conclusion Integrating Web Services into Interactive Mathematical Documents MKM 2009 Jana Giceva, Christoph Lange, Florian Rabe Jacobs University, Bremen, Germany KWARC – Knowledge Adaptation and Reasoning for Content This work was supported by JEM-Thematic-Network ECP-038208. July 12, 2009 Giceva, Lange, Rabe (Jacobs University) Integrating Web Services into Interactive Mathematical Documents July 12, 2009 1/16
    • Einführung Architecture Web Services Conclusion Interactive Documents Mathematics everywhere, but not interactive! Giceva, Lange, Rabe (Jacobs University) Integrating Web Services into Interactive Mathematical Documents July 12, 2009 2/16
    • Einführung Architecture Web Services Conclusion Mathematical Web Services Services for . . . flexibly adapting documents to varying audiences checking users’ solutions to exercises evaluating expressions, solving problems . . . are available (e. g. SCIEnce), but accessible from documents? Yes, sometimes (Matita, ActiveMath), but not really easy to integrate elsewhere; most of the time only used in their native environment Giceva, Lange, Rabe (Jacobs University) Integrating Web Services into Interactive Mathematical Documents July 12, 2009 3/16
    • Einführung Architecture Web Services Conclusion The (non-mathematical) Web 2.0 + Craig’s List Google Maps Housingmaps (Mashup) Giceva, Lange, Rabe (Jacobs University) Integrating Web Services into Interactive Mathematical Documents July 12, 2009 4/16
    • Einführung Architecture Web Services Conclusion JOBAD: An Architecture for Interactive Documents JavaScript API for OMDoc-based Active Documents integrated backend or independent web services unit content notation converter dictionaries collection Web Services proxy renderer menu layers elision folding unit definition notation initially mouse keybd conversion lookup selection generates Client Modules action GUI objects Services Document XHTML+MathML+OpenMath, JavaScript http://jomdoc.omdoc.org/wiki/JOBAD Giceva, Lange, Rabe (Jacobs University) Integrating Web Services into Interactive Mathematical Documents July 12, 2009 5/16
    • Einführung Architecture Web Services Conclusion A Document Format that Enables Services Math markup on the web: MathML (W3C standard supported by Mozilla/Firefox and partly others), both presentational and semantic (‘‘content’’) markup We enforce some underspecified aspects of the specification: maction for alternative displays terms must be grouped using mrow cross-linked parallel markup, links from presentation to content markup other lightweight annotations allowed as custom attributes Giceva, Lange, Rabe (Jacobs University) Integrating Web Services into Interactive Mathematical Documents July 12, 2009 6/16
    • Einführung Architecture Web Services Conclusion Switching between Alternative Displays <OMATTR> renders as <OMATP> <OMS cd =" f o l d i n g " <maction a c t i o n t y p e =" abbrev " name=" abbrev " / > s e l e c t i o n ="1" > Epot (R) −e2 4πє 0 R 2 </OMATP> Epot (R) −e2 4πє 0 R 2 </ maction > </OMATTR> Here: prepared by the author. But also: fold subterms, undo/redo of document changes by other services Giceva, Lange, Rabe (Jacobs University) Integrating Web Services into Interactive Mathematical Documents July 12, 2009 7/16
    • Einführung Architecture Web Services Conclusion Cross-Linked Parallel Markup <annotation-xml encoding="OpenMath"> <semantics> <OMA id="E"> <!-- a+b 2 c --> <OMS cd="arith1" name="plus" <mrow xref="#E"> id="E.0"/> <mi xref="#E.1">a</mi> <OMV name="a" id="E.1"/> <mo xref="#E.0">+</mo> <OMA id="E.2"> <mrow xref="#E.2"> <OMS cd="arith1" name="times" <msup xref="#E.2.1"> id="E.2.0"/> <mi xref="#E.2.1.1">b</mi> <OMA id="E.2.1"> <mn xref="#E.2.1.2">2</mn> → <OMS cd="arith1" name="power" </msup> id="E.2.1.0"/> <mo xref="#E.2.0">&#x2062; <OMV name="b" id="E.2.1.1"/> <!-- INVISIBLE TIMES --> <OMI id="E.2.1.2">2</OMI> </mo> </OMA> <mi xref="#E.2.2">c</mi> <OMV name="c" id="E.2.2"/> </mrow> </OMA> <mo xref="#E.0">+</mo> <OMV name="d" id="E.3"/> <mi xref="#E.3">d</mi> </OMA> </mrow> </annotation-xml> Giceva, Lange, Rabe (Jacobs University) Integrating Web Services</semantics> into Interactive Mathematical Documents July 12, 2009 8/16
    • Einführung Architecture Web Services Conclusion Lightweight Annotations for Flexible Elisions In general: leave out information that distracts the reader or that doesn’t fit on the paper In particular: redundant brackets around strong-binding operators But what if the reader is not yet familiar with certain operators? ⇒ make it interactive 5 ⋅ (x + y)n+3 ≤ (a ⋅ b)! ∨ ¬p ∧ ¬(q ≤ π) <maction t y p e =" e l i s i o n " > <mspace / > <mo f e n c e =" t r u e " omdoc : egroup =" f e n c e " omdoc : e l e v e l = " 1 0 0 " > ( < /mo> </ maction > Giceva, Lange, Rabe (Jacobs University) Integrating Web Services into Interactive Mathematical Documents July 12, 2009 9/16
    • Einführung Architecture Web Services Conclusion Lightweight Annotations for Flexible Elisions In general: leave out information that distracts the reader or that doesn’t fit on the paper In particular: redundant brackets around strong-binding operators But what if the reader is not yet familiar with certain operators? ⇒ make it interactive 5 ⋅ (x + y)n+3 ≤ (a ⋅ b)! ∨ (¬p ∧ ¬(q ≤ π)) <maction t y p e =" e l i s i o n " > <mspace / > <mo f e n c e =" t r u e " omdoc : egroup =" f e n c e " omdoc : e l e v e l = " 1 0 0 " > ( < /mo> </ maction > Giceva, Lange, Rabe (Jacobs University) Integrating Web Services into Interactive Mathematical Documents July 12, 2009 9/16
    • Einführung Architecture Web Services Conclusion Lightweight Annotations for Flexible Elisions In general: leave out information that distracts the reader or that doesn’t fit on the paper In particular: redundant brackets around strong-binding operators But what if the reader is not yet familiar with certain operators? ⇒ make it interactive (5 ⋅ (x + y)n+3) ≤ (a ⋅ b)! ∨ (¬p ∧ ¬(q ≤ π)) <maction t y p e =" e l i s i o n " > <mspace / > <mo f e n c e =" t r u e " omdoc : egroup =" f e n c e " omdoc : e l e v e l = " 1 0 0 " > ( < /mo> </ maction > Giceva, Lange, Rabe (Jacobs University) Integrating Web Services into Interactive Mathematical Documents July 12, 2009 9/16
    • Einführung Architecture Web Services Conclusion Lightweight Annotations for Flexible Elisions In general: leave out information that distracts the reader or that doesn’t fit on the paper In particular: redundant brackets around strong-binding operators But what if the reader is not yet familiar with certain operators? ⇒ make it interactive (5 ⋅ (x + y)n+3) ≤ ((a ⋅ b)!) ∨ ((¬p) ∧ (¬(q ≤ π))) <maction t y p e =" e l i s i o n " > <mspace / > <mo f e n c e =" t r u e " omdoc : egroup =" f e n c e " omdoc : e l e v e l = " 1 0 0 " > ( < /mo> </ maction > Giceva, Lange, Rabe (Jacobs University) Integrating Web Services into Interactive Mathematical Documents July 12, 2009 9/16
    • Einführung Architecture Web Services Conclusion Lightweight Annotations for Flexible Elisions In general: leave out information that distracts the reader or that doesn’t fit on the paper In particular: redundant brackets around strong-binding operators But what if the reader is not yet familiar with certain operators? ⇒ make it interactive ((5⋅(x +y)n+3) ≤ ((a⋅b)!))∨((¬p)∧(¬(q ≤ π))) <maction t y p e =" e l i s i o n " > <mspace / > <mo f e n c e =" t r u e " omdoc : egroup =" f e n c e " omdoc : e l e v e l = " 1 0 0 " > ( < /mo> </ maction > Giceva, Lange, Rabe (Jacobs University) Integrating Web Services into Interactive Mathematical Documents July 12, 2009 9/16
    • Einführung Architecture Web Services Conclusion Lightweight Annotations for Flexible Elisions In general: leave out information that distracts the reader or that doesn’t fit on the paper In particular: redundant brackets around strong-binding operators But what if the reader is not yet familiar with certain operators? ⇒ make it interactive ((5⋅(x+y)(n+3)) ≤ ((a⋅b)!))∨((¬p)∧(¬(q ≤ π))) <maction t y p e =" e l i s i o n " > <mspace / > <mo f e n c e =" t r u e " omdoc : egroup =" f e n c e " omdoc : e l e v e l = " 1 0 0 " > ( < /mo> </ maction > Giceva, Lange, Rabe (Jacobs University) Integrating Web Services into Interactive Mathematical Documents July 12, 2009 9/16
    • Einführung Architecture Web Services Conclusion Integrating Web Services No fixed access pattern (REST vs. XML-RPC vs. SOAP), no fixed set of services The server that serves a document is responsible for advertising available services . . . and shipping required JavaScript client code < s c r i p t s r c = " . . / s c r i p t s / jobad . j s " / > < s c r i p t type= " t e x t / j a v a s c r i p t " > j o b a d I n i t ( " contextmenu " ) ; jobadInit ( " elision " ) ; j o b a d I n i t ( " d e f i n i t i o n −lookup " , " Look up d e f i n i t i o n " , " h t t p : / / jobad . mathweb . org / backend ? a c t i o n = d e f i n i t i o n − &cdbase=$cdbase&cd=$cd&name=$name " ) ; </ script> Giceva, Lange, Rabe (Jacobs University) Integrating Web Services into Interactive Mathematical Documents July 12, 2009 10/16
    • Einführung Architecture Web Services Conclusion Rendering Rendering as a service?! Shouldn’t you get that for free with any document? Prerequisite for making output from other services human-readable! content markup (OpenMath) → presentation markup (Presentation MathML) future work: more control over notation selection <OMA> <OMS cd =" combinat1 " n k , or Ck , Cn name=" b i n o m i a l " / > n k <OMV name=" n " / > <OMV name=" k " / > </OMA> Giceva, Lange, Rabe (Jacobs University) Integrating Web Services into Interactive Mathematical Documents July 12, 2009 11/16
    • Einführung Architecture Web Services Conclusion Definition and Type Lookup Input: ID of a symbol σ; output: content- or presentation-markup definition (or type declaration) of σ Utilize HTTP content negotiation: request MIME type application/xhtml+xml to get a rendered formula Alternative: in-place expansion (not always applicable) Giceva, Lange, Rabe (Jacobs University) Integrating Web Services into Interactive Mathematical Documents July 12, 2009 12/16
    • Einführung Architecture Web Services Conclusion Unit Conversion Units in OpenMath: numbers multiplied with ‘‘unit symbols’’ (or arithmetic compositions of unit symbols, optionally with prefix) <OMA> <OMS cd="arith1" name="times"/> <OMI>1</OMI> <OMS cd="units_metric1" name="metre"/> </OMA> OpenMath-based conversion service exists: Input: selected expression, target unit; output: converted expression (rendered) Giceva, Lange, Rabe (Jacobs University) Integrating Web Services into Interactive Mathematical Documents July 12, 2009 13/16
    • Einführung Architecture Web Services Conclusion Integrated Backends Theory: all services separate (clean conceptual model) Practice: multiple services in an integrated backend (more efficient, both w. r. t. space and time) We are developing such integrated backends offering many (not all) services. Examples: the MMT system, the SWiM wiki Giceva, Lange, Rabe (Jacobs University) Integrating Web Services into Interactive Mathematical Documents July 12, 2009 14/16
    • Einführung Architecture Web Services Conclusion Conclusion 1 Architecture for interactive mathematical documents 2 Reader can interactively adapt appearance 3 Single document serves as interface to embedded and remote services 4 Knowledge representation: MathML maxed out (but degrades gracefully to static snapshots) 5 Initial set of local and remote services, server can advertise additional services 6 Try the demos at http://jomdoc.omdoc.org/wiki/JOBAD Giceva, Lange, Rabe (Jacobs University) Integrating Web Services into Interactive Mathematical Documents July 12, 2009 15/16
    • Einführung Architecture Web Services Conclusion Future Services that we are planning Notation selection (⋅/×/invisible, n /Ck , Cn ) k n k Guided tours (extension of lookup) Flattening (of theory imports) Search this or similar formulæ on the web (→ http://search.mathweb.org) Links to web resources (e. g. Wikipedia) Interactive statement-level structures (proof steps, rhetorical structures) Saving (first adapt a document, then save that state on the server) Possible cooperations: SCIEnce (computation), interactive exercises Your wishes? Giceva, Lange, Rabe (Jacobs University) Integrating Web Services into Interactive Mathematical Documents July 12, 2009 16/16