Module GlobalData

module GlobalData: sig .. end
Module to contain global class hierarchy type declarations


Module to contain global class hierarchy type declarations
type class_data = {
   known : StringModules.StringSet.t; (*Set of known class names*)
   classes : Ast.class_def StringModules.lookup_map; (*class name -> class def map*)
   parents : string StringModules.lookup_map; (*class name -> parent name map*)
   children : string list StringModules.lookup_map; (*class name -> children list map*)
   variables : (Ast.class_section * string) StringModules.lookup_table; (*class name -> var name -> (section, type) map*)
   methods : Ast.func_def list StringModules.lookup_table; (*class name -> method name -> func_def list map*)
   refines : Ast.func_def list StringModules.lookup_table; (*class name -> host.refinement -> func_def list map*)
   mains : Ast.func_def StringModules.lookup_map; (*class name -> main map*)
   ancestors : string list StringModules.lookup_map; (*class name -> ancestor list (given to Object)*)
   distance : int StringModules.lookup_table; (*subtype -> supertype -> # hops map*)
   refinable : Ast.func_def list StringModules.lookup_table; (*class -> host -> refinements (in subclasses)*)
}
A full class record table as a type
type class_data_error = 
| HierarchyIssue of string
| DuplicateClasses of string list
| DuplicateVariables of (string * string list) list
| DuplicateFields of (string * (string * string) list) list
| UnknownTypes of (string * (string * string) list) list
| ConflictingMethods of (string * (string * string list) list) list
| ConflictingInherited of (string * (string * string list) list) list
| PoorlyTypedSigs of (string * (string * string option * (string * string) list) list) list
| Uninstantiable of string list
| ConflictingRefinements of (string * (string * string list) list) list
| MultipleMains of string list
All the different types of non-compiler errors that can occur (programmer errors)