Running BETA


You need to execute binaries in /uns/bin. An easy way to enable this is to ensure that your PATH contains /uns/bin (look in your ~/.*cshrc, ~/.profile, or ~/.bashrc, depending on which UNIX shell you are using).

Invocation and use of the various tools is platform independent, see the notes below.

Your System

A free, personal version of the BETA system can be downloaded from Mjolner. Supported platforms include Linux and Windows (NT/95).


There are several different tools in the BETA system, we only mention a couple of them here. For more information try the BETA home page and the above mentioned Mjolner home page.

The programming environment of the BETA system is based on an edit-compile-run cycle, so there is no interactive prompt at which arbitrary expressions and definitions can be interpreted and incorporated into an ongoing execution.

As a minimal example of a BETA program, try this:

ORIGIN '~beta/basiclib/v1.6/betaenv';
-- program:descriptor --
do 'Hello, world!'->putline

Copy this source code to a file, say, and run and execute it:

somePrompt> beta
somePrompt> ./myprogram
Hello, world!

The ORIGIN declaration says that this program is to be compiled in context of the standard library betaenv (which is directly or indirectly the most global context of any "normal" BETA program). The   -- program:descriptor --   line says that the following piece of code has the name program and it is a descriptor. You may think of these two lines as a piece of standard magic (boiler-plate) which is needed in the main file of any BETA program.

Then the program follows. It must be a descriptor (a block enclosed in (#..#), with an optional superpattern in front of the (# delimiter). It contains just one statement which prints the specified text.

Now try to execute sif myprogram and double-click on the word putline to check out the definition of this pattern in the standard library basiclib. Feel free to explore the structure of the library by double-clicking on names.

The integrated programming environment called sif is based on a structure editor; sif is able to invoke the compiler and present error messages in the relevant context, and more. A structure editor is an editor which edits tree structures instead of sequences of characters, hence supporting precise identification of the syntactic units (blocks of declarations, individual declarations, statements, etc.). You may or may not like structure editing but you will need a bit of time to get used to it. However, for browsing, especially in standard libraries, sif is definitely recommended. That's what you just did if you invoked sif as suggested above.

If you double-click on an ellipsis (...) the corresponding (currently hidden or "collapsed") part of the source code is shown. If you double-click on a currently marked selection (i.e. on a piece of code with black backgound color) then that piece of code will be collapsed; if you collapse code when trying to expand it (the mouse should be kept still and well within the black area..) you can use Control-D (for "detail") to ensure that code will be expanded and not collapsed. If you get lost you can use Control-B to step back to previous positions.

For more examples (NB: these links only work if your browser runs on a Solaris machine, otherwise just use the path look at the files with less or other tools) take a look at /uns/share/BETA/demo, starting with .../demo/basiclib/betaenv, then perhaps making a small excursion to .../demo/guienv/ which presents a list of selectable text entries in an X window.

Finally, we should mention that the BETA compiler makes its own dependency analysis, so it is only necessary to specify the main module (your "program"), and there are no make files. Whatever modules you are using will be looked up (and checked and compiled if necessary; standard libraries should never need recheck or recompilation).

Signed by: Last Modified: 1-Dec-98