| 15 |
<box> |
<box> |
| 16 |
<ul> |
<ul> |
| 17 |
<li><a href="/cgi-bin/cduce">Online demo</a></li> |
<li><a href="/cgi-bin/cduce">Online demo</a></li> |
| 18 |
|
<li><a href="papers.html">Technical papers and talks</a></li> |
| 19 |
<li><a href="team.html">CDuce team</a></li> |
<li><a href="team.html">CDuce team</a></li> |
| 20 |
<li><a href="plan.html">Site map</a></li> |
<li><a href="plan.html">Site map</a></li> |
| 21 |
<li><a href="bench.html">Site map</a></li> |
<li><a href="bench.html">Site map</a></li> |
| 25 |
<box> |
<box> |
| 26 |
|
|
| 27 |
<p> CDuce ("seduce") is a new typed functional language with |
<p> CDuce ("seduce") is a new typed functional language with |
| 28 |
innovative features: </p> |
innovative features.</p> |
|
|
|
|
<ul> |
|
|
<li> a rich <b>type algebra</b>, with recursive types and arbitrary |
|
|
boolean combinations (union, intersection, complement); </li> |
|
|
<li> a natural notion of <b>subtyping</b>, which allows to use a value |
|
|
of a given type where a value of a supertype is expected; </li> |
|
|
<li> <b>overloaded functions</b> with late binding (dynamic dispatch); |
|
|
</li> |
|
|
<li> a powerful <b>pattern matching</b> operation, with dynamic |
|
|
dispatch ontypes and recursive patterns. </li> |
|
|
</ul> |
|
|
|
|
| 29 |
|
|
| 30 |
<p> Although CDuce is a general programming language, it features |
<p> Although CDuce is a general programming language, it features |
| 31 |
several characteristics that make it adapted to XML documents |
several characteristics that make it adapted to XML documents |
| 35 |
describe tree-like documents (aka semi-structured data), and XML |
describe tree-like documents (aka semi-structured data), and XML |
| 36 |
documents often come with a description of their type. The type is |
documents often come with a description of their type. The type is |
| 37 |
expressed in a system like DTD, or |
expressed in a system like DTD, or |
| 38 |
<a href="http://www.w3.org/XML/Schema">XML Schema</a>. </p> |
<a href="http://www.w3.org/XML/Schema">XML Schema</a>. |
| 39 |
|
XML types play a central role in CDuce. |
|
<p> Our point of view and our guideline for the design of CDuce is |
|
|
that a programming language for XML should take XML types into account |
|
|
to allow: </p> |
|
|
|
|
|
<ul> |
|
|
<li> <b>static verifications</b> of properties for the applications |
|
|
(for instance, ensuring that a transformation produces a document of |
|
|
the expected type);</li> |
|
|
<li> good <b>integration in a general purpose typed programming |
|
|
language</b>;</li> |
|
|
<li> static <b>optimizations</b> of applications and storage (knowing |
|
|
the type of a document seems important to store and extract |
|
|
information efficiently).</li> |
|
|
</ul> |
|
|
</box> |
|
|
|
|
|
<box> |
|
|
<p> <b>CDuce</b> is developped by the |
|
|
<a href="http://www.di.ens.fr/~castagna/EQUIPE"><b>Languages</b></a> |
|
|
group of ENS in Paris and the |
|
|
<a href="http://www.lri.fr/bd"><b>Databases</b></a> group of LRI in |
|
|
Orsay, two <a href="http://www.cnrs.fr">CNRS</a> labs. |
|
| 40 |
</p> |
</p> |
| 41 |
|
|
| 42 |
</box> |
</box> |
| 43 |
|
|
| 44 |
<box> |
<box> |
| 45 |
<p> This page was automatically generated from an XML description of |
<p> This site was automatically generated from an XML description of |
| 46 |
the content by a CDuce program. |
the content by a CDuce program. |
| 47 |
<img src="img/cducepower2.jpg" alt="Powered by CDuce"/></p> |
<img src="img/cducepower2.jpg" alt="Powered by CDuce"/></p> |
| 48 |
</box> |
</box> |
| 56 |
|
|
| 57 |
<main> |
<main> |
| 58 |
|
|
| 59 |
<box title="Give it a try!" link="proto"> |
<box title="What is CDuce ?" link="whatis"> |
| 60 |
|
|
| 61 |
|
<p> <b>CDuce</b> is modern programming language, adapted to the |
| 62 |
|
manipulation of XML documents. It is developped by the <a |
| 63 |
|
href="http://www.di.ens.fr/~castagna/EQUIPE"><b>Languages</b></a> |
| 64 |
|
group of ENS in Paris and the <a |
| 65 |
|
href="http://www.lri.fr/bd"><b>Databases</b></a> group of LRI in |
| 66 |
|
Orsay, two <a href="http://www.cnrs.fr">CNRS</a> labs. |
| 67 |
|
See also the <a href="team.html">CDuce team</a> page, |
| 68 |
|
and our <a href="papers.html">technical papers</a>. |
| 69 |
|
</p> |
| 70 |
|
|
| 71 |
<section title="Online running prototype"> |
<section title="Online running prototype"> |
| 72 |
<p> The only available implementation of CDuce is an <a |
<p> The only available implementation of CDuce is an <a |
| 74 |
you can try the examples and play with them, or have a look at this <a |
you can try the examples and play with them, or have a look at this <a |
| 75 |
href="memento.html">memento</a> which briefly explains the syntax of |
href="memento.html">memento</a> which briefly explains the syntax of |
| 76 |
the language. </p> |
the language. </p> |
|
</section> |
|
| 77 |
|
|
| 78 |
|
<p>We are planning to distribute a first public release in the next |
| 79 |
|
few weeks.</p> |
| 80 |
|
</section> |
| 81 |
</box> |
</box> |
| 82 |
|
|
| 83 |
<box title="Papers" link="papers"> |
<box title="Design and features" link="whatis"> |
| 84 |
<section title="Language Description"> |
<p> Our point of view and our guideline for the design of CDuce is |
| 85 |
<ul> |
that a programming language for XML should take XML types ( |
| 86 |
|
DTD, XML Schema, Relax-NG, ...) seriously. We expect the following |
| 87 |
<li> |
benefits:</p> |
| 88 |
<paper file="papers/cduce-wp.ps.gz"> |
|
| 89 |
<title>CDuce: a white paper</title> |
<ul> |
| 90 |
<author>V. Benzaken</author> |
<li> <b>static verifications</b> |
| 91 |
<author>G. Castagna</author> |
(e.g.: ensure that a transformation produces a valid document);</li> |
| 92 |
<author>A. Frisch</author> |
<li> in particular, we aim at <b>smooth and safe</b> compositions |
| 93 |
<comment> |
of XML transformations, and incremental programming;</li> |
| 94 |
A preliminary and abriged version of this work was presented at the workshop |
<li> static <b>optimizations</b> and <b>efficient execution model</b> |
| 95 |
<i>PLAN-X: Programming Language Technologies for XML</i> |
(knowing the type of a document is crucial to extract information |
| 96 |
Pittsburgh PA, Oct. 2002. |
efficiently).</li> |
|
</comment> |
|
|
|
|
|
<abstract> <p> In this paper, we present the functional language CDuce, |
|
|
discuss some design issues, and show its adequacy for working with |
|
|
XML documents. Peculiar features of CDuce are a powerful pattern |
|
|
matching, first class functions, overloaded functions, a very rich |
|
|
type system (arrows, sequences, pairs, records, intersections, |
|
|
unions, differences), precise type inference and a natural |
|
|
interpretation of types as sets of values. We also discuss how to add |
|
|
constructs for programming XML queries in a declarative (and, thus, |
|
|
optimizable) way and finally sketch a dispatch algorithm to |
|
|
demonstrate how static type information can be used in efficient |
|
|
compilation schemas. </p> </abstract> |
|
|
</paper> |
|
|
</li> |
|
| 97 |
</ul> |
</ul> |
|
</section> |
|
| 98 |
|
|
| 99 |
<section title="Theoretical foundations"> |
<p> |
| 100 |
|
Some of CDuce peculiar features: |
| 101 |
|
</p> |
| 102 |
<ul> |
<ul> |
| 103 |
|
<li> XML objects can be manipulated as first-class citizen values: |
| 104 |
<li> |
elements, sequences, tags, characters and strings, attribute |
| 105 |
<paper file="papers/lics02.ps.gz"> |
sets; sequences of XML elements can be specified by |
| 106 |
<title>Semantic subtyping</title> |
<b>regular expressions</b>, which also apply to |
| 107 |
<author>A. Frisch</author> |
characters strings; </li> |
| 108 |
<author>G. Castagna</author> |
<li> functions themselves are <b>first-class</b> values, they |
| 109 |
<author>V. Benzaken</author> |
can be manipulated, stored in data structure, returned by |
| 110 |
<comment> In <i>LICS 2002</i>. </comment> |
a function,...</li> |
| 111 |
|
<li> a powerful <b>pattern matching</b> operation can perform |
| 112 |
<abstract> <p> Usually subtyping relations are defined either |
complex extractions from sequences of XML elements; </li> |
| 113 |
syntactically by a formal system or semantically by an interpretation |
<li> a rich <b>type algebra</b>, with recursive types and arbitrary |
| 114 |
of types in an untyped denotational model. In this work we show how |
boolean combinations (union, intersection, complement) allows |
| 115 |
to define a subtyping relation semantically, for a language whose |
precise definitions of data structures and XML types; |
| 116 |
<i>operational</i> semantics is <i>driven by types</i>; we consider a |
<b>general purpose types</b> and types constructors are taken seriously |
| 117 |
rich type algebra, with product, arrow, recursive, intersection, |
(products, extensible records, arbitrary precision integers with interval |
| 118 |
union and complement types. Our approach is to "bootstrap" the |
constraints, Unicode characters);</li> |
| 119 |
subtyping relation through a notion of set-theoretic model <i>of the |
<li> <b>polymorphism</b> through a natural notion of <b>subtyping</b>, |
| 120 |
type algebra</i>. </p> |
and <b>overloaded functions</b> with dynamic dispatch; </li> |
| 121 |
|
<li> an highly-effective <b>type-driven compilation schema</b>. </li> |
|
<p> The advantages of the semantic approach are manifold. Foremost we |
|
|
get "for free" many properties (e.g., the transitivity of subtyping) |
|
|
that, with axiomatized subtyping, would require tedious and error |
|
|
prone proofs. Equally important is that the semantic approach allows |
|
|
one to <i>derive</i> complete algorithms for the subtyping relation |
|
|
or the propagation of types through patterns. As the subtyping |
|
|
relation has a natural (inasmuch as semantic) interpretation, the |
|
|
type system can give informative error messages when static |
|
|
type-checking fails. Last but not least the approach has an immediate |
|
|
impact in the definition <i>and the implementation</i> of languages |
|
|
manipulating XML documents, as this was our original motivation. |
|
|
</p> </abstract> |
|
|
</paper> |
|
|
</li> |
|
|
|
|
|
<li> |
|
|
<paper file="papers/itrs02.ps.gz"> |
|
|
<title>The Relevance of Semantic Subtyping</title> |
|
|
<author>M. Dezani-Ciancaglini</author> |
|
|
<author>A. Frisch</author> |
|
|
<author>E. Giovannetti</author> |
|
|
<author>Y. Motohama</author> |
|
|
<comment> |
|
|
In <i>Electronic Notes in Theoretical Computer Science 70 No.1 (2002)</i>. |
|
|
</comment> |
|
|
|
|
|
<abstract> <p> We compare Meyer and Routley's minimal relevant logic |
|
|
B+ with the recent semantics-based approach to subtyping introduced |
|
|
by Frisch, Castagna and Benzaken in the definition of a type system |
|
|
with intersection and union. We show that - for the functional core |
|
|
of the system - such notion of subtyping, which is defined in purely |
|
|
set-theoretical terms, coincides with the relevant entailment of the |
|
|
logic B+. </p> </abstract> |
|
|
</paper> |
|
|
</li> |
|
|
|
|
|
<li> |
|
|
<paper file="papers/dea.ps.gz"> |
|
|
<title>Types récursifs, combinaisons booléennes et fonctions |
|
|
surchargées: application au typage de XML</title> |
|
|
<author>A. Frisch</author> |
|
|
<comment>In french. Mémoire du DEA « Programmation: Sémantique, |
|
|
Preuves et Langages » (Paris VII) </comment> |
|
|
|
|
|
<abstract> <p> Nous étudions un lambda-calcul typé avec une opération |
|
|
de filtrage qui permet d'exprimer des fonctions |
|
|
surchargées. L'algèbre de types a des types de base, les types |
|
|
produit et flèche, les types récursifs, les combinaisons booléennes |
|
|
finies arbitraires. Nous considérons une notion de sous-typage |
|
|
sémantique, issue de l'interprétation des types comme ensembles de |
|
|
valeurs du langage. </p> |
|
|
|
|
|
<p> Les caractéristiques présentes dans le calcul et l'algèbre de |
|
|
types sont motivées par l'utilisation du calcul comme un noyau pour |
|
|
un langage adapté à la manipulation de documents XML. </p> |
|
|
|
|
|
<p> Nous utilisons une approche sémantique pour étudier l'algèbre de |
|
|
types, tout en conservant une preuve syntaxique de préservation du |
|
|
typage par réduction. </p> </abstract> |
|
|
</paper> |
|
|
</li> |
|
| 122 |
</ul> |
</ul> |
|
</section> |
|
| 123 |
|
|
| 124 |
<section title="Security"> |
<p> |
| 125 |
|
<a href="bench.html">Preliminary benchmarks</a> suggest that a CDuce |
| 126 |
|
program can run faster (30% to 60%) than an equivalent XSLT |
| 127 |
|
style-sheet (we performed benchmarks with |
| 128 |
|
the xsltproc tools from the Gnome libxslt library). |
| 129 |
|
</p> |
| 130 |
|
</box> |
| 131 |
|
|
| 132 |
|
<box title="Research directions" link="research"> |
| 133 |
|
|
| 134 |
|
<p>Our plans concerning the design of the core language |
| 135 |
|
include:</p> |
| 136 |
<ul> |
<ul> |
| 137 |
<li> |
<li>a module system to support incremental programming;</li> |
| 138 |
<paper file="papers/sec.ps.gz"> |
<li>parametric polymorphism;</li> |
| 139 |
<title>Security analysis for XML transformations</title> |
<li>XML-friendly primitives, to mimic XSLT transformations.</li> |
|
<author>M. Burelle</author> |
|
|
<author>V. Benzaken</author> |
|
|
<author>G. Castagna</author> |
|
|
<comment> <a href="http://www.myths.eu.org">MyThS</a> technical |
|
|
report. </comment> |
|
|
|
|
|
<abstract> <p> In this article we give a formal definition of |
|
|
information flows in the context of XML transformations and, more |
|
|
generally, in the presence of type dependent computations. We |
|
|
formalize a sound technique to detect XML document transformations |
|
|
that may leak private or confidential information. By defining |
|
|
security annotations and by relating various kind of analyses to |
|
|
different query scenarios, we also establish a general framework for |
|
|
checking middleware-located information flows. </p> </abstract> |
|
|
</paper> |
|
|
</li> |
|
| 140 |
</ul> |
</ul> |
|
</section> |
|
| 141 |
|
|
| 142 |
</box> |
<p> |
| 143 |
|
Apart from the core language design and implementation, |
| 144 |
|
our research projects include: |
| 145 |
|
</p> |
| 146 |
|
<ul> |
| 147 |
|
<li> integration of a <b>query sub-language</b> into CDuce, using |
| 148 |
|
types as a primary optimization strategy for request evaluation;</li> |
| 149 |
|
<li> study of <b>security</b> (confidentiality, ...) properties in the |
| 150 |
|
setting of XML transformations.</li> |
| 151 |
|
</ul> |
| 152 |
|
|
| 153 |
|
<p> |
| 154 |
|
We wrote several <a href="papers.html">technical papers</a> about |
| 155 |
|
the language design and its theoretical foundations. |
| 156 |
|
</p> |
| 157 |
|
</box> |
| 158 |
|
|
| 159 |
<box title="Slides" link="slides"> |
<box title="XDuce and CDuce" link="xduce"> |
| 160 |
<ul> |
<p> |
| 161 |
|
|
| 162 |
<li> |
The starting point of our work on CDuce was the |
| 163 |
<slides file="slides/lri02.pdf"> |
<a href="http://xduce.sourceforge.net/">XDuce</a> language developped |
| 164 |
<title>Semantic Subtyping</title> |
at the UPenn DB group. Many of CDuce features originate from XDuce. |
| 165 |
<author>A. Frisch</author> |
Some of our achievements: |
|
<author>G. Castagna</author> |
|
|
<author>V. Benzaken</author> |
|
|
<comment>Slides of a presentation given at LRI Database Group (2002-12)</comment> |
|
|
</slides> |
|
|
</li> |
|
|
|
|
|
<li> |
|
|
<slides file="slides/planx2002.pdf.gz"> |
|
|
<title>CDuce: a white paper</title> |
|
|
<author>V. Benzaken</author> |
|
|
<author>G. Castagna</author> |
|
|
<author>A. Frisch</author> |
|
|
<comment>Slides of the presentation given at the PLANX 2002 Workshop |
|
|
in Pittsburgh (2002-09)</comment> |
|
|
</slides> |
|
|
</li> |
|
|
|
|
|
<li> |
|
|
<slides |
|
|
file="ftp://ftp.ens.fr/pub/di/users/castagna/SLIDES/cduce-wp-slides.pdf.gz"> |
|
|
<title>CDuce: a white paper</title> |
|
|
<author>V. Benzaken</author> |
|
|
<author>G. Castagna</author> |
|
|
<author>A. Frisch</author> |
|
|
<comment>Slides of the presentation given at MyThS meeting in |
|
|
Bertinoro (2002-12) </comment> |
|
|
</slides> |
|
|
</li> |
|
|
|
|
|
<li> |
|
|
<slides file="ftp://ftp.ens.fr/pub/di/users/castagna/SLIDES/cduce-sec.ps.gz"> |
|
|
<title>CDuce: document security</title> |
|
|
<author>V. Benzaken</author> |
|
|
<author>M. Burelle</author> |
|
|
<author>G. Castagna</author> |
|
|
<comment>Slides of the presentation given at FOSAD school (september |
|
|
2002) </comment> |
|
|
</slides> |
|
|
</li> |
|
| 166 |
|
|
| 167 |
</ul> |
</p> |
| 168 |
|
<ul> |
| 169 |
|
<li>integration of first-class and overloaded functions, arbitrary boolean |
| 170 |
|
connectives, and extensible (or not) records, to the semantic |
| 171 |
|
definition of subtyping;</li> |
| 172 |
|
<li>a subtyping algorithm without backtracking;</li> |
| 173 |
|
<li>extending pattern matching to capture non consecutive |
| 174 |
|
subsequences; removing tail condition for exact matching |
| 175 |
|
(they arrived independently to another solution);</li> |
| 176 |
|
<li>efficient evaluation model that takes profit of static type information;</li> |
| 177 |
|
</ul> |
| 178 |
|
<p> |
| 179 |
|
Of course, the work on XDuce continued during our, and they |
| 180 |
|
developped nice ideas: mixed attribute-element types (same |
| 181 |
|
expressive power as our records, but they can sometimes avoid exponential |
| 182 |
|
explosion where we cannot); powerful filter operation. |
| 183 |
|
</p> |
| 184 |
</box> |
</box> |
| 185 |
|
|
| 186 |
<box title="Related links" link="links"> |
<box title="Related links" link="links"> |
| 187 |
<ul> |
<ul> |
|
|
|
|
<li> <link url="http://xduce.sourceforge.net/" title="XDuce"> The |
|
|
starting point of our work on semantic subtyping and CDuce was XDuce. |
|
|
CDuce extends XDuce with first-class and late-bound overloaded |
|
|
functions, and generalizes the boolean connectives (explicit union, |
|
|
intersection, negation types). </link> </li> |
|
|
|
|
| 188 |
<li> <link url="http://www.research.avayalabs.com/user/wadler/xml/" |
<li> <link url="http://www.research.avayalabs.com/user/wadler/xml/" |
| 189 |
title="XML: Some hyperlinks minus the hype"> By Philip Wadler. </link> |
title="XML: Some hyperlinks minus the hype"> By Philip Wadler. </link> |
| 190 |
</li> </ul> </box> |
</li> </ul> </box> |