Integrating Web Services into Interactive Mathematical Documents

626 views
578 views

Published on

CIAO 2009

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
626
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
5
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Integrating Web Services into Interactive Mathematical Documents

  1. 1. Introduction Architecture Web Services Conclusion Integrating Web Services into Interactive Mathematical Documents CIAO workshop 2009 Christoph Lange, Florian Rabe, Jana Giceva Jacobs University, Bremen, Germany KWARC – Knowledge Adaptation and Reasoning for Content April 2, 2009 Lange, Rabe, Giceva (Jacobs University) Integrating Web Services into Interactive Mathematical Documents 2, 2009 April 1
  2. 2. Introduction Architecture Web Services Conclusion Interactive Documents Mathematical Documents are everywhere on the web (e. g. MathWorld, PlanetMath, Wikipedia, . . . ) But they lack interactivity! Examples of interactive services: Do not just get any document that is available on the server, but a document that is adapted to your preferences, previous knowledge, field of application, . . . Solve exercises Evaluate/compute/check expressions Lange, Rabe, Giceva (Jacobs University) Integrating Web Services into Interactive Mathematical Documents 2, 2009 April 2
  3. 3. Introduction 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. MONET), but accessible from documents? Yes, sometimes, but not really easy to integrate; most of the time only used in their native environment Lange, Rabe, Giceva (Jacobs University) Integrating Web Services into Interactive Mathematical Documents 2, 2009 April 3
  4. 4. Introduction Architecture Web Services Conclusion The (non-mathematical) Web 2.0 Asynchronous communication (AJAX): web applications that feel like desktop applications (rich, responsive widgets) Mashups: integrate services into documents First prominent example: HousingMaps = Craig’s List housing ads + Google Maps So how about a mathematical Web 2.0 with mashups of web services? Lange, Rabe, Giceva (Jacobs University) Integrating Web Services into Interactive Mathematical Documents 2, 2009 April 4
  5. 5. Introduction 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 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 Lange, Rabe, Giceva (Jacobs University) Integrating Web Services into Interactive Mathematical Documents 2, 2009 April 5
  6. 6. Introduction Architecture Web Services Conclusion A Document Format that Enables Services Math markup on the web: MathML (W3C standard supported by Mozilla/Firefox and Opera), both presentational and semantic (“content”) markup We enforce some underspecified aspects of the specification Lange, Rabe, Giceva (Jacobs University) Integrating Web Services into Interactive Mathematical Documents 2, 2009 April 6
  7. 7. Introduction Architecture Web Services Conclusion Switching between Alternative Displays <OMATTR> <OMATP > <OMS cd=" f o l d i n g " name=" a b b r e v "/> Wpot (R) </OMATP > −e 2 4π 0 R/2 </OMATTR> renders as <m a c t i o n a c t i o n t y p e =" a b b r e v " s e l e c t i o n ="1"> −e 2 4π 0 R/2 Wpot (R) </maction > Here: prepared by the author. But also: undo/redo of document changes by other services Lange, Rabe, Giceva (Jacobs University) Integrating Web Services into Interactive Mathematical Documents 2, 2009 April 7
  8. 8. Introduction Architecture Web Services Conclusion Grouping Subterms for Interactive Folding Same as before, but always available (<maction actiontype="folding">) Example: [1 + [2 · x ]] [1 + . . . ] Lange, Rabe, Giceva (Jacobs University) Integrating Web Services into Interactive Mathematical Documents 2, 2009 April 8
  9. 9. Introduction 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">⁢ <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> Lange, Rabe, Giceva (Jacobs University) Integrating Web Services into Interactive Mathematical Documents 2, 2009 </semantics> April 9
  10. 10. Introduction 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 <m a c t i o n t y p e =" e l i s i o n "> <mspace/> <mo f e n c e =" t r u e " omdoc : e g r o u p =" f e n c e " omdoc : e l e v e l ="100">(</mo> </maction > Lange, Rabe, Giceva (Jacobs University) Integrating Web Services into Interactive Mathematical Documents 2, 2009 April 10
  11. 11. Introduction 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 / j o b a d . 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 −l o o k u p " , " Look up d e f i n i t i o n " , " h t t p : / / j o b a d . mathweb . o r g / backend ? a c t i o n=d e f i n i t i o n − &c d b a s e=$ c d b a s e&cd=$cd&name=$name " ) ; </ s c r i p t> Lange, Rabe, Giceva (Jacobs University) Integrating Web Services into Interactive Mathematical Documents 2, 2009 April 11
  12. 12. Introduction 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 Lange, Rabe, Giceva (Jacobs University) Integrating Web Services into Interactive Mathematical Documents 2, 2009 April 12
  13. 13. Introduction Architecture Web Services Conclusion Definition and Type Lookup Input: ID of a symbol σ; output: content-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 Lange, Rabe, Giceva (Jacobs University) Integrating Web Services into Interactive Mathematical Documents 2, 2009 April 13
  14. 14. Introduction 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) Future: preselect admissible conversions by client/server negotiation Lange, Rabe, Giceva (Jacobs University) Integrating Web Services into Interactive Mathematical Documents 2, 2009 April 14
  15. 15. Introduction 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. The MMT system is one. Lange, Rabe, Giceva (Jacobs University) Integrating Web Services into Interactive Mathematical Documents 2, 2009 April 15
  16. 16. Introduction Architecture Web Services Conclusion Conclusion Architecture for interactive mathematical documents Reader can interactively adapt appearance Document interacts with web services Knowledge representation: MathML maxed out (but degrades gracefully) Initial set of local and remote services, server can advertie additional services Try the demos at https://jomdoc.omdoc.org/wiki/JOBAD Lange, Rabe, Giceva (Jacobs University) Integrating Web Services into Interactive Mathematical Documents 2, 2009 April 16
  17. 17. Introduction Architecture Web Services Conclusion Future Work Services that we have thought about: Notation selection Guided tours (extension of lookup) Flattening (of theory imports) Search (this or similar formulae) Links to web resources (e. g. Wikipedia) Adaptive display of statement-level structures (proofs, rhetorical structures) Editing Saving (first adapt a document, then save that state on the server) Your wishes? Lange, Rabe, Giceva (Jacobs University) Integrating Web Services into Interactive Mathematical Documents 2, 2009 April 17

×