lotus



previous page: B03) Why does getInt followed by getLine not necessarily work as expected?
  
page up: BETA Programming Language FAQ
  
next page: B05) What do the ( idx+ ), etc. comments mean?

B04) What is the rationale behind the Mjolner System file directory structures?




Description

This article is from the FAQ, by with numerous contributions by others.

B04) What is the rationale behind the Mjolner System file directory structures?

This entry describes the file structure of the Mjolner System. The entry is
intended as an illustration of one efficient way to structure the files of a
BETA development project. At the same time, this file structure is used all
over the existing Mjolner System to structure the various subsystems of the
Mjolner System.

Let us assume that the development project is called odin, and that it
consists of (at least) three subprojects, called brage, vidar, and vale.

We would then define the following file structure (brage/ indicates that
brage is the name of a subdirectory):

   odin --+-- brage/
          |
          +-- vidar/
          |
          +-- vale/

Each of the three subprojects may exists in different versions, reflecting
the development history. These versions are kept in separate subdirectories
for each subproject. Let us illustrate with vidar (having versions 1.0, 1.1,
and 1.2):

   vidar -+-- v1.0/
          |
          +-- v1.1/
          |
          +-- v1.2/

A configuration of odin now consists of the combination of the corresponding
versions of the subprojects.

Each version of each subproject has the following directory structure (here
illustrated with the 1.1 version):

   v1.1 --+-- F1.bet
          |
          +-- F2.bet
          |
          +-- ...
          |
          +-- Fn.bet
          |
          +-- private/
          |
          +-- demo/
          |
          +-- test/
          |
          +-- (* ast files *)
          |
          +-- (* code directories *)

The Fi.bet files contain the public interface files for the v1.1 version of
the subproject.

The private subdirectory contains the implementation fragments for the
Fi.bet interface files (see later).

The demo subdirectory contains demo programs illustrating the usage of this
subproject.

The test subdirectory contains programs for testing the functionality of
this subproject.

The (* ast files *) indicates that there will be an Fi.ast file (or an
Fi.astL for Intel-based systems) for each Fi.bet, containing the abstract
syntax tree (AST) representation of the Fi.bet.

The (* code directories *) indicates that there will be one subdirectory for
each machine type. Currently, the possible subdirectories are: sun4s, sgi,
hpux9pa, ppcmac, nti, and linux. There may be one subdirectory of each
machine type.

The substructure consisting of (* ast files *) and (* code directories *) is
shared by ALL directories, containing compiled BETA source files, and will
therefore not be mentioned further below.

The demo and test subdirectories may be further structured, possibly with a
subdirectory for each interface file Fi, but may also follow different
layouts.

The private subdirectory is divided into the following substructure:

   private -+-- F1Body.bet
            |
            +-- F2Body.bet
            |
            +-- ...
            |
            +-- FnBody.bet
            |
            +-- external/
            |
            +-- (* ast files *)
            |
            +-- (* code directories *)

where FiBody.bet contains the implementation fragments for the interface
files.

The FiBody.bet files may be machine-independent implementations or
machine-dependent implementations. The FiBody.bet files therefore follow the
following naming convention:

FiBody.bet
is the name of a machine-independent implementation
Fi_macBody.bet
is the name of a machine-dependent implementation(here for macintosh)

In most cases, there exists one implementation file for each interface file,
but for large (or complex) interface files, multiple implementation files
may exist (apart from the different machine dependent implementation files).

The external subdirectory contains non-BETA source files (such as C source
code), and other files which are not used directly by the Mjolner System.
The directory structure of external follows the conventions of the non-BETA
system used (e.g. the C compiler).

 

Continue to:















TOP
previous page: B03) Why does getInt followed by getLine not necessarily work as expected?
  
page up: BETA Programming Language FAQ
  
next page: B05) What do the ( idx+ ), etc. comments mean?