Using Eden at DCS
Choosing a variant of Eden
There are three variants of Eden:
tkeden
implements the Eden, Donald, Scout and Sasami notations, along with the virtual agency feature. It is the primary tool of the Empirical Modelling group.dtkeden
extendstkeden
with distributed communication features, adding the LSD notation to do so. It is used when models use communication between machines, for example in the railway accident model. It is slower and has more bugs thantkeden
.ttyeden
implements just the Eden notation and provides a UNIX shell-like interface. It is useful for trying out ideas in Eden quickly without thetkeden
interface getting in the way. A line editing feature has recently been added, enabling full cursor editing of the input line and history. This uses the GNU readline library, which is configurable: seeman readline
for more information.
Starting Eden
The tools can be run directly from the command line, with no
additional setup required. They are located in
~empublic/bin
(which is shorthand for
/dcs/emp/empublic/bin
). To run tkeden
,
dtkeden
or ttyeden
, you can simply type the
full name at a DCS UNIX shell prompt. Here are some examples:
$ ~empublic/bin/tkeden & maudslay$ /dcs/emp/empublic/bin/dtkeden -s -c 42 & cottage$ ~empublic/bin/dtkeden -a -h maudslay -c 42 & $ ~empublic/bin/tkeden main.e -e "run();" & $ /dcs/emp/empublic/bin/ttyeden 1:> a is f(2)*c; 2:> func f { return $1 + 42; } 3:> proc pa : a { writeln("a := ", a); } 4:> c=3; a := 132 [...Control-D to exit] labvista-20$ ~empublic/bin/tkeden -v /dcs/emp/empublic/linux-i686/bin/tkeden-1.10: tkeden version 1.10 Lib directory is /dcs/emp/empublic/lib/lib-tkeden-1.10 Use the -u option for information on usage of command options See http://www.dcs.warwick.ac.uk/modelling/ for more information
The tools have various command line options which allow you to
control certain aspects. These command line options are particularly
important when using dtkeden
, as information about
communication between the dtkeden
server and client
processes should be specified. Check the available command line
options by using the -u
argument:
$ ~empublic/bin/dtkeden -u Usage: /dcs/emp/empublic/solaris-sparc/bin/dtkeden-1.6 [-s|-a] -c-h {-l } {-v|-u} [file...] -s invoke as superagent (server) -a invoke as agent (client) -c channel number can be 0,1,2,3, ..., 99 -h hostname of the machine running the superagent dtkeden -l name of the directory containing the library files -v output version information and exit -u output this usage information and exit if file is '-', standard input will be read See http://www.dcs.warwick.ac.uk/modelling/ for more information
Setting your PATH variable
Having to specify the full path to the tool each time you run can
mean a lot of typing. It is possible to alleviate this slightly by
adding the directory containing the EM tools to your PATH
environment variable. If you use the bash
shell (which
is the default at DCS), you should add this line of code to your
.bashrc
file which is in your home directory:
export PATH=${PATH}:/dcs/emp/empublic/bin
If you have some existing EM setup in your .bashrc
,
you should add this line before the existing ($PUBLIC-based)
setup. If you have no existing setup, add the line to the end of the
file. You will need to logout and login again for this change to take
effect. You can then check that the EM tools directory has been
correctly added by using echo $PATH
. If you are having
problems, consult a book on UNIX or ask another Empirical
Modeller.
Using some older tools and models
The instructions given above should now be used in preference to the older methods, but if you wish to use some older translators or models, you may have to resort to these old ways.
Some tools used by the EM project still use the PUBLIC
environment variable to find various files. The choice of the name of
the variable probably isn't a good one, it is easy for beginners (and
also more advanced people!) to mess up setting it correctly, and
setting the variable on other platforms (eg Windows, where it must be
set in a DOS batch script, or pre-MacOS X Macintosh, where environment
variables don't exist) can be problematic. And so the variable is
gradually being phased out.
If you need to, try the instructions for the VCCS
(This link now points to the archive of the very old website [Charlie, September 2005]) for some instructions for setting up your environment in the old-style
way. An example of using the Arca translator (which may soon be fixed
so this is not needed) would be (assuming the bash
shell):
topaz$ export PUBLIC=~wmb/public topaz$ cd $PUBLIC/demos/railway topaz$ ./run instantiating train() [...]
Choosing a version of Eden
Running Eden and specifying no version number (eg just typing
/dcs/emp/empublic/bin/tkeden
) will execute the most up to
date stable version of that variant for your platform, which is what
you should use unless you have reason to try another (eg an older
model doesn't seem to work with the newer tool, or you want to be on
the painful cutting edge and try a version currently undergoing
development).
Eden has been changed many times, and many versions are available at DCS. The table below documents the availability of the various variants and versions of Eden that are available in ~empublic/bin to run on the Computer Science machines. To run a version of Eden which is not the default, you can type, for example:
$ /dcs/emp/empublic/bin/tkeden-1.4 # You don't have to specify the full path if you have set your PATH # variable as described above: $ tkeden-sep261997 # The bash shell can show you possible completions if you press tab twice: $ ~empublic/bin/dtkedendtkeden dtkeden-1.4 dtkeden-sep31999 dtkeden-1.10 dtkeden-1.6
The table lists the newest version first. Certain changes (those
visible to users at DCS) are given in the comments column: for more
detail and information, check out the CHANGE.LOG
file
which is accessible from the Help menu in tkeden-1.14
and
later. The other columns show the availability of an executable for
the various platforms in the department.
Name | solaris-sparc | linux-i686 | Comments |
---|---|---|---|
tkeden-1.14 | Y | n | Sasami colormap bug fixed. -e argument added. More user interface improvements. |
tkeden-1.13 | Y | n | Dynamic stack resizing experiment (which causes crashing - see tkeden-1.6) removed. Now keeping three backups of ~/.tkeden-history. Many user interface improvements. sensitive: ENTER and LEAVE added. 'bitand' and 'bitor' infix operators added. Sasami ported to UNIX (but with a colormap bug). A certain type of dependency automatically created with the back-tick `` operators is now not created, as it doesn't behave correctly. Related-by statements (~>) improvements. eden_error_index_range and eden_notice_undef_reference variables added. Output of the query (?) operator improved. C-lib real-valued functions (eg sin, cos, pow...) now give sensible behaviour when called with non-real parameters. Many error messages improved, and location information is now given when an error occurs. 'procmacro' facility added. |
tkeden-1.10 | n | Y | Library file location guessing removed - we are left with the -l argument, and a wrapper shell script must be constructed for use at sites with complicated Eden installations. Arca initialisation file added back into the library files directory. |
dtkeden-1.10 | n | Y | As per tkeden-1.10. |
tkeden-1.6 | Y | n | symboltext() function added for Chris Roe. An attempt is
made to resize the stack dynamically if the stack overflow error is
encountered (although this is ultimately unsuccessful, causing Eden to
crash in this condition instead of giving an error). |
dtkeden-1.6 | Y | n | As per tkeden-1.6. |
ttyeden-1.6 | Y | n | As per tkeden-1.6. |
tkeden-1.4 | Y | n | Ashley Ward has started to work on the code. Version numbering implemented: the -v argument shows the current version information. The old system for locating library files, based on the $PUBLIC variable was replaced with one that attempts to guess the library file location from the filename Eden was invoked under if the information is not given with the -l argument. |
dtkeden-1.4 | Y | n | As per tkeden-1.4. |
ttyeden-1.4 | Y | n | As per tkeden-1.4. readline added to enable decent command line editing. |
ttyeden-1.2mimosa, ttyeden-1.2crocus |
Y | n | These versions were compiled by Ashley Ward in November 1999 and installed at ITS for the first attempts at using EDDI in CS233. |
dtkeden-sep31999 | Y | n | tkeden.S and tkeden.C merged into one dtkeden version with a command argument -s(superagent)|-a(agent). -h hostname argument added. |
tkeden-dec151997 | Y | n | A normal tkeden with no distributed features (as opposed to tkeden.S and .C). |
tkeden.S-dec151997 | Y | n | Unknown changes from tkeden.S-dec91997. |
tkeden.C-dec151997 | Y | n | Unknown changes from tkeden.C-dec91997. |
tkeden.S-dec91997 | Y | n | Server version of tkeden (later to be named dtkeden) created by Patrick
Sun. -c channel number argument added. This version must be run on the
machine gem (as gem is hard-coded as the
hostname). |
tkeden.C-dec91997 | Y | n | Client version of tkeden (later to be named dtkeden) created by Patrick
Sun. -c channel number argument added. The client can probably be run on
any machine, but the server must be running on gem . |
tkeden-sep261997 | Y | n | This version may have been installed by Richard Cartwright. There seems to be little operational difference between this and tkeden-sep2619972, other that tkeden-sep2619972 has a larger and different executable (although it appears to have been compiled from the same source code). |
tkeden-sep2619972 | Y | n | This version was installed for 'sun5', possibly by Richard Cartwright. |
tkeden-oct281996 | Y | n | Note: This doesn't work currently. This version may have been installed by Simon Yung. As well as the Binary Compatibility package problems mentioned below for ttyeden-jun201996, some dynamic libraries required by this version have gone away: in particular, libXt.so.4.10, libXext.so.4.10 and libX11.so.4.10. I have found a copy of libXext.so.4.10 on the 'Net, but the other two remain to be found. (When they are found, judicious setting of the environment variable LD_LIBRARY_PATH should allow this version to run again). |
ttyeden-jun201996 | Y | n | Note: this works only on departmental servers (eg gem). This
version may have been installed by Simon Yung. The executable was
compiled on the older departmental SunOS 4 (pre-Solaris) machines and
will now only run on Solaris machines which have the "SunOS 4.x Binary
Compatibility" package installed. The package is quite large and is
gradually being removed from systems by the administrators. You can
check whether a machine has this package installed by using
pkginfo SUNWbcp : if the package is installed, you will
see information for the package, otherwise you will see an error.
gem is a machine that still (as of June 14 2001) has this
package. If you attempt to run a SunOS 4.x executable on a Solaris
machine without this compatibility package, you will simply see the
rather unhelpful message Killed . |
ttyeden-may011996 | Y | n | This is copied from within ~wmb/public/projects/notations/eddi/REAL/ttyeden.tar.gz. It appears to function on Solaris machines without the "SunOS 4.x Binary Compatibility" package installed as described for ttyeden-jun201996 above. |
ttyeden-apr301996 | Y | n | This is copied from ~wmb/public/projects/notations/eddi/PSEUDO.original. Notes as for ttyeden-jun201996 above. |
ttyeden-feb161993 | Y | n | Notes as for ttyeden-jun201996 above. |