                        SIMULATOR
                        =========
The files in this directory define the simulator structure and operations.

                     #################
                     SIMULATOR MEMORY
                     #################

mctypes.h
=========
  Defines machine types.

abstmachine.h{c}
===============
  Defines the structures of simulator memory and their access functions. 
  a. simulator registers
  b. simulator memory component: heap, stack, trail and pdl
  c. various records appearing on the stack:
     environment record, choice point record and implication/import record
  d. live list operations (implemented as an linked list)
  e. run-time symbol table access functions
  f. over-flow and other error checking functions.
  g. variables referring to builtin code implementing logic predicates
     (set up in the simulator initialization phase (siminit.h{c}).

  Please refer to implnotes/simulator/dataareas.txt for the details
  of those components.



trail.h{c}
==========
  Defines the data structures appearing on the trail and the trail operations.

                    ###############
                     DATA FORMATS
                    ###############

dataformats.h{c}
===============
  Defines the encoding of items that could appear on simulator heap:
  types, terms and disagreement pairs. 
  Please refer to implnotes/simulator/dataformats.txt for details.

mcstrings.h{c}
==============
  Defines the machine string structure, and operations on them

                   ################
                     NORMALIZATION
                   ################
hnorm.h{c}
=========
  Defines the normalization processes.
  The interface functions are:
  HN_hnorm    : head normalization of a given term
  HN_hnormOcc : head normalization of a given term with occurs check. 
                (Needed by compiled unifications)
  HN_lnorm    : full normalization of a given term  


hnormlocal.h{c}
==============
  Defines auxiliary functions that are exclusively used in the (head)
  normalization routines.


                  ##################
                    UNIFICATION
                  ##################

hopu.h{c}
========
  Defines the higher-order pattern unification processes.
  The interface functions are:
  HOPU_patternUnify: 
  -----------------
    Interpretively solve all the pattern unification problems delayed on 
    the PDL and live list.
  HOPU_patternUnifyPair:
  --------------------- 
    Interpretively pattern unify a given pair of terms which is invoked from
    the compiled form of unification.

  HOPU_globalizeCopyRigid: 
  -----------------------
    Globalize the given rigid term and make a binding for the given variable. 
   (Needed by compiled unification)

  HOPU_globalizeFlex:
  ------------------
    Globalize a given flex term (Needed by compiled unification)

  HOPU_flexNestedSubstC:
  ---------------------
    Try to find the (partial) structure of the substitution for a flex head  
    of a LLambda term corresponding to an internal flex term which is not    
    known to be LLambda in the compiled form of pattern unification.        

  HOPU_rigNestedSubstC:
  ---------------------
    Try to find the (partial) binding of the head of a flex term when        
    unifying it with a rigid term possible under abstractions in the compiled
    form of pattern unification.                                             
  

types.h{c}
==========
    Defines the interpretive type unification (first-order unification) 
    processes.
    The interface functions are:
    TY_typesUnify:     interpretively unify the pairs of types on the PDL stack
    TY_pushPairsToPDL: push pairs of types onto the PDL stack
    TY_typesOccC:      Occurs-check types needed by the compiled unification.
                           

                   ##########################
                    INSTRUCTION INTERPRETOR
                   ##########################

siminstr.h{c}
=============
    Defines the actions taken by every instruction.

siminstralocal.h{c}
===================
    Defines auxiliary functions used by siminstr.c (get- and unify- 
    instructions).

instracess.h
============
   Defines macros for retrieving the arguments of instructions depending on
   their category information (used by siminstr.c).


simdispatch.h{c}
================
    Defines the dynamic dispatching table for instructions. (simdispatch.c is
    automatically generated.)


simulator.h{c}
==============
    Defines the simulate functions as the top-level control of executing 
    instructions.


siminit.h{c}
============
    Defines the simulator initialization and re-initialization functions.


                      ######
                        IO
                      ######

io-datastructures.h{c}
====================
    Defines the free term variable table and its access functions needed by
    reading and printing terms.


printterm.h{c}
==============
    Defines routines for printing out answer substitutions and remaining pairs
    on disagreement list.                    