1、BRITISH STANDARD BS ISO/IEC 7942-3:1999 Information technology Computer graphics and image processing Graphical Kernel Systems (GKS) Part 3: Audit trail ICS 35.140BSISO/IEC7942-3:1999 This BritishStandard, having been prepared under the directionof the DISC Board, waspublished under the authorityof
2、the Standards Committee and comes into effecton 15May1999 BSI04-2000 ISBN 0 580 32446 X National foreword This BritishStandard reproduces verbatim ISO/IEC7942-3:1999 and implements it as the UK national standard. The UK participation in its preparation was entrusted to Technical Committee IST/31, Co
3、mputer graphics and image processing, which has the responsibility to: aid enquirers to understand the text; present to the responsible international/European committee any enquiries on the interpretation, or proposals for change, and keep the UK interests informed; monitor related international and
4、 European developments and promulgate them in the UK. A list of organizations represented on this committee can be obtained on request to its secretary. Cross-references The BritishStandards which implement international or European publications referred to in this document may be found in the BSI S
5、tandards Catalogue under the section entitled “International Standards Correspondence Index”, or by using the “Find” facility of the BSI Standards Electronic Catalogue. A British Standard does not purport to include all the necessary provisions of a contract. Users of British Standards are responsib
6、le for their correct application. Compliance with a British Standard does not of itself confer immunity from legal obligations. Summary of pages This document comprises a front cover, an inside front cover, pagesi andii, theISO/IEC title page, pagesii toiv, pages1 to33 and a back cover. This standar
7、d has been updated (see copyright date) and may have had amendments incorporated. This will be indicated in the amendment table on the inside front cover. Amendments issued since publication Amd. No. Date CommentsBSISO/IEC7942-3:1999 BSI 04-2000 i Contents Page National foreword Inside front cover F
8、oreword iii Text of ISO/IEC7942-3 1ii blankBS ISO/IEC7942-3:1999 ii BSI 04-2000 Contents Page Foreword iii Introduction 1 1 Scope 1 2 Normative references 1 3 Definitions 1 4 Concepts 1 4.1 The structure of a GKS-94 audit trail 1 4.2 Representation of data values 1 4.2.1 Introduction 1 4.2.2 Represe
9、ntation of constants 1 4.2.3 Representation of set types 2 4.2.4 Representation of tuple types 2 4.2.5 Representation of function types 2 4.2.6 Representation of discriminated union types 3 4.2.7 Representation of sequence types 3 5 Audit Trail Grammar 3 5.1 Notation 3 5.2 Audit trail 4 5.3 Audit tr
10、ail elements 6 5.4 Basic type definitions 14 5.5 Derived type definitions 15 5.6 The types AuditFuncName and FuncParams 28BS ISO/IEC7942-3:1999 BSI 04-2000 iii Foreword ISO (the International Organization for Standardization) and IEC (theInternational Electrotechnical Commission) form the specialize
11、d system for worldwide standardization. National bodies that are members of ISO or IEC participate in the development of International Standards through technical committees established by the respective organization to deal with particular fields of technical activity. ISO and IEC technical committ
12、ees collaborate in fields of mutual interest. Other international organizations, governmental and non-governmental, in liaison with ISO and IEC, also take part in the work. In the field of information technology, ISO and IEC have established a joint technical committee, ISO/IEC JTC1. Draft Internati
13、onal Standards adopted by the joint technical committee are circulated to national bodies for voting. Publication as an International Standard requires approval by at least75% of the national bodies casting a vote. International Standard ISO/IEC7942-3 was prepared by Joint Technical Committee ISO/IE
14、C JTC1, Information technology, Subcommittee SC24, Computer graphics and image processing. ISO/IEC7942 consists of the following parts, under the general title Information technology Computer graphics and image processing Graphical Kernel System (GKS): Part1: Functional description; Part2: NDC metaf
15、ile; Part3: Audit trail; Part4: Picture part archive.iv blankBS ISO/IEC7942-3:1999 BSI 04-2000 1 Introduction The GKS-94 audit trail provides a file format for capturing the sequence of GKS functions invoked by an application for subsequent playback. The file format consists of a set of elements tha
16、t can be used to describe the functions invoked and their parameters. 1 Scope This part of ISO/IEC7942 provides a file format for capturing the sequence of GKS functions and their parameters invoked by an application, for subsequent playback. 2 Normative references The following standards contains p
17、rovisions which, through reference in this text, constitute provisions of this part of ISO/IEC7942. At the time of publication, the editions indicated were valid. All standards are subject to revision, and parties to agreements based on this part of ISO/IEC7942 are encouraged to investigate the poss
18、ibility of applying the most recent editions of the standards indicated below. Members of IEC and ISO maintain registers of currently valid International Standards. ISO/IEC7942-1:1994, Information technology Computer graphics and image processing Graphical Kernel System (GKS) Part1: Functional descr
19、iption. ISO/IEC7942-2:1997, Information technology Computer graphics and image processing Graphical Kernel System (GKS) Part2: NDC metafile. 3 Definitions For the purposes of this part of ISO/IEC7942, the definitions given in ISO/IEC7942-1 apply. 4 Concepts 4.1 The structure of a GKS-94 audit trail
20、The purpose of the GKS-94 audit trail is to record the sequence of functions and their associated parameters executed by an application. Both input and output parameters are recorded. An audit trail consists of a sequence of audit trail elements, delimited by begin audit trail and end audit trail el
21、ements. There is one audit trail element for each function defined in Part1 of ISO/IEC7942 which can be recorded in an audit trail. Elements consist of an element name, derived from the name of the corresponding GKS-94 function by replacing spaces in the function name with the character “_”. The ele
22、ment name is followed by a parameter value list, delimited by the symbols “(“ and ”)”. Functions with no parameters have an empty parameter list, represented as “()”. Parameter values are separated by commas “,”. Each parameter value is self-delimited. Keywords in the audit trail are case sensitive.
23、 4.2 Representation of data values 4.2.1 Introduction Part1 of ISO/IEC7942 describes the parameters of the GKS-94 functions in terms of abstract data types constructed from basic types with a number of type constructors. These same abstract data types form the basis for the representations of parame
24、ter values recorded in the audit trail. In a binding of the GKS-94 functions to a programming language, these abstract data types are given concrete representations in terms of the type structure supported by the programming language. One of the consequences of this is that the situation may arise w
25、here different programming languages represent a GKS-94 basic type in different ways, for example, a name could be represented as a string or an integer. In this audit trail, concrete representations for the basic types are not defined, the representation of basic types is left implementation depend
26、ent. The audit trail records function invocations in such a way that they can be played back by the same GKS-94 implementation; issues of portability of audit trails between different implementations of GKS-94 are not addressed by this part of ISO/IEC7942. 4.2.2 Representation of constants The simpl
27、est kind of data type in GKS-94 consists of a choice between constant values, for example: Constant values are represented by character strings, in this case NDC and BACKDROP. RouteDir = NDC|BACKDROPBS ISO/IEC7942-3:1999 2 BSI 04-2000 4.2.3 Representation of set types Data types which consist of set
28、s of values of another type are defined in Part1 of ISO/IEC7942 using the powerset constructor, P, for example: means that values of type NameSet consist of sets of values, each of type GenName. Values of such types are represented by the string PSET, followed by a list of values enclosed between br
29、ackets “(“ and ”)” and separated by commas “,”. A value of type NameSet, for example, would be represented as: PSET(, , ) where denotes the representation of a value of type . 4.2.4 Representation of tuple types Ordered tuples are defined in Part1 of ISO/IEC7942 using the Cartesian product construct
30、or “”. For example: defines values of the type FontPrec to consist of pairs of values, the first of type FontInd, the second of type Prec. In an audit trail, a value of such a type is represented by a string denoting the type of the value, followed by a list of the values of its components, delimite
31、d by “(“ ”)” and separated by a separator. In the grammar of clause5, the symbol is used to denote the separator, to emphasize the relationship to Part1 of this International Standard. An implementation of the audit trial may choose any convenient concrete representation for this separator symbol. V
32、alues of the type FontPrec, for example, are denoted by: FontPrec( ) where denotes the representation of a value of type FontInd and denotes the representation of a value of type . 4.2.5 Representation of function types Functions are defined in Part1 of this International Standard using the notation
33、: This defines Selects as a function from values of type SelectCritType to values of type SelectCrit. The arrow “ ” denotes a total function, meaning that there is a value of SelectCrit for every value of type SelectCritType. The arrow “i” denotes a partial function, for example: A partial function
34、is a function which may be undefined for some values of the source type. Thus CurveBunTab defines a function from values of type CurveInd to values of type CurveBun, but for some values of type CurveInd, it is possible that there is no corresponding value of type CurveBun. Functions are in essence s
35、ets of pairs of values, the first value of a pair being a value from the domain of the function and the second the corresponding value in the range. Functions are therefore represented in the audit trail using the notation for representing sets and a variant of the notation for representing tuples.
36、The separator for the components of a tuple type is normally the symbol “”, but when the tuple is derived from the elements of a function, the separator symbol “ ” is used instead, again to emphasize the relationship to Part1 of this International Standard. As for tuple types, any convenient symbol
37、may be used as a concrete representation of the symbol “ ”. A value of type CurveBunTab would be represented as: PSET(CurveBunTab( ), CurveBunTab( ) . ) An empty set is denoted by: PSET() Part1 of this International Standard uses a predicate notation to define a function whose source type is a subty
38、pe of some other type, for example: This type is a subtype of: NameSet = P GenName FontPrec = FontInd Prec Selects = SelectCritType SelectCrit CurveBunTab = CurveInd i CurveBun Matrix23 = i,j:|N 1 , m:R|1kik2, 1kjk3 w (i,j) m Matrix = |N 1 |N 1 RBS ISO/IEC7942-3:1999 BSI 04-2000 3 which describes a
39、matrix of dimension p q. For Matrix23 the first index of the source is restricted to the values1,2 and the second to the values1,2,3. The notation (i,j) m means that the value m is associated with the ordered pair (i,j) in the source type. For cases such as the type Matrix23, where the number of ele
40、ments does not vary, (in this case a value of type Matrix23 always consists of6 elements), values of the type are specified by enumerating the values of the elements in row first order. Thus values of the type Matrix23, are represented as: Matrix23 (, , , , , ) where the order of the elements is: M
41、11 , M 12 , M 13 , M 21 , M 22 , M 23 For those types where the domain may vary, for example, colour arrays, the representation consists of two integers giving the number of rows and number of columns in the array, followed by a sequence of values, again in row first order. The representation of seq
42、uences is described below. A2 2 array of colour indices, for example, would be represented as: indirectarray (2 2 SEQ(11,12,21,22) the values of the array elements have been chosen to correspond to the order in which the elements occur in the sequence of colour indices. 4.2.6 Representation of discr
43、iminated union types In order to describe some of the GKS functions in a concise manner, Part1 of this International Standard define types which may take any of the values of a number of other types. An abbreviated example is: This definition states that values of the type PrimAttrValue are either v
44、alues of type PickId, values of type NameSet, or values of type TextHt. The constructor names “pickidentifier”, “nameset” and “textheight” are chosen to describe usage of the type following. Values of such types are represented by the constructor name followed by the corresponding value, for example
45、: nameset(PSET(, ) The constructor name is lower case. 4.2.7 Representation of sequence types Sequences are represented in the audit trail using the sequence constructor, for example: SEQ(, , . ) where denotes the representation of a value of type WCPoint. 5 Audit Trail Grammar 5.1 Notation The foll
46、owing notational conventions are used in this clause. a) Non-terminal symbols are delimited by brackets “”. b) The following metasymbols define productions, grouping and repetition. PrimAttrValue = pickidentifier | nameset | textheight 4 “becomes”, or is “realized” as o denotes an optional item, wit
47、h zero or more occurrences * zero or more occurrences of | exactly one of or metabrackets, used to group items in the right hand side of a production.BS ISO/IEC7942-3:1999 4 BSI 04-2000 5.2 Audit trail The audit trail structure is defined by a grammar. An audit trail is a sequence of audit trail ele
48、ments, beginning with the element BEGIN_AUDIT_TRAIL and terminated by the element END_AUDIT_TRAIL. This International Standard does not define a precise concrete representation for audit trail elements. The grammar below defines the information that needs to be encoded in each element and suggests a
49、 concrete syntax that may be used by implementations, obtained by representing each keyword and separator symbol by the corresponding character string in an appropriate character set. Implementations may also use more compact, implementation dependent, representations. The element BEGIN_AUDIT_TRAIL is the first element in the audit trail. It only marks the start of an audit trail. It does not correspond to a GKS-94 function. It is not an abbreviation for the AUDIT function with parameter BEGIN. Si