%% LyX 1.3 created this file.  For more info, see http://www.lyx.org/.
%% Do not edit unless you really know what you are doing.
\documentclass[oneside,english]{book}
\usepackage{pslatex}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{3}
\usepackage{makeidx}
\makeindex
\IfFileExists{url.sty}{\usepackage{url}}
                      {\newcommand{\url}{\texttt}}

\makeatletter

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.
\newcommand{\noun}[1]{\textsc{#1}}

\usepackage{babel}
\makeatother
\begin{document}

\title{The TUNES System Specification}


\author{Brian T. Rice, Editor}

\maketitle
\tableofcontents{}


\chapter{Overview}


\section{Purpose}

This document presents schematic description of the requirements for
a TUNES system architecture. This is a working draft, designed to
provide precise technical feedback to TUNES project members as design
issues are resolved. Implementation strategies are suggested, but
not specified.


\section{Scope}

This document specifies the basic requirements required to satisfy
the definition of a TUNES system as set out at the TUNES Project website \url{http://www.tunes.org/}.
This is not a tutorial or an implementation guide, although suggestions
may be made in order to illustrate and coordinate ideas.


\section{History}

The TUNES Project has existed for many years in an early planning
and speculation stage. Several projects exist to advance its goals,
but coordination was found to be necessary to help guide the project
and solidify the goals.


\section{Document Conventions}


\subsection{Typography}

\begin{itemize}
\item Formal terms which have a precise definition within the specification
are denoted with a \noun{Small Caps} style.
\item Emphasis is provided through \emph{italics}.
\end{itemize}

\subsection{Organization}

Since this document is a reference, the order of presentation has
not been layed out for introductory purposes.

This document's chapters are separated into levels of detail. Major
sections of the system are explained in terms of their core types
and operations on those types.


\section{Conformance}

Unlike many standards, which delineate deviation in terms of disallowed
behavior within the system under scrutiny, the nature of the TUNES
project requires that conformance be tested by verifying that the
implementation \emph{allows} everything specified by the standard.
Incompleteness is expressed in terms of possibilities that are not
supported.

Specifically, if some element of the specification is not explicitly
restricted in its scope, then it should be read as stating that there
is no restriction of the scope. The simplest example of this is the
type of an object within some role in an operation or other type.


\section{Subsets}

This specification defines a standard subset in various sections which
is considered suitable for bootstrapping. This subset may be altered
to suit dynamic requirements as the initial construction and bootstrap
process proceed.

This specification does not define any other subsets, but defines
frameworks for publishing subsets.


\chapter{The System}


\section{Introduction}

A running TUNES system consists of a self-supporting \noun{configuration}
of \noun{object}s.


\section{Description}

A TUNES system is distinguished from a programming language, an operating
system, or various mixtures of these concepts as such. TUNES is first
and foremost an \emph{environment}; that is, it is defined by the
services it provides rather than the form, structure, or interface
that those services take on in a given implementation. The project
is moreover an attempt to separate service or interface from implementation
in a very broad, systematic sense, while providing a coherent environment
in which many implementations may co-exist and provide the same services
in different \noun{context}s.


\section{Requirements}


\subsection{Fully-Reflective}

The system must contain at least one standard exectuable \noun{expression}
of its full architecture within itself.


\subsection{Unified}

The system must provide standard support for unification of system
\noun{abstraction}s. This requires at least that for any two \noun{type}s
of \noun{object} within the system and corresponding \noun{context}s,
there must exist some standard way to express (or generate the expression
of) each \noun{object} in the opposite \noun{context}.%
\footnote{This requirement's formulation is flawed.%
}


\subsection{Verifiable}

The system must contain and be able to subject its parts to a means
of mechanical verification of assertions within contexts. There must
also be a published means of communicating these results when migrating
software.


\subsection{Higher-Order}

Any kind of \noun{abstraction} is recursively possible over the
system and its \noun{object}s. That is, \noun{object}s created
by abstraction operations should be subjectable to further abstractions
based on their \noun{type}.


\subsection{Self-Extensible}

The means of expression must be available within the system to abstract
some (\emph{any?}) issue in a system-wide scope.\\
There must be a sufficient collection/system of \noun{abstraction}s
available (but not necessarily imposed) in every area of the system
for a meta-system transition in some (\emph{any?}) manner to be possible
based on them. Examples include basic syntactic quotation, escaping
mechanisms, quotienting in arbitrary directions of abstraction, or
some kind of quotient inversion, where a simple domain is carved out
of a complex domain by adding some required constraints which they
do not all satisfy. This latter example corresponds roughly to a comprehension,
of which various sorts exist.\\
As with any element of these requirements, this kind of capability
has to be available in any domain within the system or across multiple
systems.


\subsection{Dynamic}

Any operation defined here may be used dynamically without loss of
capability. That is, it is expressly permitted for any TUNES system
operation to occur in the midst of any computational activity within
that system at any time. Any restriction made on what can be done
dynamically constitutes the definition of a \noun{subset}.


\subsection{Fine-Grained}

A TUNES system must place no limit on the ability to eliminate expressive
overhead involved in operations on \noun{object}s of a specific
\noun{type}, regardless of its kind, within the system.


\subsection{Fault-Tolerant}

A TUNES system must provide some means for assuring that no mismatch
or variation of expected behavior will interrupt the system as a whole.


\subsection{Distributed}

Any operation or object should be implementable or re-implementable
by a coordination of many other objects without restriction in expressiveness.
This applies to physical distribution as well as semantic distribution.


\subsection{Scalable}

Each subsystem defined as a \noun{type} or an operation must be
scalable. That is, for a given \noun{context}, there must exist
some facility for scaling down the semantic generality covered by
the implementation of that \noun{object} to the level of semantics
actually employed within the \noun{context}. This is related to
the notion of partial evaluation.


\chapter{Aspects}


\section{High-Level}


\subsection{Introduction}

The High-Level aspect of a TUNES system includes all objects required
to define any \noun{abstraction} within the system.


\subsection{Types}

\begin{description}
\item [Object\index{Object}]All elements of the system. Within this document,
any unqualified use of this term means any element of a TUNES system.
Objects may be manifest or implicit in a particular context, but there
will at all times be some mechanism(s) available to make any object
manifest within a context.
\item [Attribution\index{Attribution}]An \noun{object} relating a \emph{source}
object to an \emph{attribute} object via a \emph{key} object. An attribution
may be static or dynamically-resolved, and (side-)effecting or not.
\item [Meta-Object\index{Object}]The \emph{term} for an \noun{object}
which deals with some part of the essential characteristics of another.
An object can be a meta-object of another object independently of
whether or not it provides some function of the implementation of
that target object. There are various types of meta-objects. Each
meta-object type that deals with a universal kind of aspect of objects
may be a meta-object of any object in the system without restriction.
\item [Configuration\index{Configuration}]An \noun{object} representing
some requirements on the relationships between some collection of
objects.
\item [Context\index{Context}]Any \noun{object} encapsulating the implicit
meaning of another object. The nature of a context object determines
how an object is expressed within that context. The expression of
an object within a context is the object's creation, so there is some
definite orientation of the object to that context.\\
Unlike the term used within human linguistics, there is no natural
lack of access to the original context, so a TUNES system only engages
in contextual forensics for external systems or internal, unpredictable
systems.
\item [Type\index{Type}]Any \noun{object} representing a class of properties
that another \noun{object} or \noun{configuration} of objects
satisfies. All objects have types; all objects may have multiple types.
The type of an object is in one way self-defining: each object satisfies
properties that distinguish it from other objects, and this is precisely
what distinguishes objects.
\item [Type~System\index{System}]The \emph{term} for a collection of
types along with operations on those types and some form of relations
between them.
\item [Effect\index{Effect}]An \noun{object} representing a change in
the system. These can be provided at various abstraction levels, and
the changes themselves may have varying semantics. It is nevertheless
the required case that for every effect there must be an expression
of it as a function on the system.%
\footnote{This is too strong of a requirement, if it implies that all information
must be retained when replaced.%
}
\item [Expression\index{Expression}]An \noun{object} representing another
in some linguistic \noun{context}.
\item [Side-Effect\index{Side-Effect}]The \emph{term} for an \noun{effect}
not encoded expressly in some \noun{expression}.
\end{description}

\subsection{Operations}

\begin{description}
\item [Apply\index{Apply}]Couples an \noun{abstraction} expression with
an input expression.%
\footnote{Fix this.%
}
\item [Abstract\index{Abstract}~(or~\emph{lambda})]Creates a function
by specifying a \noun{rewrite} with an input \noun{configuration}
and some body expressions.
\item [Instantiate\index{Instantiate}~(or~\emph{epsilon})]~
\item [Replace\index{Replace}]~
\end{description}

\section{Meta-Linguistic}


\subsection{Introduction}

The Meta-Linguistic aspect of a TUNES system includes all objects
which deal with the expression of languages and relation and translation
issues between them.


\subsection{Types}

\begin{description}
\item [Expression\index{Expression}]An \noun{object} representing another
in some linguistic \noun{context}.
\item [Specification\index{Specification}]An \noun{expression} describing
a \noun{configuration}.
\end{description}

\subsection{Operations}

\begin{description}
\item [Parse\index{Parse}]Transform a stream of (character) objects into
an \noun{object} structure
\item [Expand\index{Expand}]Code-transformation techniques that are transparent
to the semantics of the program specification itself.
\item [Search\index{Search}]Control of evaluation order within the limits
of the evaluation-order requirements of the semantics of the \noun{context}.
\item [Dispatch\index{Dispatch}]Taking each \noun{application} expression,
consisting of a function designator and its arguments, and determining
according to the environment and its function-definition semantics,
and \emph{identifying} the right function-definition or combinations
thereof to \noun{apply}.
\item [Rewrite\index{Rewrite}]Applying \noun{effect}s specified by the
program to the system.
\item [Respond\index{Respond}]Communicating the effects of some \noun{rewrite}
to the calling context.
\item [Translate\index{Translate}]~
\end{description}

\section{Interface}


\subsection{Introduction}

The Interface aspect of the TUNES system includes all objects whose
purpose relates to the display of information for a user and meaningful
interaction with users.


\subsection{Types}

\begin{description}
\item [User\index{User}]An \noun{object} representing a particular human
user or agent thereof that interacts through a \noun{terminal} device.
User objects have an associated environment which carries the vocabulary
and preferences specific to that user.
\item [Terminal\index{Terminal}]An interaction component of the system,
consisting of at least one input and one output device.
\item [Gesture\index{Gesture}]A unit \noun{object} of input or output
interaction. The \noun{terminal} device's characteristics determine
the possible granularity of these objects.
\item [Command\index{Command}]An \noun{object} representing a single
event or combination of events which have been given some meaning
by their presence within some interaction \noun{context}.
\item [Activity\index{Activity}]An \noun{object} representing a user's
model of some sequence of events directed towards a perceived specified
objective.
\item [Medium\index{Medium}]An \noun{object} representing a particular
interaction device, with its characteristics, behavior, and state.
All objects of this \noun{type} are subject to a generic protocol
which allows for abstraction within the limits of the device capabilities.
\item [Display\index{Display}]An \noun{object} representing an abstract
rendering device.%
\footnote{Is this redundant with a \noun{medium}?%
}
\item [Color\index{Color}]An \noun{object} representing a visual color,
a kind of \noun{design}.
\item [Style\index{Style}]An \noun{object} representing a set of options
and settings for rendering something on a \noun{display}.
\item [Region\index{Region}]An \noun{object} representing a geometric
space of some dimension.
\item [Design\index{Design}]An \noun{object} representing any graphical
pattern. Designs may be composed with each other into final designs.
\item [Presentation\index{Presentation}]An \noun{object} which contains
presentation aspects of the rendering of some object. Presentation
objects may have formatting options and their own user-centric type
notion separate from the type of the presented object.
\item [Morph\index{Morph}]An object whose context is a display. Objects
of this type are those which offer the user some form of direct manipulation
and do not inherently concern the presentation of some other object.
\item [World\index{World}]An object representing some site on a \noun{display}.
\item [Portal\index{Portal}]An object representing some channel between
sites or a bus among sites on a display.
\end{description}

\subsection{Operations}

\begin{description}
\item [Draw\index{Draw}]Rendering a display \noun{object} onto a \noun{display}
with some particular \noun{style}.
\item [Print\index{Print}]Rendering an \noun{object} onto a \noun{display}
in a form suitable for direct input to some reader.
\item [Read\index{Read}]Creating an \noun{object} from some input description.
\item [Present\index{Present}]~
\item [Request\index{Request}]~
\item [Accept\index{Accept}]~
\end{description}

\section{Migration}


\subsection{Introduction}

The Migration aspect of a TUNES system includes all objects which
describe the identity and relate to mechanisms for moving or duplicating
objects between any kind of contexts.


\subsection{Types}

\begin{description}
\item [Module\index{Module}]A \noun{configuration} of \noun{object}s
with formal requirements for comprehension and formal provisions.
\item [Site\index{Site}]A source or target of communication.
\item [Protocol\index{Protocol}]A medium of communication. Precisely,
a language/encoding.
\item [Stream\index{Stream}]A possibly endless sequence of objects, sent
between sites.
\item [Packet\index{Packet}]A single element of a stream.
\item [Memory~Region\index{Memory Region}]A subset of a storage device
with a particular management type for its memory.
\item [Space\index{Namespace}]%
\footnote{Revise this term's name.%
}A sharable \noun{object} which provides a means of accessing publications.
\item [Reference\index{Reference}]An encoding of a remote \noun{object};
generally, a program to retrieve an object for \emph{use}.
\item [Persistent~Store\index{Persistent Store}]~
\item [Version\index{Version}]~
\end{description}

\subsection{Operations}

\begin{description}
\item [Reify\index{Reify}]Takes some \noun{specification} of the target
\noun{context}, and removes an \noun{object} from a source \noun{context}
based on the required elements. It \emph{slices} the \noun{object}
from the \noun{context}, and represents the relevant parts to send
to the target \noun{context}.
\item [Communicate\index{Communicate}]Renders the \noun{module} in some
medium that both the source and target \noun{context}s advertise
that they support, and actually transports the \noun{module}'s contents
as necessary.
\item [Absorb\index{Absorb}]Takes a description of some \noun{module}
to receive, and evaluates as necessary to \emph{install} the objects
in the target \noun{context}.
\item [Publish\index{Publish}]Registers some \noun{module} within a
\noun{space}, with a \noun{type} and a \noun{version} known
to some shared server \noun{site} which can mediate the exchange.
\noun{Space}s themselves can notably be published.
\end{description}

\section{Low-Level}


\subsection{Introduction}

The Low-Level aspect of a TUNES system involves all objects whose
sole role involves the implementation of other objects in the system.


\subsection{Types}

\begin{description}
\item [Bit\index{Bit}]A single discrete unit of memory with two possible
states.
\item [Word\index{Word}]A vector of \noun{bit}s defined as a unit of
memory for some (possibly abstract) machine.
\item [Memory\index{Memory}]A quantity of information managed and storable
by some device.
\item [Processor\index{Processor}]An operational machine that processes
information stored in \noun{memory}.
\item [Channel\index{Channel}]A structure through which information is
passed between two \noun{site}s or \noun{object}s, which can have
state and modes. Channels can be concrete or abstract, and abstract
channels can be emulated by other channels through agreed protocols.
\item [Bus\index{Bus}]A shared communications medium, having many publishers
and subscribers to information. A bus can often be considered in terms
of many cooperating \noun{channel}s.
\item [Thread\index{Thread}]An \noun{object} representing a unit of
execution, possibly with an associated voucher for \noun{processor}
resources.
\item [Encoding\index{Encoding}]An \noun{object} representing a particular
\noun{type} of low-level representation for some other type of \noun{object}.
\end{description}

\subsection{Operations}

\begin{description}
\item [Bootload\index{Bootload}]~
\item [Call\index{Call}]~
\item [Allocate\index{Allocate}]~
\item [De-allocate\index{De-allocate}]~
\item [Encode\index{Encode}]~
\item [Decode\index{Decode}]~
\end{description}

\chapter{Elements}


\section{High-Level}


\subsection{Objects}


\subsection{Attributions}


\subsection{Effects}


\subsection{Abstractions}


\subsection{Applications}


\section{Meta-Linguistic}


\subsection{Grammars}


\subsection{Evaluators}


\subsection{Dispatchers}


\subsection{Responders}


\subsection{Transformers}


\section{Interface}


\subsection{Terminals}


\section{Migration}


\section{Low-Level}


\chapter{Subsets}


\section{Definition}

A TUNES system \noun{subset} is a specified restricted group of
capabilities that fulfill the common criteria of functionality of
some TUNES aspect or subsystem. The intended purposes of a subset
may be to bootstrap or connect from legacy systems; both purposes
can be satisfied simultaneously. Another purpose of a TUNES subset
may be to enforce some invariants for the sake of providing an environment
customized to a particular idiom or style, and easing the implementation's
load in rendering the environment efficiently.


\section{Core/Bootstrap Language Semantics}


\subsection{Introduction}

The {}``HLL-'' language is a defined \noun{subset} of the TUNES
system High-Level aspect. The primary design considerations include
proper allowance for extension into the full system, avoidance of
limiting semantics or features, and easy of implementation.


\subsection{Semantics}


\subsection{Syntax}


\section{T3P/TM3P Module Encoding Protocol}


\subsection{Introduction}

The TUNES Package Publishing Protocol (or {}``T3P'') is a defined
initial \noun{encoding} for the Migration aspect of the TUNES system.
The primary design considerations include independence of the communications
medium, universal extensibility at least to the level of the HLL-,
and generality in negociating information transfers.


\section{Initial Standard Publication System}


\subsection{Introduction}

\printindex{}

\begin{thebibliography}{1}
\bibitem{key-1}The TUNES Project Website \url{http://www.tunes.org}. François-René
Rideau.
\bibitem{key-2}The Common Lisp Hyperspec, derived from the ANSI Common Lisp standard
(X3.226-1994), at \url{http://www.xanalys.com/software_tools/reference/HyperSpec/}.
Common Lisp committee J13; Project Editor, Kent M. Pitman. 1994.\end{thebibliography}

\end{document}
