|
This document is a work in progress.
XPS Architecture
XPS is based upon a set of libraries and executables that provide a whole
programming environment. XPS is also based on various other software components.
This page will eventually describe those components and their
inter-relationships.
Overview
The diagram above shows a rough architecture of XPS. At the foundational
layer are external software packages: LLVM, APR, etc. On top of those packages
XPS provides a set of libraries: base, xml, cfg, etc. From those libraries a
set of tools are constructed: XPLC, XVM, etc. The sections that follow describe
each of these categories and their components
External Libraries
- LLVM
- The Low Level Virtual Machine is a compiler
writer's infrastructure providing the following features that XPS uses:
- a low level intermediate representation (IR) in assembly, bytecode and
C++ forms
- various analyses including alias analysis, data structure, and control
flow
- an infrastructure for writing module, function, and basic-block level
passes for transformation of code
- A plethora of optimization passes for both compile time and link
time.
- back ends to generate code for "C", x86, SPARC, and PowerPC. More
targets are being written.
- a variety of tools including source-level debugger, compiler driver,
linker, assembler, disassembler, etc.
LLVM is fully documented here .
XPS uses LLVM as its low level representation of programs and for code
generation and execution services.
- APR
- The Apache Portable Runtime is the
basis for the runtime environment. This runtime is in use in the Apache httpd
web server and provides a portable toolkit for operating system services and
other software packages.
XPS uses APR to shield itself from differences in operating systems and to
ensure stable semantics for the operations provided across platforms.
- eXpat
- The eXpat XML parser provides basic
XML parsing services. It manages character set translation, recognition of
well-formed documents, and management of namespace processing. All of XPS' XML
parsing capabilities are based on eXpat. Although other XML parsing systems
are available, they were deemed inappropriate for XPS for technical reasons
(Xerces is too big, libxml2 is too hard to comprehend). One of the prime
motivators for using eXpat is its speed. It parses XML document very
quickly.
- Other
- As XPS grows there will probably be other external libraries that it uses.
We just don't know what they are yet.
XPS Libraries
- base
- The
base library provides fundamental software engineering
facilities to XPS such as assertions, error handling, and abstract data types.
It is meant to be used as a toolkit from which programs can pick and choose
the facilities they need.
- cfg
- The
cfg library provides all compile-time and run-time
configuration services. Configuration is handled via a very simple XML file
format. This library will grow to deal with all configuration matters, system
wide.
- meta
- The
meta library provides the meta-model for XPL and its
extensions. This is essentially the high-level IR or abstract syntax tree for
XPL based languages.
- rt
- The
rt library provides the runtime library and extensions
architecture for the eXtensible Virtual Machine (xvm). This library provides a
platform agnostic set of services that may be loaded and executed as intrinsic
operations by XPL based programs.
- space
- The
space library manages all aspects of a workspace which is
a self-contained repository of code with features for versioning, compilation,
promotion, etc.
- xml
- The
xml library provides all XML related services for XPS.
This includes parsing, schema and dialect generation, validation of documents,
etc.
- xpl
- The
xpl library provides xpl compilation for XPS. It allows
XPL programs to be manipulated in a variety of ways.
XPS Tools
- XPLC
- The
xplc tool is the compiler for XPL based languages. It
uses the facilities of the xpl library to process XPL programs
for the generation of documentation, bytecode, executables, etc.
- XVM
- The
xvm tool is the virtual machine for XPS. It provides a
platform neutral low level machine for interpretation and just-in-time
compilation of XPL based programs as well as a framework for executing
statically compiled programs.
- XPSD
- The
xpsd tool is the XPS daemon. It provides a set of
services to network users via an XML-RPC/SOAP based interface. Users can log
in, review code, make changes, compile and build programs, promote programs
between workspaces, and etc.
- XPSH
- The
xpsh tool is a command line oriented interface to XPS.
It communicates with the XPS daemon using a more natural "shell" like
interface.
|