Commit 21b73086 authored by Pietro Abate's avatar Pietro Abate
Browse files

[r2002-12-11 16:02:01 by cvscast] Empty log message

Original author: cvscast
Date: 2002-12-11 16:02:02+00:00
parent c1107c56
......@@ -146,7 +146,7 @@ include depend
driver/examples.ml: cduce tests/web.cd tests/examples.xml
./cduce -quiet tests/web.cd
web/index.html: cduce
web/index.html: cduce web/macros.cd web/index.xml
(cd web; ../cduce -quiet macros.cd)
# Site-specific installation
......
......@@ -2,11 +2,12 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
<link rel="stylesheet" href="cduce.css" type="text/css"/>
<title>CDuce</title>
</head>
<body bgcolor="#BBDDFF">
<body>
<banner title="CDuce" subtitle="Page last modified on 2002-12-05"/>
<p/>
<box title="">
<ul>
<li><a href="#proto">Give it a try !</a></li>
......@@ -16,10 +17,11 @@
</ul>
</box>
<p/>
<box title="">
<p>
CDuce ("seduce") is a new typed functional language with innovative
features:
</p>
<ul>
<li>
......@@ -41,6 +43,7 @@ a powerful
<b>pattern matching</b> operation, with dynamic dispatch on types and recursive patterns.</li>
</ul>
<p>
Although CDuce is a general
programming language, it features several characteristics that make it
adapted to XML documents manipulation
......@@ -51,11 +54,13 @@ to describe tree-like documents (aka semi-structured data), and XML documents
often come with a description of their type. The type is expressed in a
system like DTD, or
<a href="http://www.w3.org/XML/Schema">XML Schema</a>.
</p>
<p/>
<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>
......@@ -74,19 +79,20 @@ to store and extract information efficiently).</li>
</ul>
</box>
<p/><a NAME="proto"/>
<box title="Give it a try!" subtitle="Online running prototype">
<box title="Give it a try!" subtitle="Online running prototype"
link="proto">
<p>
The only available implementation
of CDuce is an <a href="cgi-bin/cduce">online prototype</a>. To get a feeling
of CDuce, you can try the examples and play with them, or have a look at
this <a href="memento.html">memento</a> which briefly explains the
syntax
of the language.
</p>
</box>
<p/><a NAME="papers"></a>
<box title="Papers" subtitle="">
<font color="blue" size="+1"> Language Description</font>
<box title="Papers" subtitle="" link="papers">
<h4> Language Description</h4>
<ul>
<li>
<b>CDuce: a white paper</b>.
......@@ -96,9 +102,9 @@ A preliminary and abriged version of this work was presented at the workshop
Pittsburgh PA, Oct. 2002.
<a href="papers/cduce-wp.ps.gz">(download ps.gz)</a>
<p/>
<b>Abstract:</b><br/>
<small>
<div class="abstract">
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
......@@ -110,10 +116,11 @@ 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.
</small>
</p>
</div>
</li></ul>
<font color="blue" size="+1">Theoretical foundations</font>
<h4>Theoretical foundations</h4>
<ul>
<li>
......@@ -121,8 +128,10 @@ schemas.
A. Frisch, G. Castagna, V. Benzaken. In <i>LICS 2002</i>.
<a href="papers/lics02.ps.gz">(download ps.gz)</a>
<p/><b>Abstract:</b><br/>
<small>Usually subtyping
<div class="abstract">
Abstract:
<p>
Usually subtyping
relations are defined either syntactically by a formal system or semantically
by an interpretation of types in an untyped denotational model. In this
work we show how to define a subtyping relation semantically, for a language
......@@ -130,7 +139,10 @@ whose <i>operational</i> semantics is <i>driven by types</i>; we consider
a rich type algebra, with product, arrow, recursive, intersection, union
and complement types. Our approach is to "bootstrap" the subtyping relation
through a notion of set-theoretic model <i>of the type algebra</i>.
<p/>The advantages
</p>
<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
......@@ -141,11 +153,12 @@ 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.
</small>
</p>
</div>
</li>
<li>
<b>Semantic subtyping, extended
version</b>. Soon available.<p/></li>
version</b>. Soon available.</li>
<li>
<b>The Relevance of Semantic Subtyping</b>;
......@@ -154,16 +167,17 @@ In <i>Electronic Notes in Theoretical Computer Science 70 No.1 (2002)</i>.
<a href="papers/itrs02.ps.gz">(download ps.gz)</a>
<a href="papers/itrs02.pdf">(download pdf)</a>
<p/>
<b>Abstract:</b><br/>
<small>
<div class="abstract">
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+.
</small>
</p>
</div>
</li>
<li>
(In french) <b>Types récursifs,
......@@ -172,29 +186,37 @@ au typage de XML</b> (rapport de DEA); Alain Frisch.
<a href="papers/dea.ps.gz">
(download ps.gz)</a>
<p/><b>Resumé:</b><br/>
<small>Nous étudions
<div class="abstract">
Resumé:
<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/>Les caractéristiques
</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/>Nous utilisons
</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.
</small>
</p>
</div>
</li>
</ul>
</box>
<p/><a NAME="slides"></a>
<box title="Slides" subtitle="Language description">
<box title="Slides" link="slides">
<ul>
......@@ -225,8 +247,7 @@ Slides of the presentation given at FOSAD school (september 2002)
</ul>
</box>
<p/><a NAME="links"></a>
<box title="Related links">
<box title="Related links" link="links">
<ul>
<li>
<b>XDuce</b>
......@@ -243,11 +264,13 @@ Some hyperlinks minus the hype</a> by Philip Wadler.</li>
</box>
<p/>
<box title="">
<div class="meta">
<a href="mailto:Alain.Frisch@ens.fr">Mail the webmaster</a>
<br/>
<img src="img/cducepower2.jpg" alt="Powered by CDuce"/>
</box>
<img src="img/cducepower2.jpg"
alt="Powered by CDuce"/>
<img src="http://www.w3.org/Icons/valid-xhtml10"
alt="Valid XHTML 1.0!" height="31" width="88" />
</div>
</body>
</html>
......@@ -2,62 +2,25 @@ type XML_elem = <(_)>XML;;
type XML = [ (XML_elem | Char)* ];;
let fun banner (title : Any, subtitle : Any) : XML =
[<table border="0"; cellspacing="0"; cellpadding="2";
width="100%"; bgcolor="#000000">[
<tr>[
<td>[
<table border="0"; cellspacing="0"; cellpadding="2";
width="100%"; bgcolor="#FFFFFF">[
<tr>[
<td>[
!(match title with
| t & XML \ [] -> [<b>[<font color="red"; size="+3">
[<center>t]]]
| _ -> []
)
!(match subtitle with
| t & XML \ [] -> [<b>[<font size="-2">t]]
| _ -> []
)
]
]
]
]
]
[<div class="title">[
!(match title with t & XML \ [] -> [<h1>t] | _ -> [])
!(match subtitle with t & XML \ [] -> [<h3>t] | _ -> [])
]];;
let fun box (title : Any, subtitle : Any, content : XML) : XML =
[<table border="0"; cellspacing="0"; cellpadding="2";
width="100%"; bgcolor="#000000">[
<tr>[
<td>[
<table border="0"; cellspacing="0"; cellpadding="2";
width="100%"; bgcolor="#FFFFFF">[
<tr>[
<td>[
!(match title with
| t & XML \ [] -> [<b>[<font color="blue"; size="+2">t]<br>[]]
| _ -> []
)
!(match subtitle with
| t & XML \ [] -> [<b>[<font size="-2">t]]
| _ -> []
)
!(match content with
| [] -> []
| t & XML \ [] -> [ <p>content ]
)
]
]
]
]
]
let fun box (title : Any, subtitle : Any, name : Any, content : XML) : XML =
[<div class="box">[
!(match name with String \ [] -> [<a name=name>[]] | _ -> [])
!(match title with t & XML \ [] -> [<h2>t] | _ -> [])
!(match subtitle with t & XML \ [] -> [<h3>t] | _ -> [])
!content
]];;
let fun convert (XML_elem | Char | XML -> XML)
| <box ({ title=t } & ({ subtitle=st } | (st := `nil)))>x ->
box (t,st,convert x)
| <box ({ title=t }
& ({ subtitle=st } | (st := `nil))
& ({ link=name } | (name := `nil)) )>x ->
box (t,st,name,convert x)
| <banner ({ title=t } & ({ subtitle=st } | (st := `nil)))>x ->
banner (t,st)
| <(tag) (attr)>x -> [<(tag) (attr)>(convert x)]
......@@ -73,7 +36,9 @@ let src =
let conv : XML = convert src;;
let out : String =
[ '<!doctype html public "-//w3c//dtd html 4.0 transitional//en">' ]
[ '<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">' ]
@
(transform convert src with x -> print_xml x);;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment