The Higher Object Programming System
HOPS is a graphically interactive program development and
program transformation system
based on term graphs.
HOPS is intended as:
- Research tool: New languages can easily be constructed
and experimented with via the transformation mechanism.
- Programming tool: HOPS may be used as a ``better Haskell editor'',
integrating syntax directed editing with strong online typing.
- Visualisation and debugging tool: Automatic evaluation sequences
help to illustrate the workings
of, for example, purely functional programs with lazy evaluation.
- Education tool: A hands-on experience of term graphs, syntactic structure,
typing, graph reduction, general second-order rule application
and reduction strategies can be gained easily through the use of HOPS.
These pages provide:
The homepage of HOPS is http://www.cas.mcmaster.ca/~kahl/HOPS/.
HOPS is a program development and program transformation environment
that is radically based on term graphs at the user interface.
The current implementation
is in fact a literate programming system for term-graph programming
with quasi-WYSIWIG document interaction.
Programming in HOPS is unusual in several respects.
While most users will be used to see their programs as texts,
in HOPS programs are made up of term graphs.
These term graphs are of course closely related to the terms that are encoded
in the textual representation of conventional programs,
but the visual appearance is radically different.
In term graphs, the structure is exposed in an extremely explicit manner,
and interaction is guided very directly by this structure.
HOPS supports the program development process structurally
by making impossible what would be syntax errors and type errors in conventional systems.
This system support, and the graphical immediacy of program structure,
with some experience, lead to a much higher confidence and a much lower error rate
during the program development process.
Putting it into the terms of conventional programming environments,
the ``editor'' in HOPS also includes an ``interpreter'',
the interactive transformation system.
This possibility to apply single rules or transformation strategies
at any point during editing has several advantages.
One advantage is of course that experimenting with the program under development,
simulating parts of the execution even while not everything is defined,
can lead to a better understanding of this program
and to earlier discovery of eventual errors.
Another advantage, which may be even more important in the long run,
is that the possibility to try different equivalent versions of each part of the
program. This can make it easier to follow a coherent style,
and to find and apply new abstractions
as they appear appropriate during development.
HOPS has its beginnings in the mid-eighties of the twentieth century,
when work on it was started in a small group led by Gunther Schmidt.
Different prototypes have been implemented since then.
The current implementation is based on the
thorough investigation of the foundations of
second-order term graph rewriting
that forms the basis of the transformation system of HOPS.
The traditional strengths of the HOPS approach
are realised in this implementation:
Besides, new features include:
- Term graphs with explicit variable binding
- Enforcing of term graph consistency: no syntax errors!
- Strong online term graph typing: no typing errors!
- Second order term graph transformations
- Automatic transformation mechanisms
- Term graphs with explicit variable identity
- Flexible term graph interaction with automatic and manual layout
- Literate programming approach supported by quasi-WYSIWYG module document interaction
- Term graph attribution allowing generation of code in other languages
- Interoperability through XML file format.
- Folding of sections and submodules
- Document output of module documents to PostScript and HTML