DIRECTORY CD, CDLayers, CDSimpleRules, CDSimpleRulesBackdoor, DesignRules, Rope; XRulesImpl: CEDAR PROGRAM IMPORTS CDLayers, CDSimpleRules, CDSimpleRulesBackdoor, DesignRules = BEGIN IRules: TYPE = CDSimpleRulesBackdoor.IRules; SRules: TYPE = CDSimpleRules.Rules; SMinWidth: PROC [rules: SRules, layer: CD.Layer] RETURNS [w: CD.Number] = { ir: IRules ~ CDSimpleRulesBackdoor.GetRulesRep[rules]; w _ DesignRules.MinWidth[NARROW[ir.data], CDLayers.AbstractToPaint[layer] ! DesignRules.DesignRuleError => {w_0; CONTINUE} ].w; }; SMaxWidth: PROC [rules: SRules, layer: CD.Layer] RETURNS [w: CD.Number] = { ir: IRules ~ CDSimpleRulesBackdoor.GetRulesRep[rules]; w _ DesignRules.MaxWidth[NARROW[ir.data], CDLayers.AbstractToPaint[layer] ! DesignRules.DesignRuleError => {w_0; CONTINUE} ].w; }; SMinSpace: PROC [rules: SRules, l1, l2: CD.Layer] RETURNS [w: CD.Number] = { ir: IRules ~ CDSimpleRulesBackdoor.GetRulesRep[rules]; w _ DesignRules.MinSpace[NARROW[ir.data], CDLayers.AbstractToPaint[l1], CDLayers.AbstractToPaint[l2] ! DesignRules.DesignRuleError => {w_0; CONTINUE} ].s; }; SGetValue: PROC [rules: SRules, id: ATOM] RETURNS [v: CD.Number] = { ir: IRules ~ CDSimpleRulesBackdoor.GetRulesRep[rules]; v _ DesignRules.GetScaledValue[NARROW[ir.data], id ! DesignRules.DesignRuleError => ERROR CDSimpleRules.NotKnown ].v; }; SGetRuleDescription: PROC [rules: SRules, id: ATOM] RETURNS [r: Rope.ROPE_NIL] = { ir: IRules ~ CDSimpleRulesBackdoor.GetRulesRep[rules]; r _ DesignRules.GetScaledValue[NARROW[ir.data], id ! DesignRules.DesignRuleError => {r _ NIL; CONTINUE} ].d; }; DefineRules: PUBLIC PROC [key: ATOM, rules: DesignRules.Rules] = { CDSimpleRulesBackdoor.RegisterRules[[ key: key, data: rules, technology: rules.technology, minWidth: SMinWidth, minSpace: SMinSpace, maxWidth: SMaxWidth, getValue: SGetValue, getRuleDescription: SGetRuleDescription ]]; }; END. ’XRulesImpl.mesa Copyright c 1987 by Xerox Corporation. All rights reserved. Created by Christian Jacobi, April 23, 1987 4:07:01 pm PDT Last edited Christian Jacobi, April 23, 1987 4:46:16 pm PDT gbb April 30, 1987 6:12:51 pm PDT This code could be included into DesignRulesImpl The procedure DefineRules is currently called using the interpreter using the load mechanisms of CDSimpleRulsImpl Κ{˜codešœ™Kšœ Οmœ1™