<> <> <> <> DIRECTORY Core, CoreOps, CoreProperties, CoreClasses, RoseBind, RoseRecognizeTransistors; RoseRecognizeTransistorsImpl: CEDAR PROGRAM IMPORTS CoreOps, CoreProperties, CoreClasses, RoseBind EXPORTS RoseRecognizeTransistors = BEGIN transistorBC: RoseBind.BehaviorClass; Recognize: PUBLIC PROC [ct: Core.CellType] RETURNS [bc: RoseBind.BehaviorClass] = { bc _ NIL; IF ct.class = CoreClasses.transistorCellClass THEN { bc _ transistorBC; IF CoreProperties.GetCellTypeProp[ct, RoseBind.argsKey] = NIL THEN CoreProperties.PutCellTypeProp[ct, RoseBind.argsKey, ct.data]; }; }; Start: PROC = { pw: Core.Wire = CoreOps.CreateRecordWire[ LIST[ CoreOps.CreateAtomWire["gate"], CoreOps.CreateAtomWire["ch1"], CoreOps.CreateAtomWire["ch2"] ], "TransistorPublic", CoreProperties.Props[[RoseBind.switchWire, $T]] ]; transistorBC _ RoseBind.EnsureBehaviorClass["Transistor", pw]; }; Start[]; END.