Code Organization
This figure represents the general architecture of the compiler with its all intermediate languages and the different compilation paths. The languages are:
- NRALambda: NRA with Lambdas
- SQL: Structured Query Language
- OQL: Object Query Language
- CAMP: Calculus of Aggregating Matching Patterns
- Rule: Rule Macros for CAMP
- NRA: Nested Relational Algebra
- NRAe: NRA with Environments
- cNRAEnv: Core NRAEnv
- NNRC: Named Nested Relational Calculus
- cNNRC: Core NNRC
- DNNRC: Distributed NNRC
- tDNNRC: Typed DNNRC
- NNRCMR: NNRC + Map/Reduce
- CldMR: NNRC + Cloudant Map/Reduce
The general organization of the source code available in Q*cert is the following:
bin
: directory where binaries are installedcamp-java
: CAMP AST in Javacoq
: the Coq source code of the compilerjavaService
: code to integrate Java frontends into web demos and the qcert command linejrules2CAMP
: Java code allowing the integration of the ODM jar fileslib
: directory where libraries are installedocaml
: OCaml code of the command line compilerruntime
: runtime library for the different backendssamples
: examples of queriesscripts
: utility scriptssqlParser
: SQL parsersqlppParser
: SQL++ parserwww
: JavaScript interface of the compiler
In the coq
directory, each language has its own
directory with a subdirectory Lang
containing the AST
and the definition of the semantics of the language. Then, depending
on the language, some additional subdirectory can be present. For
example, it is possible to find a Optim
subdirectory
containing the optimizer for the language, or a typing
subdirectory containing the type checker. The
directory Basic
directory contains some the data-model
which is shared between all languages. This directory also contains
some utility functions. The directory Translation
contains all the translation functions that compiles a language into
another. Finally, the directory compiler
contains the
compiler driver.