COMPILER TESTING REQUIREMENTS
=============================

The following are conceptual requirements for various parts of the compiler.

Parsing:
  Tests should be added that have constants of all fixities and precedences
  in them.

  Tests hould be added that have pervasive constant redefinitions for constants
  that may be redefined, and those that may not.

  List Syntax:
    The comma operator should be interpreted as a list separator when it is
    immediately enclosed in brackets.

    The commma operator should be interpreted as the conjunction operator in all
    other cases.

Type Checking:

  Variable abstractions should be lexically scoped.

  Overloaded Operators:
    The type of an overloaded operator should be set to the default if it is
    not used in a manner that would narrow the type.  For example, if + is used
    on a variable only, it should default to int -> int -> int.

    All occurences of an overloaded operator must be replaced by references to the
    specialized operator.  In particular, overloaded operators should not appear
    past the parsing phase (described in compiler_module_interfaces).

    Overloaded operators may only have a type consisten with the type allowed
    for them.  In particular, the type of an operator like "+" should never be
    bound to anything other than int -> int -> int or real -> real -> real,
    even though they are in some ways start with a variable type A -> A -> A.

Symbol Table Annotations:
  All constants must have a type declared at least once.

  No constant may have two different types declared.
  
  Fixities and Precedences:
    A constant should never have different fixities assigned to it.
    A constant should never have different precedences assigned to it.

  Local:
    A constant marked local in a module must not appear in the module's
    signature.

    A constant may not be marked local and any other declaration (exportdef,
    useonly).

  Exportdef:
    A constant marked exportdef in a module must also be marked exportdef in
    the module's signature.

    A constant marked exportdef may not also be marked useonly.
    A constant marked exportdef must be of predicate type.

  Useonly:
    A constant marked useonly may not also be marked exportdef.
    A constant marked useonly must be of predicate type.
    A constant marked useonly must not have clause definitions.

Separate Compilation:
  use_sig:
    All constants marked as exportdef in the used signature should be marked
    as useonly in the using signature.

    All non-exportdef constants should appear in the table of the using
    signature with the same properties as they have in the used signature.
    
  accum_sig:
    All constants in the accumulated signature should appear in the accumulating
    signature with the same properties as they have in the accumulated signature.

  accumulate, import:
    All constants in the accumulated signature should be appear in the accumulating
    module as local unless there is a corresponding declaration in the accumulating
    module's signature.
