XDuce 0.5.0

XDuce ("transduce") is a typed programming language that is specifically designed for processing XML data.
XDuce ("transduce") is a typed programming language that is specifically designed for processing XML data. One can read an XML document as an XDuce value, extract information from it or convert it to another format, and write out the result value as an XML document. Since XDuce is statically typed, XDuce programs never yield run-time type errors and the resulting XML documents always conform specified types.

Here are some key features of "XDuce":

XDuce features regular expression types, which are similar in spirit to Document Type Definitions (DTD).
XDuce provides a powerful notion of subtyping. (It allows any subtyping relation that you may expect from your intuition on inclusion relation of regular expressions.) It not only gives substantial flexibility in programming, but also is useful for schema evolution or integration.
XDuce supports regular expression pattern matching , which combines if-expressions, tag-checks, and extraction of subnodes.

What's New in This Release:

Added a support for parametric polymorphism.
Types can contain type variables written "ty X", e.g.,

type AList = entry[key[String], data[ty X]]*

and type substitution form written "T{{ X -> U }}" to mean the substitution of U for X in T, e.g.,

AList{{X -> Bib}}

Functions can be polymorphic, e.g.,

fun search {{X}} (val data as a[ty X]) : b[ty X] = ...

where type parameters can be declared and parameter types and the result type can mention type parameters.
An application to polymorphic functions does not need type arguments. They are inferred automatically.
A type variable can be associated with its constraint like "ty X as T". Then, a bare type variable "ty X" abbreviates "ty X as AnyElm". Built-in functions can also be polymorphic:

extern f : { X } a[ty X] -> b[ty X]

Type variables can be ranged over by one-element types, so this is an error:

fun wrong {{X}} (val x as a[ty X as (a[],b[] )]) : Any = x

Marking-ambiguous type parameters yield a warning, e.g.,

fun ambig {{X}} (val x as (a[ty X],c[] | a[b[]],ty X)) : Any = x

Patterns cannot mention type variables:

fun wrong {{X}} (val x as a[ty X]) : Any =
filter x {
(val y as a[ty X]) { y }

A substituting type cannot mention a recursive type name:

type Wrong = AList{{X -> Wrong}}

last updated on:
January 2nd, 2008, 9:20 GMT
developed by:
XDuce Team
license type:
GPL (GNU General Public License) 
ROOT \ Programming \ Interpreters


In a hurry? Add it to your Download Basket!

user rating 13



Add your review!