Copyright © 1997, Digital Equipment Corporation. All rights reserved.
LIM is a text processing language in the general family of lex, yacc, sed, awk, and trans, but is based on Dijkstra's calculus of guarded commands. The name is an acronym for Language of the Included Miracle, because LIM programs can violate the so-called Law of the Excluded Miracle. For details see "A Discipline of Programming", Edsger W. Dijkstra, Prentice-Hall, 1976, and "A generalization of Dijkstra's calculus", Greg Nelson, Trans. on Programming Languages and Systems, October 1989, or SRC Research Report 16.
A LIM command may be guarded by a predicate. The command is said to fail if the predicate is false when the command is executed. The main novelty in LIM is that failing commands never have side effects. If a long computation has side effects and then fails, it is as though the side effects never happened. This property of the language makes it easy to write parsers and pretty-printers, since they require the ability to speculatively perform some action. In fact, the LIM distribution includes a pretty-printer for the LIM language that is itself written in LIM.
LIM is written in C, and uses lex/yacc or flex/bison. It has been successfully built on the Digital Ultrix and Digital Unix operating systems. It should compile on most other Unix platforms.
To download LIM, follow these steps:
lim.tar.Z
lim.tar.Z
". If it instead contains the file
"lim.tar
", then your browser has automatically
uncompressed the file, and you can skip the following step.
uncompress lim.tar.Z
" on the downloaded file.
tar xvf lim.tar
" on the resulting tar file to extract
the LIM sources.
rm lim.tar
" to remove the tar file.
Once you have downloaded and unpacked the LIM sources, follow these steps from your "lim" directory to build LIM on your system:
/usr/local/lib/lim
. If you plan to install them somewhere
else, edit the file "pp/pplim.sh
. Replace the pathname
"/usr/local/lib/lim
" on the third line of that script
with the absolute path of the directory where you eventually plan to
install the scripts.
make
". This will create
a derived directory named by your machine's architecture. It's name
is formed by running "machine
".
bin
:
arch/lim
- LIM executable
arch/pplim
- LIM pretty-printer
man/man1
:
lim.1
- lim(1) man page
pp/pplim.1
- pplim(1) man page
lib/lim
:
pp/format.lim
- formats pretty-printer output
pp/lex.lim
- parses input for pretty-printer
pp/pp.lim
- LIM pretty-printer
The directory in which the last three files are installed should match
the directory in the pp/pplim.sh
script that you edited
in the first step of this section.
Once you have successfully installed lim, you may be interested in downloading and installing mtex, a set of LIM scripts for producing man pages in HTML and nroff format from a single LaTeX-like source format. For more information about mtex, see the mtex home page.
[ Systems Research Center (SRC) Software Home Page ]
Last modified on Thu Aug 28 22:46:04 PDT 1997 by heydon