-- ChipExpand.mesa

-- last modified by E. McCreight, July 14, 1982  9:35 PM
-- written by E. McCreight, March 11, 1982  4:48 PM

DIRECTORY
  CellInstPQ,
  ChipNetDefs,
  ChipWire,
  LeftFeaturePQ,
  ppdefs,
  RightFeaturePQ;

ChipExpand: DEFINITIONS =
  BEGIN OPEN ppdefs, ChipNetDefs;

  MakeInstance: PROCEDURE[item: ItemRef,
    slice: ChipWire.SlicePtr,
    futureFeatures: LeftFeaturePQ.LeftFeaturePQHandle,
    presentFeatures: RightFeaturePQ.RightFeaturePQHandle,
    cellQ, deadCellQ: CellInstPQ.CellInstPQHandle];

  ExitInstance: PROCEDURE[inst: InstancePtr];

  CheckClusters: PROCEDURE[call: CellCallPtr];
    -- removes satisfied MustConnect's

  MakeProto: PROCEDURE[ob: obPtr,
    locNumScale: LocNumScale ← lambdaRelative,
    name: STRING ← NIL] RETURNS[c: ProtoPtr];

  ProtoSeq: PROCEDURE[inst: InstancePtr]
    RETURNS[ListPtrSeqPtr];

  NearestCellInstance: PROCEDURE[p: InstancePtr]
    RETURNS[c: CellCallPtr];

  joinTo: PRIVATE LONG POINTER TO netPtr;

  xstrInst: PRIVATE XstrCallPtr;

  exXstr0, exPXstr0, exAXstr0, exPu0, exBC0,
    exBuC0:
    PRIVATE drProc;

  ExtractorFeatureProc: PRIVATE TYPE = RECORD[
    p: PROCEDURE[x1, y1, x2, y2: locNum, lev: ExtractLevel]];

  ExtractorFeature: PRIVATE ExtractorFeatureProc;
    -- Mesa can't handle an exported procedure variable

  END. -- of ChipExpand