CDSimpleRulesBackdoor.mesa (part of ChipNDale)
Copyright © 1985, 1986, 1987 by Xerox Corporation. All rights reserved.
Created by Christian Jacobi, July 5, 1985 4:58:37 pm PDT
Last edited by: Christian Jacobi, April 20, 1987 6:40:34 pm PDT
DIRECTORY
CD, CDSimpleRules, Rope;
CDSimpleRulesBackdoor: CEDAR DEFINITIONS =
BEGIN
Rules:
TYPE =
REF;
--UNION of ATOM and REF ImplementationRulesRep
IRules: TYPE = REF RulesRep;
RulesRep:
TYPE =
RECORD [
key: ATOM←NIL,
technology: CD.Technology←NIL,
minWidth: LayerRuleProc←NIL,
minSpace: Layer2RuleProc←NIL,
maxWidth: LayerRuleProc←NIL,
getValue: ValueProc←NIL,
getRuleDescription: GetRuleDescriptionProc←NIL,
contact: ContactProc←NIL,
largeContact: LargeContactProc←NIL,
inherit: Rules←NIL, --at registration time
properties: CD.PropRef←NIL,
data: REF←NIL
];
LayerRuleProc: TYPE = PROC [rules: Rules, layer: CD.Layer] RETURNS [CD.Number];
Layer2RuleProc: TYPE = PROC [rules: Rules, l1, l2: CD.Layer] RETURNS [CD.Number];
ValueProc: TYPE = PROC [rules: Rules, id: ATOM] RETURNS [CD.Number];
GetRuleDescriptionProc: TYPE = PROC [rules: Rules, id: ATOM] RETURNS [Rope.ROPE];
ContactProc: TYPE = PROC [rules: Rules, l1, l2: CD.Layer] RETURNS [CD.Object];
LargeContactProc: TYPE = PROC [rules: Rules, design: CD.Design, size: CD.Position, l1, l2: CD.Layer] RETURNS [CD.Object];
GetRulesRep:
PROC [rules: Rules]
RETURNS [IRules];
-- Useful to convert atom into REF ImplementationRulesRep
-- raises NotKnown if rules are not implemented
RegisterRules:
PROC [r: RulesRep];
-- Registrations can be repeated and features can be registered separately
-- but technology must not contradict.
RegisterLayerName:
PROC [name:
REF, layer:
CD.Layer, technology:
CD.Technology←
NIL];
-- Registers more names for a layer
RegisterTechnologyName:
PROC [name:
REF, technology:
CD.Technology];
-- Registers more names for a technology
END.