AQL.grm

// FILE. . . . . /home/hak/hlt/src/hlt/language/jaccapps/aql/sources/AQL.grm
// EDIT BY . . . Hassan Ait-Kaci
// ON MACHINE. . Hp-Dv7
// STARTED ON. . Wed Oct 17 20:53:56 2012



Author:  Hassan Aït-Kaci
Copyright:  © by the author
Version:  Last modified on Wed Jan 30 12:24:24 2013 by hak



%package hlt.aql;

/* ************************************************************************************* */
/* **************************** AQL  GRAMMAR  SPECIFICATION  *************************** */
/* ************************************************************************************* */



This grammar defines a fully-working Algebraic Query Language (AQL) prototype expressed using the hlt.language.design language design package. It includes a full polymorphic type-checker, an intermediate code compiler, and runtime system.

AQL's Jacc and Java source documentation are given here. AQL's purely syntactic grammar in yacc format is given here.

The AQL languague uses a surface syntax for an interactive query language based on:

  • Leonidas Fegaras and David Maier, "Optimizing object queries using an effective calculus," ACM Transactions on Database Systems 25(4), 457-516, 2000 (available on line).

    or, as well, on:

  • Tortsten Grust. Monad Comprehensions. A Versatile Representation for Queries, in P.M.D. Gray, L. Kerschberg, P.J.H. King, A. Poulovassilis (eds.), The Functional Approach to Data Management - Modeling, Analyzing and Integrating Heterogeneous Data, Springer Verlag, ISBN 3-540-00375-4, September 2003 (available on line).
That is, our prototype AQL v0.00 is a functional language augmented with a calculus of compehensions à la Fegaras-Maier, or à la Grust. In other words, it is a complete query language, powerful enough to express most of [ODMG] OQL, and thus many of its derivatives such as, e.g., XQuery, (see also here for an overview), XPath, (see also here for a tutorial), etc., ...

This version of AQL can be run both interactively and in batch mode. In the former case, a user can define top-level constructs and evaluate expressions. AQL v0.00 supports 2nd-order (ML-like) type polymorphism, automatic currying, associative arrays, multiple type overloading, dynamic operator overloading, as well as (polymorphic) type definition (both aliasing and hiding), classes and objects, and (of course) monoid homomorphisms and comprehensions (N.B.: no subtyping nor inheritance yet - but this is next on my agenda...).



/* ************************************************************************************* */
/* ************************************ DECLARATIONS *********************************** */
/* ************************************************************************************* */

%include declarations.grm

/* ************************************************************************************* */
/* ************************************ ANCILLARIES ************************************ */
/* ************************************************************************************* */

%include ancillary.grm

/* ************************************************************************************* */
/* ************************************ NODE CLASSES *********************************** */
/* ************************************************************************************* */

%include nodeclasses.grm

/* ************************************************************************************* */
/* *************************************   RULES   ************************************* */
/* ************************************************************************************* */

%include rules.grm

/* ************************************************************************************* */
/* ************************************* UTILITIES ************************************* */
/* ************************************************************************************* */

class Utilities
  {
    static final void popList (ArrayList list)
      {
	if (list != null && !list.isEmpty())
	  list.remove(list.size()-1);
      }
  }

/* ************************************************************************************* */
/* *********************************  END  OF  GRAMMAR  ******************************** */
/* ************************************************************************************* */


This file was generated on Wed Jan 30 13:24:30 CET 2013 from file AQL.grm
by the hlt.language.tools.Hilite Java tool written by Hassan Aït-Kaci