From Dyna
Jump to: navigation, search


Step 1: Compilation

See Download for instructions on getting Dyna. (Note: Please report any problems with downloading, installing, or using it.)

To compile the source distribution in dyna-VERSION.tgz:

gzip -dc dyna-VERSION.tgz | tar -xf -
cd dyna-VERSION

You can now delete dyna-VERSION.tgz if you like.

Step 2: Testing

Optionally, type

make test

if you really want to check that everything compiled and runs on your machine. You might not want to wait around for all of the internal tests to complete; if the first few run, you're probably okay.

Don't be alarmed if a few tests fail (i.e., the programs do run but don't get the expected output). Dyna is under heavy development, and sometimes the tests get out of sync with the implementation. Tests sometimes fail simply because an error message has changed, or because of rounding error in numerical results, or because there is currently no guarantee about how ties will be broken.

Step 3: Installation

Now you should put Dyna somewhere convenient. A few options are available.

No installation

You can leave the dyna-VERSION directory where it is, or move it anywhere you like. Then add .../dyna-VERSION/bin to your PATH so that you can easily run the dynac executable. Or just alias dynac to .../dyna-VERSION/bin/dynac.

Public installation

If you have root privileges, you can install Dyna somewhere more public with

make install

By default, this puts the dynac executable in /usr/local/bin (with some auxiliary files in /usr/local/lib/dyna-VERSION and /usr/local/include/dyna-VERSION). If you prefer to install dynac under /usr/bin rather than /usr/local/bin, for example, you would type

make install prefix=/usr

You are free to delete the dyna-VERSION directory after running make install.

Note: Installing the current version does not delete older versions. They may be useful to keep around in order to replicate experimental results. But perhaps the makefile should have an explicit command to remove them.

Public installation in a personal directory

If you want to install Dyna under your home directory and let your friends use it too, you could do something like

make install prefix=~/dyna

and tell them to put ~YOURNAME/dyna/bin on their PATH.

Or if you are the kind of user who likes to have personal ~/bin, ~/lib, and ~/include directories,

make install prefix=~

You are free to delete the dyna-VERSION directory after running make install.

Step 4: Try it out

As a quick check that something got installed on your path, try typing

 dynac --version

Now you probably want to try out the compiler and debugger. The tutorial is a good place to start.

We should also say how to run the examples in the distribution.

If you use Dyna in your own work, here's how to cite it.

Bonus: Emacs and Vim modes

If you want support for editing Dyna programs in Emacs, add these lines to the .emacs file in your home directory:

(autoload 'dyna-mode "dyna-mode" "Major mode for editing Dyna programs." t)
(add-hook 'dyna-mode-hook 'turn-on-font-lock)  ; if you want syntax highlighting
(add-to-list 'auto-mode-alist '("\\.dyna[^.]*$" . dyna-mode))

Depending on how you have installed, you may also need to add a line telling Emacs where to find dyna-mode.el. For example:

(add-to-list 'load-path "/usr/local/share/emacs/site-lisp")

perhaps replacing /usr/local with the path where you unpacked or installed the Dyna distribution.

And thanks to Matthew Ziegelbaum for providing this vim mode that handles at least basic Dyna syntax. Send updates to him.

Personal tools