Sirocco.ThreeC4
Copyright Ó 1986, 1987 by Xerox Corporation. All rights reserved.
Bhargava, August 12, 1986 11: 24: 02 pm PDT
Demers, December 29, 1986 8:05:56 pm PST
Bill Jackson (bj) August 26, 1987 3:34:17 pm PDT
SiroccoParser: Control Module;
SiroccoCG: Module = Begin
These types are defined here as a convienience;
because of circularity, placing it here reduces the interface count by one.
BaseTypeKind: EnumeratedBaseType =
{ bool, card16, card32, int16, int32, sink, source, string, unspec };
Generic: EnumeratedBaseType =
{ array, bool, card16, card32, choice, enum, error, int16, int32, proc, record, seq, sink, source, string, unspec };
ItemKind: EnumeratedBaseType =
{ type, const };
ValueKind: EnumeratedBaseType =
{ bool, constructor, grouping, negation, null, number, string, variant };
Tokens
{ "ARRAY" "BEGIN" "BOOLEAN" "CARDINAL" "CHOICE" "DEPENDS" "END" "ERROR" "FALSE" "INTEGER" "LONG" "OF" "PROCEDURE" "PROGRAM" "RECORD" "REPORTS" "RETURNS" "SEQUENCE" "SINK" "SOURCE" "STRING" "TRUE" "TYPE" "UNSPECIFIED" "UPON" "VERSION"
"(" ")"
"[" "]"
"{" "}"
":" "." ";" "=" "=>" "," "-" }: SimpleTokens;
id: GenericToken = "tokenID";
decimal: GenericToken = "tokenDECIMAL";
hex: GenericToken = "tokenHEX";
octal: GenericToken = "tokenOCTAL";
rope: GenericToken = "tokenROPE";
Productions
export: NonTerminal Builds Program;
for export ← program "."
Build program;
program: NonTerminal Builds Program;
for program ← id ":" "PROGRAM" decimal.pgm "VERSION" decimal.version "=" "BEGIN" dependency declarationlist "END"
Build Program.export[id, decimal.pgm, decimal.version, dependency, declarationlist];
dependency: NonTerminal Builds ImportList;
for dependency.empty ←
Build ImportList.empty[];
for dependency.imports ← "DEPENDS" "UPON" importlist ";"
Build importlist;
importlist: NonTerminal Builds ImportList;
for importlist.one ← import
Build ImportList.more[ImportList.empty[ [import, import) ], import];
for importlist.more ← importlist "," import
Build ImportList.more[importlist, import];
import: NonTerminal Builds Import;
for import ← id "(" decimal.pgm ")" "VERSION" decimal.version
Build Import.interface[id, decimal.pgm, decimal.version];
declarationlist: NonTerminal Builds DeclarationList;
for declarationlist.a ←
Build DeclarationList.empty[];
for declarationlist .b ← declarationlist declaration
Build DeclarationList.more[declarationlist, declaration];
declaration: NonTerminal Builds Declaration;
for declaration.type ← id ":" "TYPE" "=" type";"
Build Declaration.type[id, type];
for declaration.constant ← id ":" type "=" constant ";"
Build Declaration.constant[id, type, constant];
for declaration.id ← id.name ":" type "=" id.constant ";"
Build Declaration.constant[id.name, type, Constant.deref[id.constant]];
type: NonTerminal Builds Type;
for type.simple ← simpletype
Build simpletype;
for type.construction ← construction
Build construction;
simpletype: NonTerminal Builds Type;
for simpletype.reference ← reference
Build reference;
for simpletype.primitive ← primitive
Build primitive;
reference: NonTerminal Builds Type;
for reference.alias ← id
Build Type.alias[id];
for reference.import ← id.interface "." id.item
Build Type.import[id.interface, id.item];
primitive: NonTerminal Builds Type;
for primitive.bool ← "BOOLEAN"
Build Type.bool[];
for primitive.card16 ← "CARDINAL"
Build Type.card16[];
for primitive.card32 ← "LONG" "CARDINAL"
Build Type.card32[];
for primitive.int16← "INTEGER"
Build Type.int16[];
for primitive.int32 ← "LONG" "INTEGER"
Build Type.int32[];
for primitive.sink ← "SINK"
Build Type.sink[];
for primitive.source ← "SOURCE"
Build Type.source[];
for primitive.string ← "STRING"
Build Type.string[];
for primitive.unspec ← "UNSPECIFIED"
Build Type.unspec[];
construction: NonTerminal Builds Type;
for construction.array ← "ARRAY" mandatory "OF" simpletype
Build Type.array[mandatory, simpletype];
for construction.choice ← "CHOICE" reference "OF" "{" union "}"
Build Type.choice[reference, union];
for construction.enum ← "{" enumeration "}"
Build Type.enum[enumeration];
for construction.error ← "ERROR" arguments
Build Type.error[arguments];
for construction.proc ← "PROCEDURE" arguments results errors
Build Type.proc[arguments, results, errors];
for construction.record ← "RECORD" "[" fieldlist"]"
Build Type.record[fieldlist];
for construction.null ← "RECORD" "[" "]"
Build Type.null[];
for construction.seq ← "SEQUENCE" optional "OF" simpletype
Build Type.seq[optional, simpletype]; --Can be empty
constant: NonTerminal Builds Constant;
for constant.value ← value
Build value;
for constant.complex ← complexvalue
Build complexvalue;
for constant.choiceconstant ← id constant
Build Constant.choice[id, constant];
for constant.choiceid ← id.choice id.value
Build Constant.choice[id.choice, Constant.deref[id.value]];
for constant.import ← id.interface "." id.item
Build Constant.import[id.interface, id.item];
RefConst (id.id) as well as id id ... id.id
value: NonTerminal Builds Constant;
for value.true ← "TRUE"
Build Constant.true[];
for value.false ← "FALSE"
Build Constant.false[];
for value.number ← number
Build Constant.number[number];
for value.inverted ← "-" number
Build Constant.inverted[number];
for value.string ← rope
Build Constant.string[rope];
complexvalue: NonTerminal Builds Constant;
for complexvalue.grouping ← "[" grouping "]"
Build Constant.grouping[grouping];
for complexvalue.constructor ← "[" constructor "]"
Build Constant.constructor[constructor];
for complexvalue.null ← "[" "]"
Build Constant.empty[];
optional: NonTerminal Builds Constant;
for optional.nonempty ← constant
Build constant;
for optional.alias ← id
Build Constant.deref[id];
for optional.empty ←
Build Constant.unbounded[];
mandatory: NonTerminal Builds Constant;
for mandatory.value ← constant
Build constant;
for mandatory.alias ← id
Build Constant.deref[id];
enumeration: NonTerminal Builds Enumeration;
for enumeration.one ← keyindexpair
Build keyindexpair;
for enumeration.more ← keyindexpair "," enumeration
Build Enumeration.more[keyindexpair, enumeration];
keyindexpair: NonTerminal Builds Enumeration;
for keyindexpair ← id "(" mandatory ")"
Build Enumeration.one[id, mandatory];
union: NonTerminal Builds Union;
for union.one ← selector
Build selector;
for union.more ← selector "," union
Build Union.more[selector, union];
selector: NonTerminal Builds Union;
for selector.one ← namelist "=>" simpletype
Build Union.one[namelist, simpletype];
for selector.two ← namelist "(" number ")" "=>" simpletype
Build Union.one[namelist, simpletype];
fieldlist: NonTerminal Builds FieldList;
for fieldlist.field ← field
Build FieldList.more[field, FieldList.empty[ [field, field) ]];
for fieldlist.more ← field "," fieldlist
Build FieldList.more[field, fieldlist];
field: NonTerminal Builds FieldList;
for field ← namelist ":" simpletype
Build FieldList.one[namelist, simpletype];
grouping: NonTerminal Builds Grouping;
for grouping.const ← constant
Build Grouping.one[constant];
for grouping.id ← id
Build Grouping.one[Constant.deref[id]];
for grouping.cmore ← constant "," grouping
Build Grouping.more[constant, grouping];
for grouping.imore ← id "," grouping
Build Grouping.more[Constant.deref[id], grouping];
constructor: NonTerminal Builds Constructor;
for constructor.one ← binding
Build Constructor.one[binding];
for constructor.more ← binding "," constructor
Build Constructor.more[binding, constructor];
binding: NonTerminal Builds Binding;
for binding.id ← namelist ":" id
Build Binding[namelist, Constant.deref[id]];
for binding.const ← namelist ":" constant
Build Binding[namelist, constant];
arguments: NonTerminal Builds FieldList;
for arguments.empty ←
Build FieldList.empty[];
for arguments.list ← "[" fieldlist "]"
Build fieldlist;
for arguments.null ← "[" "]"
Build FieldList.empty[];
results: NonTerminal Builds FieldList;
for results.empty ←
Build FieldList.empty[];
for results.list ← "RETURNS" "[" fieldlist "]"
Build fieldlist;
for results.null ← "RETURNS" "[" "]"
Build FieldList.empty[];
errors: NonTerminal Builds NameList;
for errors.empty ←
Build NameList.empty[];
for errors.list ← "REPORTS" "[" namelist "]"
Build namelist;
for errors.null ← "REPORTS" "[" "]"
Build NameList.empty[];
namelist: NonTerminal Builds NameList;
for namelist.one ← id
Build NameList.one[id];
for namelist.more ← id "," namelist
Build NameList.more[id, namelist];
number: NonTerminal Builds Number;
for number.decimal ← decimal
Build Number.decimal[decimal];
for number.octal ← octal
Build Number.octal[octal];
for number.hex ← hex
Build Number.hex[hex]
End;
SiroccoAG1: Module = Begin
Program
Program.export: AbstractProduction [ id.export, decimal.pgm, decimal.version, ImportList, DeclarationList ];
ImportList
ImportList.empty: AbstractProduction [] ;
ImportList.more: AbstractProduction [ ImportList, Import ];
Import
Import.interface: AbstractProduction [ id.interface, decimal.pgm, decimal.version ];
DeclarationList
DeclarationList.empty: AbstractProduction [ ];
DeclarationList.more: AbstractProduction [ DeclarationList, Declaration ];
Declaration
Declaration.type: AbstractProduction [ id, Type ];
Declaration.constant: AbstractProduction [ id, Type, Constant ];
Type
References
Type.alias: AbstractProduction [ id ];
Type.import: AbstractProduction [ id.interface, id.item ];
Primitives
Type.bool: AbstractProduction [ ];
Type.card16: AbstractProduction [ ];
Type.card32: AbstractProduction [ ];
Type.int16: AbstractProduction [ ];
Type.int32: AbstractProduction [ ];
Type.sink: AbstractProduction [ ];
Type.source: AbstractProduction [ ];
Type.string: AbstractProduction [ ];
Type.unspec: AbstractProduction [ ];
Constructions
Type.array: AbstractProduction [ Constant, Type ];
Type.seq: AbstractProduction [ Constant, Type ];
Type.enum: AbstractProduction [ Enumeration ];
Type.error: AbstractProduction [ FieldList ];
Type.record: AbstractProduction [ FieldList ];
Type.null: AbstractProduction [ ];
Type.proc: AbstractProduction [ FieldList.arg, FieldList.res, NameList ];
Type.choice: AbstractProduction [ Type, Union ];
End;
SiroccoAG2: Module = Begin
Constant
References
Constant.deref: AbstractProduction [ id ];
Constant.import: AbstractProduction [ id.interface, id.item ];
Primitives
Constant.empty: AbstractProduction [ ];
Constant.false: AbstractProduction [ ];
Constant.true: AbstractProduction [ ];
Constant.unbounded: AbstractProduction [ ];
Constant.inverted: AbstractProduction [ Number ];
Constant.number: AbstractProduction [ Number ];
Constant.string: AbstractProduction [ rope ];
Constructions
Constant.choice: AbstractProduction [ id, Constant ];
Constant.constructor: AbstractProduction [ Constructor ];
Constant.grouping: AbstractProduction [ Grouping ];
Enumeration
Enumeration.one: AbstractProduction [ id, Constant ];
Enumeration.more: AbstractProduction [ Enumeration.value, Enumeration.next ];
Union
Union.one: AbstractProduction [ NameList, Type ];
Union.more: AbstractProduction [ Union.value, Union.next ];
FieldList
FieldList.empty: AbstractProduction [ ];
FieldList.one: AbstractProduction [ NameList, Type ];
FieldList.more: AbstractProduction [ FieldList.value, FieldList.rest ];
Grouping
Grouping.one: AbstractProduction [ Constant ];
Grouping.more: AbstractProduction [ Constant, Grouping ];
Constructor
Constructor.one: AbstractProduction [ Binding ];
Constructor.more: AbstractProduction [ Binding, Constructor ];
Binding
Binding: AbstractProduction [ NameList, Constant ];
NameList
NameList.empty: AbstractProduction [ ];
NameList.one: AbstractProduction [ id ];
NameList.more: AbstractProduction [ id, NameList ];
Number
Number.decimal: AbstractProduction [ decimal ];
Number.hex: AbstractProduction [ hex ];
Number.octal: AbstractProduction [ octal ];
End;
SiroccoAT: Module = Begin
Program: AbstractType [ MakeSymbolTable ];
ImportList: AbstractType [ BuildRIB ];
Import: AbstractType [ BuildScope ];
DeclarationList: AbstractType [ BuildItemTable, BuildTypeGraph ];
Declaration: AbstractType [ BuildItem, BuildNamedItem ];
Type: AbstractType [ BuildTGN ];
Enumeration: AbstractType [ BuildTGN ];
Union: AbstractType [ BuildTGN ];
FieldList: AbstractType [ BuildTGN ]; -- I want a FIELD type (ajd)
Constant: AbstractType [ BuildAbstractValue ];
Grouping: AbstractType [ BuildAbstractValue ];
Constructor: AbstractType [ BuildAbstractValue ];
Binding: AbstractType [ BuildAbstractValue ];
NameList: AbstractType [ BuildTGN ];
Number: AbstractType [ BuildAbstractValue ];
Operations
MakeSymbolTable: TreeRecursiveFunction [ Tree ]
Returns
[ ROPE.name, CARD.pgm, CARD.version, TypeGraph.flat ];
BuildRIB: TreeRecursiveFunction [ Tree ]
Returns
[ RIB.rib ];
BuildScope: TreeRecursiveFunction [ Tree ]
Returns
[ SCOPE.scope ];
BuildItemTable: TreeRecursiveFunction [ Tree ]
Returns
[ SCOPE.scope ];
BuildItem: TreeRecursiveFunction [ Tree ]
Returns
[ ITEM.item ];
BuildTypeGraph: TreeRecursiveFunction [ Tree, CONTEXT.context ]
Returns
[ TypeGraph.graph ];
BuildNamedItem: TreeRecursiveFunction [ Tree, CONTEXT.context ]
Returns
[ ROPE.name, TypeGraphNode.node, AbstractValue.value ];
BuildTGN: TreeRecursiveFunction [ Tree, CONTEXT.context ]
Returns
[ TypeGraphNode.node ];
BuildAbstractValue: TreeRecursiveFunction [ Tree, CONTEXT.context ]
Returns
[ AbstractValue.value ];
End;
SiroccoBase: Module = Begin
Types
BOOLEAN: CedarType;
CARDINAL: CedarType;
CARD: CedarType;
NAT: CedarType;
INT: CedarType;
AbstractValue: CedarType From SiroccoPrivate;
CComponent: CedarType From SiroccoPrivate;
CONTEXT: CedarType From SiroccoPrivate;
CType: CedarType From SiroccoPrivate;
FunctionList: CedarType From SiroccoPrivate;
InterfaceItem: CedarType From SiroccoPrivate;
ITEM: CedarType From SiroccoPrivate;
MEMO: CedarType From SiroccoPrivate;
MemoList: CedarType From SiroccoPrivate;
Key: CedarType From SymTab;
ROPE: CedarType From Rope;
Ref: CedarType From SymTab;
RIB: CedarType From SiroccoPrivate;
SCOPE: CedarType From SiroccoPrivate;
TABLES: CedarType From SiroccoPrivate;
TypeGraph: CedarType From SiroccoPrivate;
TypeGraphNode: CedarType From SiroccoPrivate;
Val: CedarType From SymTab;
ValueGraph: CedarType From SiroccoPrivate;
Procs
Cat: CedarFunction [ROPE.a, ROPE.b, ROPE.c] Returns [ROPE.d] From Rope;
SharedReps [ROPE.a, ROPE.b, ROPE.c, ROPE.d];
Concat: CedarFunction [ROPE.a, ROPE.b] Returns [ROPE.c] From Rope;
Equal: CedarFunction [ROPE.a, ROPE.b] Returns [BOOLEAN] From Rope;
Length: CedarFunction [ROPE] Returns [INT] From Rope;
Nest: CedarFunction [ROPE.a, NAT.level] Returns [ROPE.b] From SiroccoPrivate;
NewFcn: CedarFunction [ROPE.name, ROPE.obj, INT.size] Returns [ROPE.out] From SiroccoPrivate;
RopeFromCard: CedarFunction [CARD] Returns [ROPE] From Convert;
RopeFromInt: CedarFunction [INT] Returns [ROPE] From Convert;
DupOps (Inline Implementions)
Since Casaba only understands INTs
card: BaseFunction [INT] Returns [CARD];
int: BaseFunction [CARD] Returns [INT];
nat: BaseFunction [INT] Returns [NAT];
values from tokens
TextFromID: BaseFunction [id] Returns [ROPE];
CardFromDecimal: BaseFunction [decimal] Returns [CARD];
CardFromOctal: BaseFunction [octal] Returns [CARD];
CardFromHex: BaseFunction [hex] Returns [CARD];
GetRopeFromRope: BaseFunction [rope] Returns [ROPE];
values / constant fcns
False: BaseFunction [ ] Returns [BOOLEAN];
True: BaseFunction [ ] Returns [BOOLEAN];
Arithmetic Operations
AddOne: BaseFunction [INT.arg] Returns [INT.res];
Add: BaseFunction [INT.a, INT.b] Returns [INT.c];
Subtract: BaseFunction [INT.a, INT.b] Returns [INT.c];
Convince Casaba that things are undamaged
Copy: BaseFunction [ROPE.arg, CType.arg, Constant.arg, TABLES.arg] Returns [ROPE.res, CType.res, Constant.res, TABLES.res];
CopyAll: BaseFunction [ROPE.arg, FunctionList.arg, TABLES.arg]
Returns
[ROPE.res, FunctionList.res, TABLES.res];
CopyCComponent: BaseFunction [CComponent.arg] Returns [CComponent.res];
CopyFunctionList: BaseFunction [FunctionList.arg] Returns [FunctionList.res];
CopyRope: BaseFunction [ROPE.a] Returns [ROPE.b];
CopyTables: BaseFunction [TABLES.arg] Returns [TABLES.res];
Hash Keys
CreateKey: BaseFunction [id] Returns [Key];
RopeFromKey: BaseFunction [Key] Returns [ROPE];
your basic noop!
Hash Table Operations
ImportItem: BaseFunction [TABLES, Key.interface, Key.item] Returns [InterfaceItem.enty];
grumpf! Fetch is in Rope, and Casaba does OPEN Rope, SymTab;
TypeNameForItem: BaseFunction [InterfaceItem.item] Returns [ROPE.type];
ConstantForItem: BaseFunction [InterfaceItem.item] Returns [ROPE.constant];
ValueFromName: BaseFunction [ROPE.constant] Returns [CARD.value];
CreateTables: BaseFunction Returns [TABLES];
DiskToTable: BaseFunction [ROPE.id, CARD.pgm, CARD.version] Returns [SCOPE.scope];
TableMerge: BaseFunction [TABLES.t1, TABLES.t2] Returns [TABLES]
SharedReps
[TABLES.t1, TABLES.t2];
Scopes, Ribs & Contexts
UpdateItem: BaseFunction [ TypeGraph.left, ROPE.name, TypeGraphNode.node, AbstractValue.value ] Returns [ TypeGraph.new ]
SharedReps
[ TypeGraphNode.node, AbstractValue.value ]
DamagedReps
[ TypeGraph.left ];
Context
CreateContext: BaseFunction [ RIB.rib, SCOPE.scope, ROPE.name, CARD.pgm, CARD.version] Returns [ CONTEXT.context ];
ItemFromContext: BaseFunction [ CONTEXT.context, ROPE.name ] Returns [ ITEM.item ]
SharedReps
[ ITEM.item ];
Scope
EmptyScope: BaseFunction [ ] Returns [ SCOPE.new ];
MakeItem: BaseFunction [ ROPE.name, INT.position, ItemKind.kind ]
Returns
[ ITEM.item ] SharedReps [ ROPE.name ];
ItemConcat: BaseFunction [ SCOPE.old, ITEM.item ] Returns [ SCOPE.new ]
SharedReps [ ITEM.item ] DamagedReps [ SCOPE.old ];
ItemFromScope: BaseFunction [ SCOPE.scope, ROPE.name ] Returns [ ITEM.item ]
SharedReps
[ ITEM.item ];
Ribs
EmptyRIB: BaseFunction [ ] Returns [ RIB.new ];
ScopeConcat: BaseFunction [ RIB.old, SCOPE.scope ] Returns [ RIB.new ]
SharedReps
[ SCOPE.scope ] DamagedReps [ RIB.old ];
ScopeFromRIB: BaseFunction [ RIB.rib, ROPE.name ] Returns [ SCOPE.scope ]
SharedReps
[ SCOPE.scope ];
Type Graph/Node Creators
Primitive Creators
CreateBaseTypeTGN:
BaseFunction
[ BaseTypeKind.kind ]
Returns
[ TypeGraphNode.node ];
CreateEmptyTGN: BaseFunction [ CONTEXT.context ] Returns [ TypeGraph.new ];
CreatePrimitiveTGN: BaseFunction [ Generic.class ] Returns [ TypeGraphNode.node ];
Primary Creators
CreateArrayTGN:
BaseFunction [ AbstractValue.length, TypeGraphNode.subtype ]
Returns [ TypeGraphNode.node ];
CreateChoiceTGN:
BaseFunction [ TypeGraphNode.ktype, TypeGraphNode.union ]
Returns [ TypeGraphNode.node ];
CreateDerefTGN:
BaseFunction [ CONTEXT.context, ROPE.item ]
Returns [ TypeGraphNode.node ];
CreateEnumerationTGN:
BaseFunction [ TypeGraphNode.enum ]
Returns [ TypeGraphNode.node ];
CreateErrorTGN:
BaseFunction [ TypeGraphNode.fieldlist ]
Returns [ TypeGraphNode.node ];
CreateLinkTGN:
BaseFunction [ CONTEXT.context, ROPE.interface, ROPE.item ]
Returns [ TypeGraphNode.node ];
CreateProcTGN:
BaseFunction [ TypeGraphNode.args, TypeGraphNode.results, TypeGraphNode.errors ]
Returns [ TypeGraphNode.node ];
CreateRecordTGN:
BaseFunction [ TypeGraphNode.fieldlist ]
Returns [ TypeGraphNode.node ];
CreateSequenceTGN:
BaseFunction [ AbstractValue.maxlength, TypeGraphNode.subtype ]
Returns [ TypeGraphNode.node ];
Secondary Creators
CreateFieldListTGN:
BaseFunction [ ROPE.tag, AbstractValue.ordinal ]
Returns [ TypeGraphNode.node ];
CreateUnionTGN:
BaseFunction [ TypeGraphNode.namelist, TypeGraphNode.type ]
Returns [ TypeGraphNode.node ];
CreateFieldTGN:
BaseFunction [ TypeGraphNode.namelist, TypeGraphNode.type ]
Returns [ TypeGraphNode.node ];
CreateEmptyFieldTGN:
BaseFunction [ ]
Returns [ TypeGraphNode.node ];
Concatination operators
FieldListTGNConcat:
BaseFunction [ TypeGraphNode.value, TypeGraphNode.next ]
Returns [ TypeGraphNode.node ];
UnionTGNConcat:
BaseFunction [ TypeGraphNode.value, TypeGraphNode.next ]
Returns [ TypeGraphNode.node ];
FieldTGNConcat:
BaseFunction [ TypeGraphNode.value, TypeGraphNode.next ]
Returns [ TypeGraphNode.node ];
Abstract Value Node Creators
Primary Creators
CreateNullAVN:
BaseFunction [ ]
Returns [AbstractValue.value];
CreateLogicalAVN:
BaseFunction [ BOOLEAN.b ]
Returns [ AbstractValue.value ];
CreateNumericalAVN:
BaseFunction [ CARD.num ]
Returns [ AbstractValue.value ];
CreateRopeAVN:
BaseFunction [ ROPE.r1 ]
Returns [ AbstractValue.value ];
Secondary Creators
CreateBindingAVN:
BaseFunction [ TypeGraphNode.node, AbstractValue.node ]
Returns [ AbstractValue.value ];
CreateConstructorAVN:
BaseFunction [ AbstractValue.node ]
Returns [ AbstractValue.value ];
CreateDerefAVN:
BaseFunction [ CONTEXT.context, ROPE.item ]
Returns [ AbstractValue.value ];
CreateGroupingAVN:
BaseFunction [ AbstractValue.node ]
Returns [ AbstractValue.value ];
CreateLinkAVN:
BaseFunction [ CONTEXT.context, ROPE.interface, ROPE.item ]
Returns [ AbstractValue.value ];
CreateNegativeAVN:
BaseFunction [ AbstractValue.old ]
Returns [ AbstractValue.value ];
CreateVariantAVN:
BaseFunction [ ROPE.id, AbstractValue.node ]
Returns [ AbstractValue.value ];
ConstructorAVNConcat:
BaseFunction [ AbstractValue.value, AbstractValue.next ]
Returns [ AbstractValue.node ];
GroupingAVNConcat:
BaseFunction [ AbstractValue.value, AbstractValue.next ]
Returns [ AbstractValue.node ];
Graph Searching
AssertTypeGraphAcyclic:
BaseFunction [ TypeGraph.graph ]
Returns [BOOLEAN.acyclic];
AssertValueGraphAcyclic:
BaseFunction [ TypeGraph.graph ]
Returns [ BOOLEAN.acyclic ];
Type Tree (lists) Operations
CheckCanonicalType: BaseFunction [ROPE.r1, ROPE.r2] Returns [BOOLEAN.same];
CheckResultsForSourceAndSink: BaseFunction [CComponent.results] Returns [BOOLEAN.ok];
CompareTypes: BaseFunction [CType.a, CType.b, TABLES] Returns [INT]; -- actually BOOLEAN
GetCType: BaseFunction [ROPE.id, CComponent, TABLES] Returns [CType, ROPE];
GetLengthOfCComponentList: BaseFunction [CComponent, INT.arg] Returns [INT.res];
SeeIfArrOrSeq: BaseFunction [CType.arg, INT, TABLES] Returns [CType.res, ROPE];
Canonical Type manipulation
GetCTypeFirstChild: BaseFunction [CType] Returns [CComponent];
MkCComponent: BaseFunction [ROPE.name, INT.valBinding, ROPE.typeBinding, CComponent.sibling] Returns [CComponent];
MkCType: BaseFunction [Generic.class, INT.bound, CComponent.firstChild]
Returns [CType];
MkNILCComponent: BaseFunction [] Returns [CComponent];
MkPrimitiveCType: BaseFunction [Generic.class] Returns [CType, ROPE.name];
Utility Functions
FetchFromTypeTable: BaseFunction [TABLES.arg, ROPE] Returns [CType];
GetObjectName: BaseFunction [ROPE.type, TABLES] Returns [ROPE.typeobject];
Remove: BaseFunction [ROPE.id, TABLES.arg] Returns [TABLES.res] DamagedReps [TABLES.arg];
SendError: BaseFunction [ROPE] Returns [CARD];
Work Table Functions
ClearWorkTable: BaseFunction [TABLES.arg] Returns [TABLES.res] DamagedReps [TABLES.arg];
EnterNamesIntoWorkTable: BaseFunction [CType, TABLES.arg] Returns [TABLES.res] DamagedReps [TABLES.arg];
FillWorkTable: BaseFunction [CType, TABLES.arg] Returns [TABLES.res] DamagedReps [TABLES.arg];
Misc Functions
LocalConstantToRope: BaseFunction [ROPE.id, ROPE.constantType, TABLES.arg]
Returns [ROPE.constant, TABLES.res] DamagedReps [TABLES.arg];
CanonicalLocalReferenceType: BaseFunction [ROPE.id, TABLES.arg] Returns [ROPE, CType, TABLES.res] DamagedReps [TABLES.arg];
GetConstantType: BaseFunction [ROPE.id, TABLES.arg] Returns [ROPE, CType, Constant, TABLES.res] DamagedReps [TABLES.arg];
TryToCoerceNumber: BaseFunction [CType, CARD] Returns [INT];
Predicates
Array: BaseFunction [ROPE.type, TABLES] Returns [BOOLEAN];-- Sees if type is array
CheckIfEmpty: BaseFunction [TABLES.arg] Returns [BOOLEAN.empty];
CompareClass: BaseFunction [CType, Generic.b] Returns [CComponent];
InsureErrorType: BaseFunction [ROPE.id, TABLES.arg] Returns [TABLES.res];
IsEnumerationConstant: BaseFunction [CType, ROPE.id] Returns [INT];
NotEnumeration: BaseFunction [CType] Returns [BOOLEAN];
SeeIfDuplicated: BaseFunction [TABLES.arg, ROPE.id, CARD] Returns [TABLES.res] DamagedReps [TABLES.arg];
SeeIfInt: BaseFunction [CType] Returns [BOOLEAN];
Unknown Purpose...
AddFunctionList: BaseFunction [Val, FunctionList.arg] Returns [FunctionList.res] DamagedReps [FunctionList.arg];
AddFunctionToTable: BaseFunction [Val, FunctionList, TABLES.arg] Returns [TABLES.res] DamagedReps [TABLES.arg];
ConsFunctionList: BaseFunction [FunctionList.arg, ROPE] Returns [FunctionList.res] DamagedReps [FunctionList.arg];
GetTypeOfComponent: BaseFunction [ROPE.id, ROPE.arg, TABLES] Returns [ROPE.typeOf];
GetTypeOfElement: BaseFunction [ROPE.arg, TABLES] Returns [ROPE.TypeOfElement];
TypeOfSequence: BaseFunction [ROPE.sequenceName, TABLES] Returns [ROPE.typeOf];
End.