Commits

Kirill Simonov  committed 96925f8

Updated copyright notice.

  • Participants
  • Parent commits a5b138e

Comments (0)

Files changed (213)

-Copyright (c) 2006-2011 Prometheus Research, LLC.
+Copyright (c) 2006-2012, Prometheus Research, LLC.
 All rights reserved.
 
 This software is released through a "BSD" style license for use with
 #
-# Copyright (c) 2006-2011, Prometheus Research, LLC
+# Copyright (c) 2006-2012, Prometheus Research, LLC
 # See `LICENSE` for license information, `AUTHORS` for the list of authors.
 #
 
 
 # General information about the project.
 project = u'HTSQL'
-copyright = (u'2006-2011 Prometheus Reserch, LLC;'
+copyright = (u'2006-2012, Prometheus Reserch, LLC;'
              ' written by Clark C. Evans and Kirill Simonov')
 
 # The version info for the project you're documenting, acts as replacement for
 # (source start file, target name, title, author, documentclass [howto/manual]).
 latex_documents = [
   ('index', 'HTSQL.tex', u'HTSQL Documentation',
-    u'2006-2011 Prometheus Reserch, LLC', 'manual'),
+    u'2006-2012, Prometheus Reserch, LLC', 'manual'),
 ]
 
 # The name of an image file (relative to this directory) to place at the top of
 #
-# Copyright (c) 2006-2011, Prometheus Research, LLC
+# Copyright (c) 2006-2012, Prometheus Research, LLC
 # See `LICENSE` for license information, `AUTHORS` for the list of authors.
 #
 

File src/htsql/__init__.py

 #
-# Copyright (c) 2006-2011, Prometheus Research, LLC
+# Copyright (c) 2006-2012, Prometheus Research, LLC
 # See `LICENSE` for license information, `AUTHORS` for the list of authors.
 #
 
 :mod:`htsql`
 ============
 
-:copyright: 2006-2011, Prometheus Research, LLC
+:copyright: 2006-2012, Prometheus Research, LLC
 :authors: Clark C. Evans <cce@clarkevans.com>,
           Kirill Simonov <xi@resolvent.net>;
           see ``AUTHORS`` file in the source distribution

File src/htsql/core/__init__.py

 #
-# Copyright (c) 2006-2011, Prometheus Research, LLC
+# Copyright (c) 2006-2012, Prometheus Research, LLC
 # See `LICENSE` for license information, `AUTHORS` for the list of authors.
 #
 

File src/htsql/core/adapter.py

 #
-# Copyright (c) 2006-2011, Prometheus Research, LLC
+# Copyright (c) 2006-2012, Prometheus Research, LLC
 # See `LICENSE` for license information, `AUTHORS` for the list of authors.
 #
 
 
 """
-:mod:`htsql.adapter`
-====================
+:mod:`htsql.core.adapter`
+=========================
 
 This module provides a mechanism for pluggable extensions.
 """

File src/htsql/core/addon.py

 #
-# Copyright (c) 2006-2011, Prometheus Research, LLC
+# Copyright (c) 2006-2012, Prometheus Research, LLC
 # See `LICENSE` for license information, `AUTHORS` for the list of authors.
 #
 
 
 """
-:mod:`htsql.addon`
-==================
+:mod:`htsql.core.addon`
+=======================
 
 This module declares HTSQL addons.
 """

File src/htsql/core/application.py

 #
-# Copyright (c) 2006-2011, Prometheus Research, LLC
+# Copyright (c) 2006-2012, Prometheus Research, LLC
 # See `LICENSE` for license information, `AUTHORS` for the list of authors.
 #
 
 
 """
-:mod:`htsql.application`
-========================
+:mod:`htsql.core.application`
+=============================
 
 This module implements an HTSQL application.
 """

File src/htsql/core/cache.py

 #
-# Copyright (c) 2006-2011, Prometheus Research, LLC
+# Copyright (c) 2006-2012, Prometheus Research, LLC
 # See `LICENSE` for license information, `AUTHORS` for the list of authors.
 #
 

File src/htsql/core/classify.py

 #
-# Copyright (c) 2006-2011, Prometheus Research, LLC
+# Copyright (c) 2006-2012, Prometheus Research, LLC
 # See `LICENSE` for license information, `AUTHORS` for the list of authors.
 #
 

File src/htsql/core/cmd/__init__.py

 #
-# Copyright (c) 2006-2011, Prometheus Research, LLC
+# Copyright (c) 2006-2012, Prometheus Research, LLC
 # See `LICENSE` for license information, `AUTHORS` for the list of authors.
 #
 
 
 """
-:mod:`htsql.cmd`
-================
+:mod:`htsql.core.cmd`
+=====================
 
 This package implements commands and actions.
 """

File src/htsql/core/cmd/act.py

 #
-# Copyright (c) 2006-2011, Prometheus Research, LLC
+# Copyright (c) 2006-2012, Prometheus Research, LLC
 # See `LICENSE` for license information, `AUTHORS` for the list of authors.
 #
 

File src/htsql/core/cmd/command.py

 #
-# Copyright (c) 2006-2011, Prometheus Research, LLC
+# Copyright (c) 2006-2012, Prometheus Research, LLC
 # See `LICENSE` for license information, `AUTHORS` for the list of authors.
 #
 

File src/htsql/core/cmd/retrieve.py

 #
-# Copyright (c) 2006-2011, Prometheus Research, LLC
+# Copyright (c) 2006-2012, Prometheus Research, LLC
 # See `LICENSE` for license information, `AUTHORS` for the list of authors.
 #
 

File src/htsql/core/connect.py

 #
-# Copyright (c) 2006-2011, Prometheus Research, LLC
+# Copyright (c) 2006-2012, Prometheus Research, LLC
 # See `LICENSE` for license information, `AUTHORS` for the list of authors.
 #
 
 
 """
-:mod:`htsql.connect`
-====================
+:mod:`htsql.core.connect`
+=========================
 
 This module declares the database connection adapter.
 """

File src/htsql/core/context.py

 #
-# Copyright (c) 2006-2011, Prometheus Research, LLC
+# Copyright (c) 2006-2012, Prometheus Research, LLC
 # See `LICENSE` for license information, `AUTHORS` for the list of authors.
 #
 
 
 """
-:mod:`htsql.context`
-====================
+:mod:`htsql.core.context`
+=========================
 
 This module keeps the active HTSQL application in a thread-local variable.
 

File src/htsql/core/domain.py

 #
-# Copyright (c) 2006-2011, Prometheus Research, LLC
+# Copyright (c) 2006-2012, Prometheus Research, LLC
 # See `LICENSE` for license information, `AUTHORS` for the list of authors.
 #
 
 
 """
-:mod:`htsql.domain`
-===================
+:mod:`htsql.core.domain`
+========================
 
 This module defines HTSQL domains.
 """
     family = 'tuple'
 
     # FIXME: add a reference to the underlying `TableEntity`.  This may
-    # require importing `TableEntity` from `htsql.entity`, which creates
+    # require importing `TableEntity` from `htsql.core.entity`, which creates
     # a circular module dependency.  To break it, we will have to split
-    # `htsql.domain` into two modules: `htsql.type`, containing `Domain`
+    # `htsql.core.domain` into two modules: `htsql.core.type`, containing `Domain`
     # and all its subclasses representing real database types, and
-    # `htsql.domain`, which imports all types from `htsql.type` and
+    # `htsql.core.domain`, which imports all types from `htsql.core.type` and
     # adds special domains like `VoidDomain`, `TupleDomain` and
     # `UntypedDomain`.
 

File src/htsql/core/entity.py

 #
-# Copyright (c) 2006-2011, Prometheus Research, LLC
+# Copyright (c) 2006-2012, Prometheus Research, LLC
 # See `LICENSE` for license information, `AUTHORS` for the list of authors.
 #
 
 
 """
-:mod:`htsql.entity`
-===================
+:mod:`htsql.core.entity`
+========================
 
 This module implements the HTSQL catalog and catalog entities.
 """

File src/htsql/core/error.py

 #
-# Copyright (c) 2006-2011, Prometheus Research, LLC
+# Copyright (c) 2006-2012, Prometheus Research, LLC
 # See `LICENSE` for license information, `AUTHORS` for the list of authors.
 #
 
 
 """
-:mod:`htsql.error`
-==================
+:mod:`htsql.core.error`
+=======================
 
 This module implements generic HTSQL exceptions.
 """

File src/htsql/core/fmt/__init__.py

 #
-# Copyright (c) 2006-2011, Prometheus Research, LLC
+# Copyright (c) 2006-2012, Prometheus Research, LLC
 # See `LICENSE` for license information, `AUTHORS` for the list of authors.
 #
 
 
 """
-:mod:`htsql.fmt`
-================
+:mod:`htsql.core.fmt`
+=====================
 
 This package implements product formatters.
 """

File src/htsql/core/fmt/entitle.py

 #
-# Copyright (c) 2006-2011, Prometheus Research, LLC
+# Copyright (c) 2006-2012, Prometheus Research, LLC
 # See `LICENSE` for license information, `AUTHORS` for the list of authors.
 #
 
 
 """
-:mod:`htsql.fmt.entitle`
-========================
+:mod:`htsql.core.fmt.entitle`
+=============================
 
 This module implements the entitle adapter.
 """

File src/htsql/core/fmt/format.py

 #
-# Copyright (c) 2006-2011, Prometheus Research, LLC
+# Copyright (c) 2006-2012, Prometheus Research, LLC
 # See `LICENSE` for license information, `AUTHORS` for the list of authors.
 #
 
 
 """
-:mod:`htsql.fmt.format`
-=======================
+:mod:`htsql.core.fmt.format`
+============================
 
 This module implements the format adapter.
 """

File src/htsql/core/fmt/html.py

 #
-# Copyright (c) 2006-2011, Prometheus Research, LLC
+# Copyright (c) 2006-2012, Prometheus Research, LLC
 # See `LICENSE` for license information, `AUTHORS` for the list of authors.
 #
 
 
 """
-:mod:`htsql.fmt.html`
-=====================
+:mod:`htsql.core.fmt.html`
+==========================
 
 This module implements the HTML renderer.
 """

File src/htsql/core/fmt/json.py

 #
-# Copyright (c) 2006-2011, Prometheus Research, LLC
+# Copyright (c) 2006-2012, Prometheus Research, LLC
 # See `LICENSE` for license information, `AUTHORS` for the list of authors.
 #
 
 
 """
-:mod:`htsql.fmt.json`
-=====================
+:mod:`htsql.core.fmt.json`
+==========================
 
 This module implements the JSON renderer.
 """

File src/htsql/core/fmt/spreadsheet.py

 #
-# Copyright (c) 2006-2011, Prometheus Research, LLC
+# Copyright (c) 2006-2012, Prometheus Research, LLC
 # See `LICENSE` for license information, `AUTHORS` for the list of authors.
 #
 
 
 """
-:mod:`htsql.fmt.spreadsheet`
-============================
+:mod:`htsql.core.fmt.spreadsheet`
+=================================
 
 This module implements the CSV and TSV renderers.
 """

File src/htsql/core/fmt/text.py

 #
-# Copyright (c) 2006-2011, Prometheus Research, LLC
+# Copyright (c) 2006-2012, Prometheus Research, LLC
 # See `LICENSE` for license information, `AUTHORS` for the list of authors.
 #
 
 
 """
-:mod:`htsql.fmt.text`
-=====================
+:mod:`htsql.core.fmt.text`
+==========================
 
 This module implements the plain text renderer.
 """

File src/htsql/core/introspect.py

 #
-# Copyright (c) 2006-2011, Prometheus Research, LLC
+# Copyright (c) 2006-2012, Prometheus Research, LLC
 # See `LICENSE` for license information, `AUTHORS` for the list of authors.
 #
 
 
 """
-:mod:`htsql.introspect`
-=======================
+:mod:`htsql.core.introspect`
+============================
 
 This module declares the database introspector adapter.
 """

File src/htsql/core/mark.py

 #
-# Copyright (c) 2006-2011, Prometheus Research, LLC
+# Copyright (c) 2006-2012, Prometheus Research, LLC
 # See `LICENSE` for license information, `AUTHORS` for the list of authors.
 #
 
 
 """
-:mod:`htsql.mark`
-=================
+:mod:`htsql.core.mark`
+======================
 
 This module implements a :class:`Mark` object.
 """

File src/htsql/core/model.py

 #
-# Copyright (c) 2006-2011, Prometheus Research, LLC
+# Copyright (c) 2006-2012, Prometheus Research, LLC
 # See `LICENSE` for license information, `AUTHORS` for the list of authors.
 #
 

File src/htsql/core/split_sql.py

 #
-# Copyright (c) 2006-2011, Prometheus Research, LLC
+# Copyright (c) 2006-2012, Prometheus Research, LLC
 # See `LICENSE` for license information, `AUTHORS` for the list of authors.
 #
 
 
 """
-:mod:`htsql.split_sql`
-======================
+:mod:`htsql.core.split_sql`
+===========================
 
 This module declares the SQL splitter adapter.
 """

File src/htsql/core/tr/__init__.py

 #
-# Copyright (c) 2006-2011, Prometheus Research, LLC
+# Copyright (c) 2006-2012, Prometheus Research, LLC
 # See `LICENSE` for license information, `AUTHORS` for the list of authors.
 #
 
 
 """
-:mod:`htsql.tr`
-===============
+:mod:`htsql.core.tr`
+====================
 
 .. epigraph::
 

File src/htsql/core/tr/assemble.py

 #
-# Copyright (c) 2006-2011, Prometheus Research, LLC
+# Copyright (c) 2006-2012, Prometheus Research, LLC
 # See `LICENSE` for license information, `AUTHORS` for the list of authors.
 #
 
 
 """
-:mod:`htsql.tr.assemble`
-========================
+:mod:`htsql.core.tr.assemble`
+=============================
 
 This module implements the assembling process.
 """
     are equal if their units, brokers, and targets are equal to each
     other.
 
-    `unit` (:class:`htsql.tr.flow.Unit`)
+    `unit` (:class:`htsql.core.tr.flow.Unit`)
         The exported unit.
 
     `broker` (an integer)
         The `dispatches` table is used when generating unit claims
         to determine the broker term by the target term.
 
-        See also the `offsprings` attribute of :class:`htsql.tr.term.Term`.
+        See also the `offsprings` attribute of :class:`htsql.core.tr.term.Term`.
 
     `routes` (a dictionary `Unit | Flow -> tag`)
         Maps a unit to a term capable of evaluating the unit.
         The `routes` table is used when generating unit claims
         to determine the target term by the unit.
 
-        A key of the `routes` table is either a :class:`htsql.tr.flow.Unit`
-        node or a :class:`htsql.tr.flow.Flow` node.  The latter indicates
+        A key of the `routes` table is either a :class:`htsql.core.tr.flow.Unit`
+        node or a :class:`htsql.core.tr.flow.Flow` node.  The latter indicates
         that the corresponding term is capable of exporting any primitive
         unit from the given flow.
 
-        See also the `routes` attribute of :class:`htsql.tr.term.Term`.
+        See also the `routes` attribute of :class:`htsql.core.tr.term.Term`.
 
     Note that `dispatches` and `routes` come from `offsprings` and `routes`
-    attributes of :class:`htsql.tr.term.Term`.  However they do not have to
+    attributes of :class:`htsql.core.tr.term.Term`.  However they do not have to
     come from the same term!  Typically, `dispatches` comes from the term
     which is currently translated to a frame, and `routes` comes either
     from the same term or from one of its direct children.
         Satisfied claims.
 
         A key of the mapping is a :class:`Claim` object.  A value of the
-        mapping is a :class:`htsql.tr.frame.ExportPhrase` object.
+        mapping is a :class:`htsql.core.tr.frame.ExportPhrase` object.
     """
 
     def __init__(self):
 
         This method must be called before assembling any frames.
 
-        `term` (:class:`htsql.tr.term.SegmentTerm`)
+        `term` (:class:`htsql.core.tr.term.SegmentTerm`)
             The term corresponding to the top-level ``SELECT`` statement.
         """
         assert isinstance(term, SegmentTerm)
             constructed frame, this flag is used to determine whether
             the exported values are nullable or not.
 
-        `dispatcher` (:class:`htsql.tr.term.Term` or ``None``)
+        `dispatcher` (:class:`htsql.core.tr.term.Term` or ``None``)
             Specifies the dispatcher term.
 
             If ``None``, keeps the current dispatcher.
             Typically, the dispatcher term is the one currently
             translated to a frame node.
 
-        `router` (:class:`htsql.tr.term.Term` or ``None``)
+        `router` (:class:`htsql.core.tr.term.Term` or ``None``)
             Specifies the router term.
 
             If ``None``, uses `dispatcher` as the router term.
         """
         Assembles a frame node for the given term.
 
-        `term` (:class:`htsql.tr.term.Term`)
+        `term` (:class:`htsql.core.tr.term.Term`)
             A term node.
         """
         # Realize and call the `Assemble` adapter.
         capable of evaluating the unit and returns the corresponding
         :class:`Claim` object.
 
-        `unit` (:class:`htsql.tr.flow.Unit`)
+        `unit` (:class:`htsql.core.tr.flow.Unit`)
             The unit to make a claim for.
         """
         # To make a claim, we need to find two terms:
         """
         Appoints and assigns claims for all units of the given code.
 
-        `code` (:class:`htsql.tr.flow.Code`)
+        `code` (:class:`htsql.core.tr.flow.Code`)
             A code object to schedule.
 
-        `dispatcher` (:class:`htsql.tr.term.Term` or ``None``)
+        `dispatcher` (:class:`htsql.core.tr.term.Term` or ``None``)
             Specifies the dispatcher to use when appointing units.
 
             If ``None``, keeps the current dispatcher.
 
-        `router` (:class:`htsql.tr.term.Term` or ``None``)
+        `router` (:class:`htsql.core.tr.term.Term` or ``None``)
             Specifies the router to use when appointing units.
 
             If ``None``, uses `dispacher` as the router term;
         """
         Evaluates the given code node.
 
-        Returns the corresponding :class:`htsql.tr.frame.Phrase` node.
+        Returns the corresponding :class:`htsql.core.tr.frame.Phrase` node.
 
         It is assumed that the code node was previously scheduled
         with :meth:`schedule` and all the claims were satisfied.
 
-        `code` (:class:`htsql.tr.flow.Code`)
+        `code` (:class:`htsql.core.tr.flow.Code`)
             The code node to evaluate.
 
-        `dispatcher` (:class:`htsql.tr.term.Term` or ``None``)
+        `dispatcher` (:class:`htsql.core.tr.term.Term` or ``None``)
             Specifies the dispatcher to use when appointing units.
 
             If ``None``, keeps the current dispatcher.
 
-        `router` (:class:`htsql.tr.term.Term` or ``None``)
+        `router` (:class:`htsql.core.tr.term.Term` or ``None``)
             Specifies the router to use when appointing units.
 
             If ``None`` uses `dispacher` as the router term;
         `claim` (:class:`Claim`)
             The claim to satisfy.
 
-        `phrase` (:class:`htsql.tr.frame.Phrase`)
+        `phrase` (:class:`htsql.core.tr.frame.Phrase`)
             The phrase that satisfies the claim.
         """
         # A few sanity checks.  Verify that the claim was actually requested.
 
     The adapter is polymorphic on the `Term` argument.
 
-    `term` (:class:`htsql.tr.term.Term`)
+    `term` (:class:`htsql.core.tr.term.Term`)
         A term node.
 
     `state` (:class:`AssemblingState`)
     Assembles a frame for a proper term node.
 
     This adapts :class:`Assemble` for proper term nodes (i.e., not a
-    :class:`htsql.tr.term.QueryTerm`).
+    :class:`htsql.core.tr.term.QueryTerm`).
 
     Attributes:
 
 
     The adapter is polymorphic on the `Code` argument.
 
-    `code` (:class:`htsql.tr.flow.Code`)
+    `code` (:class:`htsql.core.tr.flow.Code`)
         The code node to translate.
 
     `state` (:class:`AssemblingState`)
     Evaluates a formula node.
 
     This is an auxiliary adapter used to evaluate
-    :class:`htsql.tr.flow.FormulaCode` nodes.  The adapter is polymorphic
+    :class:`htsql.core.tr.flow.FormulaCode` nodes.  The adapter is polymorphic
     on the formula signature.
 
     Unless overridden, the adapter evaluates the arguments of the formula
     and generates a new formula phrase with the same signature.
 
-    `code` (:class:`htsql.tr.flow.FormulaCode`)
+    `code` (:class:`htsql.core.tr.flow.FormulaCode`)
         The formula node to evaluate.
 
     `state` (:class:`AssemblingState`)
 
     Aliases:
 
-    `signature` (:class:`htsql.tr.signature.Signature`)
+    `signature` (:class:`htsql.core.tr.signature.Signature`)
         The signature of the formula.
 
-    `domain` (:class:`htsql.tr.domain.Domain`)
+    `domain` (:class:`htsql.core.tr.domain.Domain`)
         The co-domain of the formula.
 
-    `arguments` (:class:`htsql.tr.signature.Bag`)
+    `arguments` (:class:`htsql.core.tr.signature.Bag`)
         The arguments of the formula.
     """
 
     """
     Compiles a new frame node for the given term.
 
-    Returns a :class:`htsql.tr.frame.Frame` instance.
+    Returns a :class:`htsql.core.tr.frame.Frame` instance.
 
-    `term` (:class:`htsql.tr.term.Term`)
+    `term` (:class:`htsql.core.tr.term.Term`)
         A term node.
 
     `state` (:class:`AssemblingState` or ``None``)

File src/htsql/core/tr/bind.py

 #
-# Copyright (c) 2006-2011, Prometheus Research, LLC
+# Copyright (c) 2006-2012, Prometheus Research, LLC
 # See `LICENSE` for license information, `AUTHORS` for the list of authors.
 #
 
 
 """
-:mod:`htsql.tr.bind`
-====================
+:mod:`htsql.core.tr.bind`
+=========================
 
 This module implements the binding process.
 """
 
     State attributes:
 
-    `root` (:class:`htsql.tr.binding.RootBinding`)
+    `root` (:class:`htsql.core.tr.binding.RootBinding`)
         The root naming scope.
 
-    `scope` (:class:`htsql.tr.binding.Binding`)
+    `scope` (:class:`htsql.core.tr.binding.Binding`)
         The current naming scope.
     """
 
         This function initializes the lookup context stack and must be
         called before any calls of :meth:`push_scope` and :meth:`pop_scope`.
 
-        `root` (:class:`htsql.tr.binding.RootBinding`)
+        `root` (:class:`htsql.core.tr.binding.RootBinding`)
             The root lookup scope.
         """
         # Check that the lookup stack is not initialized.
         attribute to get the current scope; :meth:`pop_scope` to restore
         the previous scope.
 
-        `scope` (:class:`htsql.tr.binding.Binding`)
+        `scope` (:class:`htsql.core.tr.binding.Binding`)
             The new lookup scope.
         """
         # Sanity check on the argument.
 
         Returns a binding node.
 
-        `syntax` (:class:`htsql.tr.syntax.Syntax`)
+        `syntax` (:class:`htsql.core.tr.syntax.Syntax`)
             The syntax node to bind.
 
-        `scope` (:class:`htsql.tr.binding.Binding` or ``None``)
+        `scope` (:class:`htsql.core.tr.binding.Binding` or ``None``)
             If set, the lookup scope is set to `scope` when
             binding the syntax node.
         """
 
         Returns a binding node.
 
-        `recipe` (:class:`htsql.tr.binding.Recipe`)
+        `recipe` (:class:`htsql.core.tr.binding.Recipe`)
             The recipe to apply.
 
-        `syntax` (:class:`htsql.tr.syntax.Syntax`)
+        `syntax` (:class:`htsql.core.tr.syntax.Syntax`)
             The syntax node associated with the recipe.
 
-        `scope` (:class:`htsql.tr.binding.Binding` or ``None``)
+        `scope` (:class:`htsql.core.tr.binding.Binding` or ``None``)
             If set, the lookup scope is set to `scope` when
             binding the syntax node.
         """
 
         Returns a binding node.
 
-        `syntax` (:class:`htsql.tr.syntax.Syntax`)
+        `syntax` (:class:`htsql.core.tr.syntax.Syntax`)
             The syntax node to bind.
 
-        `scope` (:class:`htsql.tr.binding.Binding` or ``None``)
+        `scope` (:class:`htsql.core.tr.binding.Binding` or ``None``)
             If set, the lookup context is set to `scope` when
             binding the syntax node.
         """
 
     The adapter is polymorphic on the `Syntax` argument.
 
-    `syntax` (:class:`htsql.tr.syntax.Syntax`)
+    `syntax` (:class:`htsql.core.tr.syntax.Syntax`)
         The syntax node to bind.
 
     `state` (:class:`BindingState`)
         # The name and the number of arguments of the call node.
         key_name, key_arity = dispatch_key
         # We want to compare names case insensitive.  Unfortunately,
-        # we cannot use `normalize` from `htsql.tr.lookup` since it
+        # we cannot use `normalize` from `htsql.core.tr.lookup` since it
         # mangles symbols.
         key_name = key_name.lower()
 
 
     The adapter is polymorphic by the first argument.
 
-    `recipe` (:class:`htsql.tr.binding.Recipe`)
+    `recipe` (:class:`htsql.core.tr.binding.Recipe`)
         A recipe to apply.
 
-    `syntax` (:class:`htsql.tr.syntax.Syntax`)
+    `syntax` (:class:`htsql.core.tr.syntax.Syntax`)
         The syntax node associated with the recipe.
 
     `state` (:class:`BindingState`)
     """
     Binds the given syntax node.
 
-    `syntax` (:class:`htsql.tr.syntax.Syntax`)
+    `syntax` (:class:`htsql.core.tr.syntax.Syntax`)
         The syntax node to bind.
 
     `state` (:class:`BindingState` or ``None``).
         The binding state to use.  If not set, a new binding state
         is created.
 
-    `scope` (:class:`htsql.tr.binding.Binding` or ``None``)
+    `scope` (:class:`htsql.core.tr.binding.Binding` or ``None``)
         If specified, updates the lookup scope when binding
         the node.
     """

File src/htsql/core/tr/binding.py

 #
-# Copyright (c) 2006-2011, Prometheus Research, LLC
+# Copyright (c) 2006-2012, Prometheus Research, LLC
 # See `LICENSE` for license information, `AUTHORS` for the list of authors.
 #
 
 
 """
-:mod:`htsql.tr.binding`
-=======================
+:mod:`htsql.core.tr.binding`
+============================
 
 This module declares binding nodes and recipe objects.
 """
         The value of ``None`` is only valid for an instance of
         :class:`RootBinding`, which represents the origin node in the graph.
 
-    `domain` (:class:`htsql.domain.Domain`)
-        The type of the binding node; use :class:`htsql.domain.VoidDomain`
+    `domain` (:class:`htsql.core.domain.Domain`)
+        The type of the binding node; use :class:`htsql.core.domain.VoidDomain`
         instance when not applicable.
 
-    `syntax` (:class:`htsql.tr.syntax.Syntax`)
+    `syntax` (:class:`htsql.core.tr.syntax.Syntax`)
         The syntax node that generated the binding node; should be used
         for presentation or error reporting only, there is no guarantee
         that that the syntax node is semantically, or even syntaxically
 
     Other attributes:
 
-    `mark` (:class:`htsql.mark.Mark`)
+    `mark` (:class:`htsql.core.mark.Mark`)
         The location of the node in the original query (for error reporting).
     """
 
     A table scope contains all attributes of the tables as well
     as the links to other tables related via foreign key constraints.
 
-    `table` (:class:`htsql.entity.TableEntity`)
+    `table` (:class:`htsql.core.entity.TableEntity`)
         The table with which the binding is associated.
     """
 
 
     An attached table binding is generated by a link from another table.
 
-    `join` (:class:`htsql.entity.Join`)
+    `join` (:class:`htsql.core.entity.Join`)
         The join attaching the table to its base.
     """
 
     """
     Represents a table column scope.
 
-    `column` (:class:`htsql.entity.ColumnEntity`)
+    `column` (:class:`htsql.core.entity.ColumnEntity`)
         The column entity.
 
     `link` (:class:`Binding` or ``None``)
     """
     Represents a type conversion operation.
 
-    `domain` (:class:`htsql.domain.Domain`)
+    `domain` (:class:`htsql.core.domain.Domain`)
         The target domain.
     """
 
         Each parameter is represented by a pair of the parameter name
         and a flag indicating whether the name is a reference.
 
-    `body` (:class:`htsql.tr.syntax.Syntax`)
+    `body` (:class:`htsql.core.tr.syntax.Syntax`)
         The body of the assignment.
     """
 
     `value` (valid type depends on the domain)
         The value.
 
-    `domain` (:class:`htsql.domain.Domain`)
+    `domain` (:class:`htsql.core.domain.Domain`)
         The value type.
     """
 
     A formula binding represents a function or an operator call as
     as a binding node.
 
-    `signature` (:class:`htsql.tr.signature.Signature`)
+    `signature` (:class:`htsql.core.tr.signature.Signature`)
         The signature of the formula.
 
     `domain` (:class:`Domain`)
     """
     Generates a :class:`FreeTableBinding` node.
 
-    `table` (:class:`htsql.entity.TableEntity`)
+    `table` (:class:`htsql.core.entity.TableEntity`)
         The table associated with the binding.
     """
 
     """
     Generates a chain of :class:`AttachedTableBinding` nodes.
 
-    `joins` (a list of :class:`htsql.entity.Join`)
+    `joins` (a list of :class:`htsql.core.entity.Join`)
         The joins to attach the nodes.
 
     `origin_table`
     """
     Generates a :class:`ColumnBinding` node.
 
-    `column` (:class:`htsql.entity.ColumnEntity`)
+    `column` (:class:`htsql.core.entity.ColumnEntity`)
         The column entity.
 
     `link` (:class:`Recipe` or ``None``)
         parameter name and a flag indicating whether the parameter is a
         reference.
 
-    `body` (:class:`htsql.tr.syntax.Syntax`)
+    `body` (:class:`htsql.core.tr.syntax.Syntax`)
         The body of the calculation.
     """
 

File src/htsql/core/tr/coerce.py

 #
-# Copyright (c) 2006-2011, Prometheus Research, LLC
+# Copyright (c) 2006-2012, Prometheus Research, LLC
 # See `LICENSE` for license information, `AUTHORS` for the list of authors.
 #
 
 
 """
-:mod:`htsql.tr.coerce`
-======================
+:mod:`htsql.core.tr.coerce`
+===========================
 
 This module implements the unary and binary coerce adapters.
 """
     """
     Reduces a list of domains to a single common domain.
 
-    `domains` (a list of :class:`htsql.domain.Domain`)
+    `domains` (a list of :class:`htsql.core.domain.Domain`)
         List of domains.
 
     Returns the most specialized domain covering the given domains;

File src/htsql/core/tr/compile.py

 #
-# Copyright (c) 2006-2011, Prometheus Research, LLC
+# Copyright (c) 2006-2012, Prometheus Research, LLC
 # See `LICENSE` for license information, `AUTHORS` for the list of authors.
 #
 
 
 """
-:mod:`htsql.tr.compile`
-=======================
+:mod:`htsql.core.tr.compile`
+============================
 
 This module implements the compiling process.
 """
 
     State attributes:
 
-    `root` (:class:`htsql.tr.flow.RootFlow`)
+    `root` (:class:`htsql.core.tr.flow.RootFlow`)
         The root flow.
 
-    `baseline` (:class:`htsql.tr.flow.Flow`)
+    `baseline` (:class:`htsql.core.tr.flow.Flow`)
         When compiling a new term, indicates the leftmost axis that must
         exported by the term.  Note that the baseline flow is always
         inflated.
         This function must be called before state attributes `root`,
         `baseline` and `mask` could be used.
 
-        `flow` (:class:`htsql.tr.flow.RootFlow`)
+        `flow` (:class:`htsql.core.tr.flow.RootFlow`)
             A root scalar flow.
         """
         assert isinstance(flow, RootFlow)
         This function masks the current baseline flow.  To restore
         the previous baseline flow, use :meth:`pop_baseline`.
 
-        `baseline` (:class:`htsql.tr.flow.Flow`)
+        `baseline` (:class:`htsql.core.tr.flow.Flow`)
             The new baseline flow.  Note that the baseline flow
             must be inflated.
         """
         """
         Compiles a new term node for the given expression.
 
-        `expression` (:class:`htsql.tr.flow.Expression`)
+        `expression` (:class:`htsql.core.tr.flow.Expression`)
             An expression node.
 
-        `baseline` (:class:`htsql.tr.flow.Flow` or ``None``)
+        `baseline` (:class:`htsql.core.tr.flow.Flow` or ``None``)
             The baseline flow.  Specifies an axis flow that the compiled
             term must export.  If not set, the current baseline flow of
             the state is used.
         we claim that a term could export an expression if it exports
         all the units of the expression.
 
-        `term` (:class:`htsql.tr.term.Term`)
+        `term` (:class:`htsql.core.tr.term.Term`)
             A term node.
 
-        `expressions` (a list of :class:`htsql.tr.flow.Expression`)
+        `expressions` (a list of :class:`htsql.core.tr.flow.Expression`)
             A list of expressions to inject into the given term.
         """
         assert isinstance(term, Term)
         The compiled term is called *a shoot term* (relatively to
         the given *trunk term*).
 
-        `flow` (:class:`htsql.tr.flow.Flow`)
+        `flow` (:class:`htsql.core.tr.flow.Flow`)
             A flow node, for which the we compile a term.
 
-        `trunk` (:class:`htsql.tr.flow.Flow` or :class:`htsql.tr.term.Term`)
+        `trunk` (:class:`htsql.core.tr.flow.Flow` or :class:`htsql.core.tr.term.Term`)
            Expresses a promise that the compiled term will be
            (eventually) joined to a term corresponding to the
-           `trunk` flow.  If `trunk` is a :class:`htsql.tr.term.Term`
+           `trunk` flow.  If `trunk` is a :class:`htsql.core.tr.term.Term`
            instance, use the term flow.
 
-        `codes` (a list of :class:`htsql.tr.flow.Expression` or ``None``)
+        `codes` (a list of :class:`htsql.core.tr.flow.Expression` or ``None``)
            If provided, a list of expressions to be injected
            into the compiled term.
         """
 
         The given flow nodes specify the shape of two term nodes:
         the trunk term and the shoot term.  The function returns
-        a list of :class:`htsql.tr.term.Joint` objects that could
+        a list of :class:`htsql.core.tr.term.Joint` objects that could
         be used to attach the shoot term to the trunk term without
         changing the cardinality of the latter.
 
-        `flow` (:class:`htsql.tr.flow.Flow`)
+        `flow` (:class:`htsql.core.tr.flow.Flow`)
             The flow of the trunk term.
 
-        `baseline` (:class:`htsql.tr.flow.Flow`)
+        `baseline` (:class:`htsql.core.tr.flow.Flow`)
             The baseline of the trunk term.
 
-        `shoot` (:class:`htsql.tr.flow.Flow`)
+        `shoot` (:class:`htsql.core.tr.flow.Flow`)
             The flow of the shoot term.
 
-        `shoot_baseline` (:class:`htsql.tr.flow.Flow`)
+        `shoot_baseline` (:class:`htsql.core.tr.flow.Flow`)
             The baseline of the shoot term.
         """
         # Sanity check on the arguments.
         """
         Returns joints to attach the shoot term to the trunk term.
 
-        `trunk_term` (:class:`htsql.tr.term.Term`)
+        `trunk_term` (:class:`htsql.core.tr.term.Term`)
             The left (trunk) operand of the join.
 
-        `shoot_term` (:class:`htsql.tr.term.Term`)
+        `shoot_term` (:class:`htsql.core.tr.term.Term`)
             The right (shoot) operand of the join.
 
         Note that the trunk term may not export all the units necessary
         Augments the term to ensure it can export all units required
         to generate join conditions.
 
-        `term` (:class:`htsql.tr.term.Term`)
+        `term` (:class:`htsql.core.tr.term.Term`)
             The term to update.
 
             It is assumed that `term` was the argument `trunk_term` of
             :meth:`glue_terms` when the joints were generated.
 
-        `joints` (a list of :class:`htsql.tr.term.Joint`)
+        `joints` (a list of :class:`htsql.core.tr.term.Joint`)
             The joints to inject.
 
             It is assumed the ties were generated by :meth:`glue_terms`.
         table of the trunk term, but also includes the given
         extra routes.
 
-        `trunk_term` (:class:`htsql.tr.term.Term`)
+        `trunk_term` (:class:`htsql.core.tr.term.Term`)
             The left (trunk) operand of the join.
 
-        `shoot_term` (:class:`htsql.tr.term.Term`)
+        `shoot_term` (:class:`htsql.core.tr.term.Term`)
             The right (shoot) operand of the term.
 
             The shoot term must be singular relatively to the trunk term.
 
     The adapter is polymorphic on the `Expression` argument.
 
-    `expression` (:class:`htsql.tr.flow.Expression`)
+    `expression` (:class:`htsql.core.tr.flow.Expression`)
         An expression node.
 
     `state` (:class:`CompilingState`)
 
     The adapter is polymorphic on the `Expression` argument.
 
-    `expression` (:class:`htsql.tr.flow.Expression`)
+    `expression` (:class:`htsql.core.tr.flow.Expression`)
         An expression node to inject.
 
-    `term` (:class:`htsql.tr.term.Term`)
+    `term` (:class:`htsql.core.tr.term.Term`)
         A term node to inject into.
 
     `state` (:class:`CompilingState`)
 
     Constructor arguments:
 
-    `flow` (:class:`htsql.tr.flow.Flow`)
+    `flow` (:class:`htsql.core.tr.flow.Flow`)
         A flow node.
 
     `state` (:class:`CompilingState`)
 
     Other attributes:
 
-    `backbone` (:class:`htsql.tr.flow.Flow`)
+    `backbone` (:class:`htsql.core.tr.flow.Flow`)
         The inflation of the given flow.
 
-    `baseline` (:class:`htsql.tr.flow.Flow`)
+    `baseline` (:class:`htsql.core.tr.flow.Flow`)
         An alias to `state.baseline`.
     """
 
     """
     Compiles a new term node for the given expression.
 
-    Returns a :class:`htsql.tr.term.Term` instance.
+    Returns a :class:`htsql.core.tr.term.Term` instance.
 
-    `expression` (:class:`htsql.tr.flow.Expression`)
+    `expression` (:class:`htsql.core.tr.flow.Expression`)
         An expression node.
 
     `state` (:class:`CompilingState` or ``None``)
         The compiling state to use.  If not set, a new compiling state
         is instantiated.
 
-    `baseline` (:class:`htsql.tr.flow.Flow` or ``None``)
+    `baseline` (:class:`htsql.core.tr.flow.Flow` or ``None``)
         The baseline flow.  Specifies an axis that the compiled
         term must export.  If not set, the current baseline flow of
         the state is used.

File src/htsql/core/tr/dump.py

 #
-# Copyright (c) 2006-2011, Prometheus Research, LLC
+# Copyright (c) 2006-2012, Prometheus Research, LLC
 # See `LICENSE` for license information, `AUTHORS` for the list of authors.
 #
 
 
 """
-:mod:`htsql.tr.dump`
-====================
+:mod:`htsql.core.tr.dump`
+=========================
 
 This module implements the SQL serialization process.
 """
     `stream` (:class:`Stream`)
         A file-like object accumulating the generated SQL statement.
 
-    `frame_by_tag` (a mapping: integer -> :class:`htsql.tr.frame.Frame`)
+    `frame_by_tag` (a mapping: integer -> :class:`htsql.core.tr.frame.Frame`)
         Maps the frame tag to the respective frame.
 
     `select_aliases_by_tag` (a mapping: integer -> a list of aliases)
 
         This method must be called before dumping any clauses.
 
-        `frame` (:class:`htsql.tr.frame.SegmentFrame`)
+        `frame` (:class:`htsql.core.tr.frame.SegmentFrame`)
             The term corresponding to the top-level ``SELECT`` statement.
         """
         assert isinstance(frame, SegmentFrame)
         """
         Serializes the given clause.
 
-        `clause` (:class:`htsql.tr.frame.Clause`)
+        `clause` (:class:`htsql.core.tr.frame.Clause`)
             The clause to serialize.
         """
         # Realize and call the `Serialize` adapter.
         """
         Writes SQL for the given clause.
 
-        `clause` (:class:`htsql.tr.frame.Clause`)
+        `clause` (:class:`htsql.core.tr.frame.Clause`)
             The clause to dump.
         """
         # Realize and call the `Dump` adapter.
         """
         Generates a preform alias for the given clause.
 
-        `clause` (:class:`htsql.tr.frame.Clause`)
+        `clause` (:class:`htsql.core.tr.frame.Clause`)
             The clause to generate an alias for.
         """
         # Realize and call the `Dub` adapter.
 
     The adapter is polymorphic on the `Clause` argument.
 
-    `clause` (:class:`htsql.tr.frame.Clause`)
+    `clause` (:class:`htsql.core.tr.frame.Clause`)
         The clause to serialize.
 
     `state` (:class:`SerializingState`)
         """
         Generates ``SELECT`` and ``FROM`` aliases.
 
-        `frame` (:class:`htsql.tr.frame.BranchFrame` or ``None``)
+        `frame` (:class:`htsql.core.tr.frame.BranchFrame` or ``None``)
             The frame to generate aliases for.
 
         `taken_select_aliases` (a set or ``None``)
     phrase clause node and writes it to the stream that accumulates a SQL
     statement.
 
-    `clause` (:class:`htsql.tr.frame.Clause`)
+    `clause` (:class:`htsql.core.tr.frame.Clause`)
         A clause to serialize.
 
     `state` (:class:`SerializingState`)
 
         {clause}
 
-    Here, the value of `clause` is a :class:`htsql.tr.frame.Clause`
+    Here, the value of `clause` is a :class:`htsql.core.tr.frame.Clause`
     instance to serialize.
     """
 
     Here,
 
     * the value of the `clauses` variable is a list of
-      :class:`htsql.tr.frame.Clause` nodes;
+      :class:`htsql.core.tr.frame.Clause` nodes;
     * `separator` is a separator between clauses (``', '``, by default).
     """
 
     This is an auxiliary adapter used to generate aliases for
     ``SELECT`` and ``FROM`` clauses.
 
-    `clause` (:class:`htsql.tr.frame.Clause`)
+    `clause` (:class:`htsql.core.tr.frame.Clause`)
         A clause node to make an alias for.
 
     `state` (:class:`SerializingState`)
     The adapter generates a SQL clause for the given node and
     writes it to the stream that accumulates a SQL statement.
 
-    `clause` (:class:`htsql.tr.frame.Clause`)
+    `clause` (:class:`htsql.core.tr.frame.Clause`)
         A clause to serialize.
 
     `state` (:class:`SerializingState`)
     """
     Translates a frame node to SQL.
 
-    `frame` (:class:`htsql.tr.frame.Frame`)
+    `frame` (:class:`htsql.core.tr.frame.Frame`)
         A frame node to serialize.
     """
 
     """
     Translates a phrase node to SQL.
 
-    `phrase` (:class:`htsql.tr.frame.Phrase`)
+    `phrase` (:class:`htsql.core.tr.frame.Phrase`)
         A phrase node to serialize.
     """
 
     This is an auxiliary adapter used for serialization of literal nodes.
     The adapter is polymorphic on the domain of the literal.
 
-    `phrase` (:class:`htsql.tr.frame.LiteralPhrase`)
+    `phrase` (:class:`htsql.core.tr.frame.LiteralPhrase`)
         A literal node to serialize.
 
     `state` (:class:`SerializingState`)
     `value` (depends on the domain or ``None``)
         The value of the literal.
 
-    `domain` (:class:`htsql.domain.Domain`)
+    `domain` (:class:`htsql.core.domain.Domain`)
         The domain of the literal.
     """
 
     The adapter is polymorphic on the pair of the origin and the target
     domains.
 
-    `phrase` (:class:`htsql.tr.frame.CastPhrase`)
+    `phrase` (:class:`htsql.core.tr.frame.CastPhrase`)
         A cast node to serialize.
 
     `state` (:class:`SerializingState`)
 
     Other attributes:
 
-    `base` (:class:`htsql.tr.frame.Phrase`)
+    `base` (:class:`htsql.core.tr.frame.Phrase`)
         The operand of the ``CAST`` expression.
 
-    `domain` (:class:`htsql.domain.Domain`)
+    `domain` (:class:`htsql.core.domain.Domain`)
         The target domain.
     """
 
     This is an auxiliary adapter used for serialization of formula nodes.
     The adapter is polymorphic on the formula signature.
 
-    `phrase` (:class:`htsql.tr.frame.FormulaPhrase`)
+    `phrase` (:class:`htsql.core.tr.frame.FormulaPhrase`)
         A formula node to serialize.
 
     `state` (:class:`SerializingState`)
 
     Other attributes:
 
-    `signature` (:class:`htsql.tr.signature.Signature`)
+    `signature` (:class:`htsql.core.tr.signature.Signature`)
         The signature of the formula.
 
-    `domain` (:class:`htsql.tr.domain.Domain`)
+    `domain` (:class:`htsql.core.tr.domain.Domain`)
         The co-domain of the formula.
 
-    `arguments` (:class:`htsql.tr.signature.Bag`)
+    `arguments` (:class:`htsql.core.tr.signature.Bag`)
         The arguments of the formula.
     """
 
     """
     Translates a clause node to SQL.
 
-    `clause` (:class:`htsql.tr.frame.Clause`)
+    `clause` (:class:`htsql.core.tr.frame.Clause`)
         The clause to serialize.
 
     `state` (:class:`SerializingState` or ``None``)

File src/htsql/core/tr/embed.py

 #
-# Copyright (c) 2006-2011, Prometheus Research, LLC
+# Copyright (c) 2006-2012, Prometheus Research, LLC
 # See `LICENSE` for license information, `AUTHORS` for the list of authors.
 #
 

File src/htsql/core/tr/encode.py

 #
-# Copyright (c) 2006-2011, Prometheus Research, LLC
+# Copyright (c) 2006-2012, Prometheus Research, LLC
 # See `LICENSE` for license information, `AUTHORS` for the list of authors.
 #
 
 
 """
-:mod:`htsql.tr.encode`
-======================
+:mod:`htsql.core.tr.encode`
+===========================
 
 This module implements the encoding process.
 """
         """
         Encodes the given binding node to a code expression node.
 
-        Returns a :class:`htsql.tr.flow.Code` node (in some cases,
-        a :class:`htsql.tr.flow.Expression` node).
+        Returns a :class:`htsql.core.tr.flow.Code` node (in some cases,
+        a :class:`htsql.core.tr.flow.Expression` node).
 
-        `binding` (:class:`htsql.tr.binding.Binding`)
+        `binding` (:class:`htsql.core.tr.binding.Binding`)
             The binding node to encode.
         """
         # When caching is enabled, we check if `binding` was
         """
         Encodes the given binding node to a flow expression node.
 
-        Returns a :class:`htsql.tr.flow.Flow` node.
+        Returns a :class:`htsql.core.tr.flow.Flow` node.
 
-        `binding` (:class:`htsql.tr.binding.Binding`)
+        `binding` (:class:`htsql.core.tr.binding.Binding`)
             The binding node to encode.
         """
         # When caching is enabled, we check if `binding` was
     The encoding process translates binding nodes to data flows or
     expressions over data flows.
 
-    `binding` (:class:`htsql.tr.binding.Binding`)
+    `binding` (:class:`htsql.core.tr.binding.Binding`)
         The binding node to encode.
 
     `state` (:class:`EncodingState`)
     Encodes a cast binding to a code node.
 
     This is an auxiliary adapter used to encode
-    :class:`htsql.tr.binding.CastBinding` nodes.  The adapter is polymorphic
+    :class:`htsql.core.tr.binding.CastBinding` nodes.  The adapter is polymorphic
     by the origin and the target domains.
 
     The purpose of the adapter is multifold.  The :class:`Convert` adapter:
       domain is admissible;
     - eliminates redundant conversions;
     - handles conversion from the special types:
-      :class:`htsql.domain.UntypedDomain` and :class:`htsql.domain.TupleDomain`;
+      :class:`htsql.core.domain.UntypedDomain` and :class:`htsql.core.domain.TupleDomain`;
     - when possible, expresses the cast in terms of other operations; otherwise,
-      generates a new :class:`htsql.tr.flow.CastCode` node.
+      generates a new :class:`htsql.core.tr.flow.CastCode` node.
 
-    `binding` (:class:`htsql.tr.binding.CastBinding`)
+    `binding` (:class:`htsql.core.tr.binding.CastBinding`)
         The binding node to encode.
 
         Note that the adapter is dispatched on the pair
 
     Aliases:
 
-    `base` (:class:`htsql.tr.binding.Binding`)
+    `base` (:class:`htsql.core.tr.binding.Binding`)
         An alias for `binding.base`; the operand of the cast expression.
 
-    `domain` (:class:`htsql.domain.Domain`)
+    `domain` (:class:`htsql.core.domain.Domain`)
         An alias for `binding.domain`; the target domain.
     """
 
     The adapter accepts a binding formula node and is polymorphic
     on the formula signature.
 
-    `binding` (:class:`htsql.tr.binding.FormulaBinding`)
+    `binding` (:class:`htsql.core.tr.binding.FormulaBinding`)
         The formula node to encode.
 
     `state` (:class:`EncodingState`)
 
     Aliases:
 
-    `signature` (:class:`htsql.tr.signature.Signature`)
+    `signature` (:class:`htsql.core.tr.signature.Signature`)
         The signature of the formula.
 
-    `domain` (:class:`htsql.tr.domain.Domain`)
+    `domain` (:class:`htsql.core.tr.domain.Domain`)
         The co-domain of the formula.
 
-    `arguments` (:class:`htsql.tr.signature.Bag`)
+    `arguments` (:class:`htsql.core.tr.signature.Bag`)
         The arguments of the formula.
     """
 
     Translates a formula binding to a code node.
 
     This is an auxiliary adapter used to encode
-    class:`htsql.tr.binding.FormulaBinding` nodes.  The adapter is
+    class:`htsql.core.tr.binding.FormulaBinding` nodes.  The adapter is
     polymorphic on the formula signature.
 
     Unless overridden, the adapter encodes the arguments of the formula
     Translates a formula binding to a flow node.
 
     This is an auxiliary adapter used to relate
-    class:`htsql.tr.binding.FormulaBinding` nodes.  The adapter is
+    class:`htsql.core.tr.binding.FormulaBinding` nodes.  The adapter is
     polymorphic on the formula signature.
 
     Unless overridden, the adapter generates an error.
     """
     Encodes the given binding to an expression node.
 
-    Returns a :class:`htsql.tr.flow.Expression` instance (in most cases,
-    a :class:`htsql.tr.flow.Code` instance).
+    Returns a :class:`htsql.core.tr.flow.Expression` instance (in most cases,
+    a :class:`htsql.core.tr.flow.Code` instance).
 
-    `binding` (:class:`htsql.tr.binding.Binding`)
+    `binding` (:class:`htsql.core.tr.binding.Binding`)
         The binding node to encode.
 
     `state` (:class:`EncodingState` or ``None``)
     """
     Encodes the given binding to a data flow node.
 
-    Returns a :class:`htsql.tr.flow.Flow` instance.
+    Returns a :class:`htsql.core.tr.flow.Flow` instance.
 
-    `binding` (:class:`htsql.tr.binding.Binding`)
+    `binding` (:class:`htsql.core.tr.binding.Binding`)
         The binding node to encode.
 
     `state` (:class:`EncodingState` or ``None``)

File src/htsql/core/tr/error.py

 #
-# Copyright (c) 2006-2011, Prometheus Research, LLC
+# Copyright (c) 2006-2012, Prometheus Research, LLC
 # See `LICENSE` for license information, `AUTHORS` for the list of authors.
 #
 
 
 """
-:mod:`htsql.tr.error`
-=====================
+:mod:`htsql.core.tr.error`
+==========================
 
 This module declares exceptions that can be raised by the HTSQL-to-SQL
 translator.

File src/htsql/core/tr/flow.py

 #
-# Copyright (c) 2006-2011, Prometheus Research, LLC
+# Copyright (c) 2006-2012, Prometheus Research, LLC
 # See `LICENSE` for license information, `AUTHORS` for the list of authors.
 #
 
 
 """
-:mod:`htsql.tr.flow`
-====================
+:mod:`htsql.core.tr.flow`
+=========================
 
 This module declares flow and code nodes.
 """
 
     The constructor arguments:
 
-    `binding` (:class:`htsql.tr.binding.Binding`)
+    `binding` (:class:`htsql.core.tr.binding.Binding`)
         The binding node that gave rise to the expression; should be used
         only for presentation or error reporting.
 
 
     Other attributes:
 
-    `syntax` (:class:`htsql.tr.syntax.Syntax`)
+    `syntax` (:class:`htsql.core.tr.syntax.Syntax`)
         The syntax node that gave rise to the expression; for debugging
         purposes only.
 
-    `mark` (:class:`htsql.mark.Mark`)
+    `mark` (:class:`htsql.core.mark.Mark`)
         The location of the node in the original query; for error reporting.
 
     `hash` (an integer)
 
     A table flow produces records from a database table.
 
-    `table` (:class:`htsql.entity.TableEntity`)
+    `table` (:class:`htsql.core.entity.TableEntity`)
         The table.
     """
 
     class, see concrete subclasses :class:`DirectTableFlow` and
     :class:`FiberTableFlow`.
 
-    `table` (:class:`htsql.entity.TableEntity`)
+    `table` (:class:`htsql.core.entity.TableEntity`)
         The table.
     """
 
     `base` (:class:`Flow`)
         The base flow.
 
-    `table` (:class:`htsql.entity.TableEntity`)
+    `table` (:class:`htsql.core.entity.TableEntity`)
         The table.
     """
 
     `base` (:class:`Flow`)
         The base flow.
 
-    `join` (:class:`htsql.entity.Join`)
+    `join` (:class:`htsql.core.entity.Join`)
         The join condition.
     """
 
     must be taken to properly wrap them with appropriate
     :class:`ScalarUnit` and/or :class:`AggregateUnit` instances.
 
-    `domain` (:class:`htsql.domain.Domain`)
+    `domain` (:class:`htsql.core.domain.Domain`)
         The co-domain of the code expression.
 
     `units` (a list of :class:`Unit`)
     `value` (valid type depends on the domain)