pd@cbnewsl.att.com (patricia.a.dunkin) (01/09/91)
ISO/IEC 9596:1990/DAD 2 (Draft Addendum 2 to the CMIP specification) appears to contain an ASN.1 syntax error. In the changes for page 16, it says: Replace "attributeList" in SetArgument with the following: "modificationList [12] IMPLICIT SET OF SEQUENCE { attributeId [0] IMPLICIT AttributeId, attributeValue [1] ANY DEFINED BY attributeId OPTIONAL, modifyOperator [2] IMPLICIT ModifyOperator DEFAULT replace }" where AttributeId is defined in section 7.4 of the main part of 9596 as AttributeId ::= CHOICE { globalForm [0] IMPLICIT OBJECT IDENTIFIER, localForm [1] IMPLICIT INTEGER } However, ISO 8824, (the specification of ASN.1), in the section on "Notation for tagged types," subsection 26.10 says, "The 'IMPLICIT' alternative shall not be used if the type ... is a choice type or an any type." So, it looks like the CHOICE AttributeId shouldn't be IMPLICIT, and an ASN.1 compiler agrees (says it's ignoring the "IMPLICIT untagged CHOICE" and refuses to generate code). Has anyone else tried to use the modificationList in the SetArgument? If so, what did you do about the IMPLICIT CHOICE problem? Or does anyone know whether there is a more recent version of DAD 2 in which this has been fixed? Thanks, Pat Dunkin (pad@groucho.att.com || ...!att!groucho!pad) P.S. For the curious, ModifyOperator is an ENUMERATED type, so making it IMPLICIT isn't a problem.
osmith@acorn.co.uk (Owen Smith) (01/11/91)
I've come across this sort of thing before. The answer is that since the CHOICE cannot possibly be IMPLICIT, it should promote to EXPLICIT automatically, and I know for a fact that the PEPY compiler in ISODE 3.0 will not do this but gives an error instead. The Data General ACY compiler will do the promotion. I admit that in this case it is a little silly putting the IMPLICIT in and for the CHOICE to then promote to EXPLICIT. However, consider the case when you are running with DEFINITIONS IMPLICIT TAGS set. If you now have a defined type which is a CHOICE (as in the original example) any reference to it will be IMPLICIT unless you stick an EXPLICIT keyword in, which is a pain hence the promotion feature. The X.400 1988 spec has a few of these in it somewhere - I know because I had to stick EXPLICIT in until we switched from PEPY to ACY. Nuke 'em 'til they glow, then shoot 'em in the dark!