-- CHOpsP2V3AuxImpl.Mesa -- Copyright (C) 1986 by Xerox Corporation. All rights reserved. -- Generated by Demers.pa at November 26, 1986 11:55:47 am PST -- using Sirocco [1.0] of September 25, 1986 3:44:23 am PDT DIRECTORY Convert, Rope, CHOpsP2V3, CHOpsP2V3Aux; CHOpsP2V3AuxImpl: CEDAR PROGRAM IMPORTS Convert, Rope EXPORTS CHOpsP2V3Aux ~ { OPEN CHOpsP2V3, CHOpsP2V3Aux; ROPE: TYPE ~ Rope.ROPE; ExposeObjectNameSequence: PUBLIC PROC [s: ObjectNameSequence, level: NAT] RETURNS [x: ROPE] ~ { x _ "ObjectNameSequence: ["; FOR i: CARDINAL IN [0..s.length) DO x _ Rope.Concat[x, "\n"]; FOR i: CARDINAL IN [0..2*level) DO x _ Rope.Concat[x, " "]; ENDLOOP; x _ Rope.Concat[x, "("]; x _ Rope.Concat[x, Convert.RopeFromCard[i]]; x _ Rope.Concat[x, ") "]; x _ Rope.Concat[x, FooP1V1.ExposeCARD[s[i], (level+1)]]; ENDLOOP; x _ Rope.Concat[x, "]"]; }; ExposeWhichArgument: PUBLIC PROC [e: WhichArgument, level: NAT] RETURNS [x: ROPE] ~ { SELECT e FROM first => x _ "first"; second => x _ "second"; ENDCASE => x _ "unknown WhichArgument"; }; ExposeStreamOfThreePartName: PUBLIC PROC [c: StreamOfThreePartName, level: NAT] RETURNS [x: ROPE] ~ { x _ "StreamOfThreePartName("; x _ Rope.Concat[x, ExposeStreamKind[c.type, (level+1)]]; x _ Rope.Concat[x, "): "]; WITH c SELECT FROM v: nextSegment StreamOfThreePartName => { x _ Rope.Concat[x, ExposeThreePartNameList[v.nextSegment, (level+1)]]; }; v: lastSegment StreamOfThreePartName => { x _ Rope.Concat[x, ExposeThreePartNameSequence[v.lastSegment, (level+1)]]; }; ENDCASE => { x _ Rope.Concat[x, "Unknown"]; }; }; ExposeStreamOfDomain: PUBLIC PROC [c: StreamOfDomain, level: NAT] RETURNS [x: ROPE] ~ { x _ "StreamOfDomain("; x _ Rope.Concat[x, ExposeStreamKind[c.type, (level+1)]]; x _ Rope.Concat[x, "): "]; WITH c SELECT FROM v: nextSegment StreamOfDomain => { x _ Rope.Concat[x, ExposeDomainList[v.nextSegment, (level+1)]]; }; v: lastSegment StreamOfDomain => { x _ Rope.Concat[x, ExposeDomainSequence[v.lastSegment, (level+1)]]; }; ENDCASE => { x _ Rope.Concat[x, "Unknown"]; }; }; ExposeDomainNameSequence: PUBLIC PROC [s: DomainNameSequence, level: NAT] RETURNS [x: ROPE] ~ { x _ "DomainNameSequence: ["; FOR i: CARDINAL IN [0..s.length) DO x _ Rope.Concat[x, "\n"]; FOR i: CARDINAL IN [0..2*level) DO x _ Rope.Concat[x, " "]; ENDLOOP; x _ Rope.Concat[x, "("]; x _ Rope.Concat[x, Convert.RopeFromCard[i]]; x _ Rope.Concat[x, ") "]; x _ Rope.Concat[x, FooP1V1.ExposeCARD[s[i], (level+1)]]; ENDLOOP; x _ Rope.Concat[x, "]"]; }; ExposeStreamOfOrganization: PUBLIC PROC [c: StreamOfOrganization, level: NAT] RETURNS [x: ROPE] ~ { x _ "StreamOfOrganization("; x _ Rope.Concat[x, ExposeStreamKind[c.type, (level+1)]]; x _ Rope.Concat[x, "): "]; WITH c SELECT FROM v: nextSegment StreamOfOrganization => { x _ Rope.Concat[x, ExposeOrganizationList[v.nextSegment, (level+1)]]; }; v: lastSegment StreamOfOrganization => { x _ Rope.Concat[x, ExposeOrganizationSequence[v.lastSegment, (level+1)]]; }; ENDCASE => { x _ Rope.Concat[x, "Unknown"]; }; }; ExposeStreamOfDomainName: PUBLIC PROC [c: StreamOfDomainName, level: NAT] RETURNS [x: ROPE] ~ { x _ "StreamOfDomainName("; x _ Rope.Concat[x, ExposeStreamKind[c.type, (level+1)]]; x _ Rope.Concat[x, "): "]; WITH c SELECT FROM v: nextSegment StreamOfDomainName => { x _ Rope.Concat[x, ExposeDomainNameList[v.nextSegment, (level+1)]]; }; v: lastSegment StreamOfDomainName => { x _ Rope.Concat[x, ExposeDomainNameSequence[v.lastSegment, (level+1)]]; }; ENDCASE => { x _ Rope.Concat[x, "Unknown"]; }; }; ExposeArgumentProblem: PUBLIC PROC [e: ArgumentProblem, level: NAT] RETURNS [x: ROPE] ~ { SELECT e FROM illegalProperty => x _ "illegalProperty"; illegalOrganizationName => x _ "illegalOrganizationName"; illegalDomainName => x _ "illegalDomainName"; illegalObjectName => x _ "illegalObjectName"; noSuchOrganization => x _ "noSuchOrganization"; noSuchDomain => x _ "noSuchDomain"; noSuchObject => x _ "noSuchObject"; ENDCASE => x _ "unknown ArgumentProblem"; }; ExposeDomainList: PUBLIC PROC [r: DomainList, level: NAT] RETURNS [x: ROPE] ~ { x _ "["; x _ Rope.Concat[x, ", "]; x _ Rope.Concat[x, "segment: "]; x _ Rope.Concat[x, ExposeDomainSequence[r.segment, (level+1)]]; x _ Rope.Concat[x, "]"]; }; ExposeDomainSequence: PUBLIC PROC [s: DomainSequence, level: NAT] RETURNS [x: ROPE] ~ { x _ "DomainSequence: ["; FOR i: CARDINAL IN [0..s.length) DO x _ Rope.Concat[x, "\n"]; FOR i: CARDINAL IN [0..2*level) DO x _ Rope.Concat[x, " "]; ENDLOOP; x _ Rope.Concat[x, "("]; x _ Rope.Concat[x, Convert.RopeFromCard[i]]; x _ Rope.Concat[x, ") "]; x _ Rope.Concat[x, Convert.RopeFromRope[s[i]]]; ENDLOOP; x _ Rope.Concat[x, "]"]; }; ExposeThreePartNameSequence: PUBLIC PROC [s: ThreePartNameSequence, level: NAT] RETURNS [x: ROPE] ~ { x _ "ThreePartNameSequence: ["; FOR i: CARDINAL IN [0..s.length) DO x _ Rope.Concat[x, "\n"]; FOR i: CARDINAL IN [0..2*level) DO x _ Rope.Concat[x, " "]; ENDLOOP; x _ Rope.Concat[x, "("]; x _ Rope.Concat[x, Convert.RopeFromCard[i]]; x _ Rope.Concat[x, ") "]; x _ Rope.Concat[x, FooP1V1.ExposeCARD[s[i], (level+1)]]; ENDLOOP; x _ Rope.Concat[x, "]"]; }; ExposeObjectNameList: PUBLIC PROC [r: ObjectNameList, level: NAT] RETURNS [x: ROPE] ~ { x _ "["; x _ Rope.Concat[x, ", "]; x _ Rope.Concat[x, "segment: "]; x _ Rope.Concat[x, ExposeObjectNameSequence[r.segment, (level+1)]]; x _ Rope.Concat[x, "]"]; }; ExposeStreamKind: PUBLIC PROC [e: StreamKind, level: NAT] RETURNS [x: ROPE] ~ { SELECT e FROM nextSegment => x _ "nextSegment"; lastSegment => x _ "lastSegment"; ENDCASE => x _ "unknown StreamKind"; }; ExposeNetworkNumber: PUBLIC PROC [a: NetworkNumber, level: NAT] RETURNS [x: ROPE] ~ { x _ "NetworkNumber: ["; FOR i: CARDINAL IN [0..1) DO x _ Rope.Concat[x, Convert.RopeFromCard[a[i]]]; x _ Rope.Concat[x, ", "]; ENDLOOP; x _ Rope.Concat[x, Convert.RopeFromCard[a[1]]]; x _ Rope.Concat[x, "]"]; }; ExposeHostNumber: PUBLIC PROC [a: HostNumber, level: NAT] RETURNS [x: ROPE] ~ { x _ "HostNumber: ["; FOR i: CARDINAL IN [0..2) DO x _ Rope.Concat[x, Convert.RopeFromCard[a[i]]]; x _ Rope.Concat[x, ", "]; ENDLOOP; x _ Rope.Concat[x, Convert.RopeFromCard[a[2]]]; x _ Rope.Concat[x, "]"]; }; ExposeNetworkAddress: PUBLIC PROC [r: NetworkAddress, level: NAT] RETURNS [x: ROPE] ~ { x _ "["; x _ Rope.Concat[x, "network: "]; x _ Rope.Concat[x, ExposeNetworkNumber[r.network, (level+1)]]; x _ Rope.Concat[x, "host: "]; x _ Rope.Concat[x, ExposeHostNumber[r.host, (level+1)]]; x _ Rope.Concat[x, ", "]; x _ Rope.Concat[x, "socket: "]; x _ Rope.Concat[x, Convert.RopeFromCard[r.socket]]; x _ Rope.Concat[x, "]"]; }; ExposeCallProblem: PUBLIC PROC [e: CallProblem, level: NAT] RETURNS [x: ROPE] ~ { SELECT e FROM accessRightsInsufficient => x _ "accessRightsInsufficient"; tooBusy => x _ "tooBusy"; serverDown => x _ "serverDown"; useCourier => x _ "useCourier"; other => x _ "other"; ENDCASE => x _ "unknown CallProblem"; }; ExposeAuthenticator: PUBLIC PROC [r: Authenticator, level: NAT] RETURNS [x: ROPE] ~ { x _ "["; x _ Rope.Concat[x, "credentials: "]; x _ Rope.Concat[x, FooP1V1.ExposeCARD[r.credentials, (level+1)]]; x _ Rope.Concat[x, ", "]; x _ Rope.Concat[x, "verifier: "]; x _ Rope.Concat[x, FooP1V1.ExposeCARD[r.verifier, (level+1)]]; x _ Rope.Concat[x, "]"]; }; ExposeDomainNameList: PUBLIC PROC [r: DomainNameList, level: NAT] RETURNS [x: ROPE] ~ { x _ "["; x _ Rope.Concat[x, ", "]; x _ Rope.Concat[x, "segment: "]; x _ Rope.Concat[x, ExposeDomainNameSequence[r.segment, (level+1)]]; x _ Rope.Concat[x, "]"]; }; ExposeNetworkAddressList: PUBLIC PROC [s: NetworkAddressList, level: NAT] RETURNS [x: ROPE] ~ { x _ "NetworkAddressList: ["; FOR i: CARDINAL IN [0..s.length) DO x _ Rope.Concat[x, "\n"]; FOR i: CARDINAL IN [0..2*level) DO x _ Rope.Concat[x, " "]; ENDLOOP; x _ Rope.Concat[x, "("]; x _ Rope.Concat[x, Convert.RopeFromCard[i]]; x _ Rope.Concat[x, ") "]; x _ Rope.Concat[x, ExposeNetworkAddress[s[i], (level+1)]]; ENDLOOP; x _ Rope.Concat[x, "]"]; }; ExposeStreamOfObject: PUBLIC PROC [c: StreamOfObject, level: NAT] RETURNS [x: ROPE] ~ { x _ "StreamOfObject("; x _ Rope.Concat[x, ExposeStreamKind[c.type, (level+1)]]; x _ Rope.Concat[x, "): "]; WITH c SELECT FROM v: nextSegment StreamOfObject => { x _ Rope.Concat[x, ExposeObjectList[v.nextSegment, (level+1)]]; }; v: lastSegment StreamOfObject => { x _ Rope.Concat[x, ExposeObjectSequence[v.lastSegment, (level+1)]]; }; ENDCASE => { x _ Rope.Concat[x, "Unknown"]; }; }; ExposeItem: PUBLIC PROC [s: Item, level: NAT] RETURNS [x: ROPE] ~ { x _ "Item: ["; FOR i: CARDINAL IN [0..s.length) DO x _ Rope.Concat[x, "\n"]; FOR i: CARDINAL IN [0..2*level) DO x _ Rope.Concat[x, " "]; ENDLOOP; x _ Rope.Concat[x, "("]; x _ Rope.Concat[x, Convert.RopeFromCard[i]]; x _ Rope.Concat[x, ") "]; x _ Rope.Concat[x, Convert.RopeFromCard[s[i]]]; ENDLOOP; x _ Rope.Concat[x, "]"]; }; ExposeOrganizationList: PUBLIC PROC [r: OrganizationList, level: NAT] RETURNS [x: ROPE] ~ { x _ "["; x _ Rope.Concat[x, ", "]; x _ Rope.Concat[x, "segment: "]; x _ Rope.Concat[x, ExposeOrganizationSequence[r.segment, (level+1)]]; x _ Rope.Concat[x, "]"]; }; ExposeOrganizationSequence: PUBLIC PROC [s: OrganizationSequence, level: NAT] RETURNS [x: ROPE] ~ { x _ "OrganizationSequence: ["; FOR i: CARDINAL IN [0..s.length) DO x _ Rope.Concat[x, "\n"]; FOR i: CARDINAL IN [0..2*level) DO x _ Rope.Concat[x, " "]; ENDLOOP; x _ Rope.Concat[x, "("]; x _ Rope.Concat[x, Convert.RopeFromCard[i]]; x _ Rope.Concat[x, ") "]; x _ Rope.Concat[x, Convert.RopeFromRope[s[i]]]; ENDLOOP; x _ Rope.Concat[x, "]"]; }; ExposeThreePartNameList: PUBLIC PROC [r: ThreePartNameList, level: NAT] RETURNS [x: ROPE] ~ { x _ "["; x _ Rope.Concat[x, ", "]; x _ Rope.Concat[x, "segment: "]; x _ Rope.Concat[x, ExposeThreePartNameSequence[r.segment, (level+1)]]; x _ Rope.Concat[x, "]"]; }; ExposeStreamOfObjectName: PUBLIC PROC [c: StreamOfObjectName, level: NAT] RETURNS [x: ROPE] ~ { x _ "StreamOfObjectName("; x _ Rope.Concat[x, ExposeStreamKind[c.type, (level+1)]]; x _ Rope.Concat[x, "): "]; WITH c SELECT FROM v: nextSegment StreamOfObjectName => { x _ Rope.Concat[x, ExposeObjectNameList[v.nextSegment, (level+1)]]; }; v: lastSegment StreamOfObjectName => { x _ Rope.Concat[x, ExposeObjectNameSequence[v.lastSegment, (level+1)]]; }; ENDCASE => { x _ Rope.Concat[x, "Unknown"]; }; }; ExposeObjectList: PUBLIC PROC [r: ObjectList, level: NAT] RETURNS [x: ROPE] ~ { x _ "["; x _ Rope.Concat[x, ", "]; x _ Rope.Concat[x, "segment: "]; x _ Rope.Concat[x, ExposeObjectSequence[r.segment, (level+1)]]; x _ Rope.Concat[x, "]"]; }; ExposeProperties: PUBLIC PROC [s: Properties, level: NAT] RETURNS [x: ROPE] ~ { x _ "Properties: ["; FOR i: CARDINAL IN [0..s.length) DO x _ Rope.Concat[x, "\n"]; FOR i: CARDINAL IN [0..2*level) DO x _ Rope.Concat[x, " "]; ENDLOOP; x _ Rope.Concat[x, "("]; x _ Rope.Concat[x, Convert.RopeFromCard[i]]; x _ Rope.Concat[x, ") "]; x _ Rope.Concat[x, Convert.RopeFromCard[s[i]]]; ENDLOOP; x _ Rope.Concat[x, "]"]; }; ExposePropertyProblem: PUBLIC PROC [e: PropertyProblem, level: NAT] RETURNS [x: ROPE] ~ { SELECT e FROM missing => x _ "missing"; wrongType => x _ "wrongType"; ENDCASE => x _ "unknown PropertyProblem"; }; ExposeUpdateProblem: PUBLIC PROC [e: UpdateProblem, level: NAT] RETURNS [x: ROPE] ~ { SELECT e FROM noChange => x _ "noChange"; outOfDate => x _ "outOfDate"; objectOverflow => x _ "objectOverflow"; databaseOverflow => x _ "databaseOverflow"; ENDCASE => x _ "unknown UpdateProblem"; }; ExposeObjectSequence: PUBLIC PROC [s: ObjectSequence, level: NAT] RETURNS [x: ROPE] ~ { x _ "ObjectSequence: ["; FOR i: CARDINAL IN [0..s.length) DO x _ Rope.Concat[x, "\n"]; FOR i: CARDINAL IN [0..2*level) DO x _ Rope.Concat[x, " "]; ENDLOOP; x _ Rope.Concat[x, "("]; x _ Rope.Concat[x, Convert.RopeFromCard[i]]; x _ Rope.Concat[x, ") "]; x _ Rope.Concat[x, Convert.RopeFromRope[s[i]]]; ENDLOOP; x _ Rope.Concat[x, "]"]; }; }...