LEESA is a new way of writing traversals over typed object structures, such as XML documents and domain-specific
models. LEESA (Language for Embedded quEry and traverSAl) is a domain-specific embedded language (DSEL) in C++
LEESA is embedded in C++ using sophisticated generic and meta programming
techniques. LEESA's toolchain supports the following XML data-binding
See the comparison of XML traversal code in driver.cxx
with and without LEESA. This program uses
- Provides a succinct and expressive notation for writing object structure
- Supports hierarchical visitors, decouples traversals from visitation actions, and improves visitor and traversal reusability.
- Provides C++ template-based combinators to write tree traversals in a strategic programming style.
- Supports XPath-like axis-oriented notation including structure-shyness (e.g., descendant-axis and wildcards).
- Reports any type related errors in the query at compile-time.
- Significantly reduces the development cost of programs operating on complex object structures
(e.g., XML document traversal, domain-specific modeling language (DSML) interpreters) compared to
the traditional techniques.
Typed XML programming
Typed XML programing
identifies the lack of fidelity in contemporary X-to-O mapping (XML data
binding) tools towards supporting XML
semantics and programming patterns & practices native to the XML domain. LEESA, however,
recognizes the practical usefulness of these mappings and attempts to improve the extraction of typed
data by incorporating the idioms of XML querying (think XPath axes, wildcards) without losing the
grip on types. In that sense it supports typed XML programming and alleviates the disappointment of
a XML programmer in the typed world. See some examples.
Toward Native XML Processing Using Multi-paradigm Design in C++ in the
5th Annual Boost Conference (BoostCon-2011) (slides)
- LEESA: Embedding Strategic and XPath-like Object
Structure Traversals in C++ published in the IFIP Working Conference on Domain Specific Languages
(DSL WC), 2009, Oxford UK
- An Embedded Declarative Language for Hierarchical
Object Structure Traversal published in the 2nd International Workshop on Domain-Specific Program Development
(DSPD), GPCE 2008, Nashville, Tennessee, October 22, 2008
There are two ways to obtain LEESA.
- Download LEESA.zip
(The latest and greatest changes may not be available)
- Use subversion (svn) to checkout LEESA from repository. You may need to install a subversion client.
Sliksvn is a good svn client. The command to checkout
LEESA sources, documentation, and tests is given below:
svn co svn://svn.dre.vanderbilt.edu/LEESA/trunk/LEESA LEESA
Processing Using Strongly-Typed XPath-like Queries in C++ from Sumant Tambe on Vimeo.
Sumant Tambe (sutambe at dre d0t vanderbilt d0t edu)