duce un aper cu
play

Duce: un aper cu Alain Frisch INRIA Rocquencourt 15 octobre 2004 - PowerPoint PPT Presentation

Duce: un aper cu Alain Frisch INRIA Rocquencourt 15 octobre 2004 GT Cristal Duce: un aper Alain Frisch cu Aper cu du langage XML Duce Fondements th eoriques Perspectives Interface avec OCaml Aper cu du langage


  1. ❈ Duce: un aper¸ cu Alain Frisch INRIA Rocquencourt 15 octobre 2004 GT Cristal ❈ Duce: un aper¸ Alain Frisch cu

  2. Aper¸ cu du langage XML ❈ Duce Fondements th´ eoriques Perspectives Interface avec OCaml Aper¸ cu du langage 1 XML ❈ Duce Interface avec OCaml Fondements th´ eoriques 2 Types, mod` eles, sous-typage Calcul, typage Aspects algorithmiques Perspectives 3 ❈ Duce: un aper¸ Alain Frisch cu

  3. Aper¸ cu du langage XML ❈ Duce Fondements th´ eoriques Perspectives Interface avec OCaml XML XML dans la Vraie Vie ➋ Documents, bureautique, web. Format d’´ echange entre applications. Web-services. Stockage, bases de donn´ ees. Fichiers de configuration, XUL, . . . Comment accompagner XML ? Point du vue des langages de programmation... ❈ Duce: un aper¸ Alain Frisch cu

  4. Aper¸ cu du langage XML ❈ Duce Fondements th´ eoriques Perspectives Interface avec OCaml Int´ egrer donn´ ees et applications: ¸ ca ne va pas de soi ! BD relationnelles Mod` ele de donn´ ees assez simple. Langage SQL: faiblement typ´ e. Int´ egration pauvre dans langages de programmation. (corollaires en terme de sˆ uret´ e, s´ ecurit´ e, . . . ) BD objets . . . ❈ Duce: un aper¸ Alain Frisch cu

  5. Aper¸ cu du langage XML ❈ Duce Fondements th´ eoriques Perspectives Interface avec OCaml Sp´ ecificit´ es de XML Notion de typage bien pr´ esente: DTD, XML Schema. Couplage « lˆ ache » entre documents et types. Les documents sont plus importants que les types ! Poids du pass´ e, choix techniques douteux. Le contenu d’un document est une notion mal d´ efinie :-( ❈ Duce: un aper¸ Alain Frisch cu

  6. Aper¸ cu du langage XML ❈ Duce Fondements th´ eoriques Perspectives Interface avec OCaml « The essence of XML: The problem it solves is not hard. It doesn’t solve it very well. » P. Wadler ( The Essence of XML - POPL 2003) ❈ Duce: un aper¸ Alain Frisch cu

  7. Aper¸ cu du langage XML ❈ Duce Fondements th´ eoriques Perspectives Interface avec OCaml D´ evelopper avec XML Niveau 0: repr´ esentation textuelle des documents XML AWK, sed, Perl Niveau 1: vue abstraite SAX, DOM Niveau 2: petits langages sp´ ecifiques pour XML, sans types XSLT, XPath Niveau 3: types XML pris avec s´ erieux Data-binding Nouveaux langages: XQuery, XDuce, CDuce, Xtatic, Xen. ❈ Duce: un aper¸ Alain Frisch cu

  8. Aper¸ cu du langage XML ❈ Duce Fondements th´ eoriques Perspectives Interface avec OCaml Data-binding Principe Utiliser les types d’un langage hˆ ote pour repr´ esenter les types XML. Avantage On reste dans le cadre d’un langage bien maˆ ıtris´ e. Probl` emes On perd la souplesse des types XML (expressions r´ eguli` eres). On se repose sur un syst` eme de types trop grossier. Probl` eme de robustesse: ´ evolution des sch´ emas XML. Impedance mismatch entre mod` ele XML et mod` ele OO. ❈ Duce: un aper¸ Alain Frisch cu

  9. Aper¸ cu du langage XML ❈ Duce Fondements th´ eoriques Perspectives Interface avec OCaml CDuce Langage: orient´ e XML ; centr´ e sur les types ; avec des caract´ eristiques g´ en´ eralistes ; (vaguement) efficace. ❈ Duce: un aper¸ Alain Frisch cu

  10. Aper¸ cu du langage XML ❈ Duce Fondements th´ eoriques Perspectives Interface avec OCaml CDuce Outil d’exp´ erimentation (valider la th´ eorie, essayer algorithmes, optimisations, . . . ). N´ eanmoins ` a peu pr` es utilisable (et utilis´ e). Sc´ enarios d’utilisation Petits “adaptateurs” entre applications XML. Applications plus grosses. Applications web, web services. Couche d’E/S XML pour des applications OCaml. ❈ Duce: un aper¸ Alain Frisch cu

  11. Aper¸ cu du langage XML ❈ Duce Fondements th´ eoriques Perspectives Interface avec OCaml Orient´ e XML, centr´ e sur les donn´ ees Litteraux XML dans la syntaxe. Fragments XML: citoyens de premi` ere classe, pas enfouis dans des objets. <program>[ <date day="monday">[ <invited>[ <title>[ ’Conservation of information’ ] <author>[ ’Thomas Knight, Jr.’ ] ] <talk>[ <title>[ ’Scripting the type-inference process’ ] <author>[ ’Bastiaan Heeren’ ] <author>[ ’Jurriaan Hage’ ] <author>[ ’Doaitse Swierstra’ ] ] ] ] ❈ Duce: un aper¸ Alain Frisch cu

  12. Aper¸ cu du langage XML ❈ Duce Fondements th´ eoriques Perspectives Interface avec OCaml Types Les types sont partout dans CDuce: Validation statique Ex.: est-ce que ¸ ca produit toujours du XHTML valide ? Semantique dirig´ ee par les types Dispatch dynamique Fonctions surcharg´ ees Compilation dirig´ ee par les types Optimisations rendues possibles par les types statiques ´ Evite des op´ erations inutiles/redondantes ` a l’ex´ ecution Autorise un style plus d´ eclaratif ❈ Duce: un aper¸ Alain Frisch cu

  13. Aper¸ cu du langage XML ❈ Duce Fondements th´ eoriques Perspectives Interface avec OCaml XML avec des types ⊢ v : t v == <program>[ <date day="monday">[ <invited>[ <title>[ ’Conservation of information’ ] <author>[ ’Thomas Knight, Jr.’ ] ] <talk>[ <title>[ ’Scripting the type-inference process’ ] <author>[ ’Bastiaan Heeren’ ] <author>[ ’Jurriaan Hage’ ] <author>[ ’Doaitse Swierstra’ ] ] ] ] t == <program>[ <date day="monday">[ <invited>[ <title>[ ’Conservation of information’ ] <author>[ ’Thomas Knight, Jr.’ ] ] <talk>[ <title>[ ’Scripting the type-inference process’ ] <author>[ ’Bastiaan Heeren’ ] <author>[ ’Jurriaan Hage’ ] <author>[ ’Doaitse Swierstra’ ] ] ] ] ❈ Duce: un aper¸ Alain Frisch cu

  14. Aper¸ cu du langage XML ❈ Duce Fondements th´ eoriques Perspectives Interface avec OCaml XML avec des types ⊢ v : t v == <program>[ <date day="monday">[ <invited>[ <title>[ ’Conservation of information’ ] <author>[ ’Thomas Knight, Jr.’ ] ] <talk>[ <title>[ ’Scripting the type-inference process’ ] <author>[ ’Bastiaan Heeren’ ] <author>[ ’Jurriaan Hage’ ] <author>[ ’Doaitse Swierstra’ ] ] ] ] t == <program>[ <date day=String>[ <invited>[ <title>[ PCDATA ] <author>[ PCDATA ] ] <talk>[ <title>[ PCDATA ] <author>[ PCDATA ] <author>[ PCDATA ] <author>[ PCDATA ] ] ] ] ❈ Duce: un aper¸ Alain Frisch cu

  15. Aper¸ cu du langage XML ❈ Duce Fondements th´ eoriques Perspectives Interface avec OCaml XML avec des types ⊢ v : t == v <program>[ <date day="monday">[ <invited>[ <title>[ ’Conservation of information’ ] <author>[ ’Thomas Knight, Jr.’ ] ] <talk>[ <title>[ ’Scripting the type-inference process’ ] <author>[ ’Bastiaan Heeren’ ] <author>[ ’Jurriaan Hage’ ] <author>[ ’Doaitse Swierstra’ ] ] ] ] t == <program>[ <date day=String>[ <invited>[ Title Author ] <talk>[ Title Author Author Author ] ] ] type Author = <author>[ PCDATA ] type Title = <title>[ PCDATA ] ❈ Duce: un aper¸ Alain Frisch cu

  16. Aper¸ cu du langage XML ❈ Duce Fondements th´ eoriques Perspectives Interface avec OCaml XML avec des types ⊢ v : t == v <program>[ <date day="monday">[ <invited>[ <title>[ ’Conservation of information’ ] <author>[ ’Thomas Knight, Jr.’ ] ] <talk>[ <title>[ ’Scripting the type-inference process’ ] <author>[ ’Bastiaan Heeren’ ] <author>[ ’Jurriaan Hage’ ] <author>[ ’Doaitse Swierstra’ ] ] ] ] t == <program>[ <date day=String>[ <invited>[ Title Author+ ] <talk>[ Title Author+ ] ] ] type Author = <author>[ PCDATA ] type Title = <title>[ PCDATA ] ❈ Duce: un aper¸ Alain Frisch cu

  17. Aper¸ cu du langage XML ❈ Duce Fondements th´ eoriques Perspectives Interface avec OCaml XML avec des types ⊢ v : t v == <program>[ <date day="monday">[ <invited>[ <title>[ ’Conservation of information’ ] <author>[ ’Thomas Knight, Jr.’ ] ] <talk>[ <title>[ ’Scripting the type-inference process’ ] <author>[ ’Bastiaan Heeren’ ] <author>[ ’Jurriaan Hage’ ] <author>[ ’Doaitse Swierstra’ ] ] ] ] == t Program type Program = <program>[ Day* ] type Day = <date day=String>[ Invited? Talk+ ] type Invited = <invited>[ Title Author+ ] type Talk = <talk>[ Title Author+ ] type Author = <author>[ PCDATA ] type Title = <title>[ PCDATA ] ❈ Duce: un aper¸ Alain Frisch cu

  18. Aper¸ cu du langage XML ❈ Duce Fondements th´ eoriques Perspectives Interface avec OCaml Filtrage Op´ eration de base du langage. Le syst` eme de type garantit l’exhaustivit´ e et inf` ere le type (exact) des variables de capture. D´ etection des branches/motifs inutilis´ es. ❈ Duce: un aper¸ Alain Frisch cu

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend