CONTENTS

 1     Scope
 2     Normative references
 3     Definitions
        3.1     Definitions
        3.2     Abbreviations
 4     General
        5.1     Information object conformance
                  5.1.1     Profiles
                  5.1.2     Encoding
                  5.1.3     Syntax
                  5.1.4     Semantics
        5.2     Implementation conformance
                  5.2.1     Conformance requirements
                  5.2.2     Conformance documentation
        5.3     Application conformance
        5.4     Test Methods
 6     Overview
        6.1     Description methodology
        6.2     Data processing operations
        6.3     Access to external data and functions
 7     MHEG/MHEG-3 relationship
        7.1     MHEG entities
        7.2     Functional entities
        7.3     MHEG-SIR script interpreter
 8     Elements of MHEG-SIR
        8.1     Data types
                  8.1.1     Predefined types
                  8.1.2     Declared constructed types
        8.2     Data
                  8.2.1     Immediate values
                  8.2.2     Constants
                  8.2.3     Variables
        8.3     Functions
                  8.3.1     Routines
                  8.3.2     Services
                  8.3.3     Predefined functions
        8.4     Messages
                  8.4.1     Package exceptions
                  8.4.2     Predefined messages
        8.5     Instructions
        8.6     Identifiers
                  8.6.1     Type identifiers
                  8.6.2     Data identifiers
                  8.6.3     Function identifiers
                  8.6.4     Message identifiers
 9     The MHEG-SIR virtual machine
        9.1     Structure of the MHEG-SIR virtual machine
        9.2     Structures and notations
                  9.2.1     Table
                  9.2.2     Stack
                  9.2.3     Parameter stack
                  9.2.4     Queue
                  9.2.5     Data representation
        9.3     Memory areas
                  9.3.1     Mh-script memory areas
                  9.3.2     Rt-script memory areas
        9.4     Script statuses
                  9.4.1     Mh-script statuses
                  9.4.2     Rt-script statuses
        9.5     Processing units
                  9.5.1     Message reception
                  9.5.2     Mh-script initialization
                  9.5.3     Rt-script initialization
                  9.5.4     Rt-script execution unit
                  9.5.5     MHEG-SIR instruction execution unit
10     Provisions for run-time environment access
       10.1     General model
       10.2     Declaration of IDL interfaces
       10.3     Invocation of external operations in an MHEG-SIR program
       10.4     Handling of external exceptions in an MHEG-SIR program
       10.5     Invocation of external operations by an MHEG-3 engine
       10.6     Handling of external exceptions by an MHEG-3 engine
       10.7     Platform mapping specifications
11     Provisions for MHEG object manipulation
       11.1     Invoking MHEG actions
                 11.1.1     Sending messages to other scripts
                 11.1.2     Exchange of information with MHEG objects
       11.2     Receiving MHEG messages
                 11.2.1     MHEG-3 API run operations
                 11.2.2     MHEG API exceptions
12     MHEG-SIR declarations
       12.1     Type declaration
                 12.1.1     Type identifier
                 12.1.2     Type description
       12.2     Constant declaration
                 12.2.1     Data identifier
                 12.2.2     Type identifier
                 12.2.3     Constant value
       12.3     Global variable declaration
                 12.3.1     Data identifier
                 12.3.2     Type identifier
                 12.3.3     Constant reference
       12.4     Package declaration
                 12.4.1     Package identifier
                 12.4.2     Name
                 12.4.3     Service description
                 12.4.4     Exception description
       12.5     Handler declaration
                 12.5.1     Message identifier
                 12.5.2     Function identifier
       12.6     Routine declaration
                 12.6.1     Function identifier
                 12.6.2     Type identifier
                 12.6.3     Parameter description
                 12.6.4     Local variable declaration
                 12.6.5     Program code
13     MHEG-SIR instructions
       13.1     Presentation methodology
                 13.1.1     Error conditions
                 13.1.2     Formal specification
                 13.1.3     Data table notation
                 13.1.4     Template instruction notation
                 13.1.5     Primitives
       13.2     Classification of MHEG-SIR instructions
       13.3     Description of instructions
                 13.3.1     No operation
                 13.3.2     Yield
                 13.3.3     Return
                 13.3.4     Free
                 13.3.5     Not
                 13.3.6     Or
                 13.3.7     Exclusive or
                 13.3.8     And
                 13.3.9     Equal reference
                13.3.10     Equal
                13.3.11     Less than
                13.3.12     Greater than
                13.3.13     Add
                13.3.14     Subtract
                13.3.15     Multiply
                13.3.16     Divide
                13.3.17     Negate
                13.3.18     Remainder
                13.3.19     Duplicate
                13.3.20     Convert
                13.3.21     Jump on true
                13.3.22     Jump on false
                13.3.23     Jump
                13.3.24     Shift
                13.3.25     Get object reference
                13.3.26     Long jump on true
                13.3.27     Long jump on false
                13.3.28     Long jump
                13.3.29     Call
                13.3.30     External call
                13.3.31     Push
                13.3.32     Push reference
                13.3.33     Push immediate
                13.3.34     Pop
                13.3.35     Pop reference
                13.3.36     Pop contents
                13.3.37     Allocate
                13.3.38     Increment
                13.3.39     Decrement
                13.3.40     Get
                13.3.41     Get contents
                13.3.42     Set
                13.3.43     Set contents
       13.4     Type conversion rules
                 13.4.1     Reversible conversions
                 13.4.2     Lossless extensions
                 13.4.3     Lossy extensions
                 13.4.4     Truncations to boolean
                 13.4.5     Truncations between integer or between floating-point types
                 13.4.6     Truncations from floating-point to integer
14     IDL mapping to MHEG-SIR
       14.1     IDL specifications
       14.2     IDL interfaces and modules
       14.3     IDL operations
                 14.3.1     Operation name
                 14.3.2     Operation parameters
                 14.3.3     Implicit parameter
                 14.3.4     Return value
       14.4     IDL attributes
                 14.4.1     Accessor
                 14.4.2     Modifier
                 14.4.3     Readonly attribute
       14.5     IDL inherited operations
       14.6     IDL exceptions
                 14.6.1     Exception name
                 14.6.2     Exception members
                 14.6.3     Implicit member
       14.7     IDL types
                 14.7.1     char type
                 14.7.2     enum type
                 14.7.3     Constructed types
                 14.7.4     any type
                 14.7.5     Restrictions on types
       14.8     IDL constants
15     The MHEG-3 API
       15.1     ScriptInterpreter object
                 15.1.1     kill operation
                 15.1.2     prepare operation
       15.2     MhScript object
                 15.2.1     destroy operation
                 15.2.2     new operation
       15.3     RtScript object
                 15.3.1     delete operation
                 15.3.2     setPriority operation
                 15.3.3     getPriority operation
                 15.3.4     setData operation
                 15.3.5     getData operation
                 15.3.6     allocate operation
                 15.3.7     free operation
                 15.3.8     stop operation
                 15.3.9     reInit operation
                15.3.10     getRtScriptStatus operation
                15.3.11     open operation
       15.4     RoutineInvocation object
                 15.4.1     close operation
                 15.4.2     routine_id readonly attribute
                 15.4.3     setParameter operation
                 15.4.4     getPrototype operation
                 15.4.5     run operation
                 15.4.6     reset operation
                 15.4.7     getInvocationStatus operation
Annex A – ASN.1 specification of interchanged scripts
Annex B – Coded representation of interchanged scripts
        B.1     Coding for interchanged scripts
        B.2     Coding for the program code
                  B.2.1     Instruction op-codes
                  B.2.2     Instruction operands
Annex C – MHEG-SIR predefined elements
        C.1     Predefined types
                  C.1.1     Primitive types
                  C.1.2     MHEG API types
        C.2     Predefined functions
                  C.2.1     MHEG API operations
                  C.2.2     MHEG-3 API operations
        C.3     Predefined messages
                  C.3.1     MHEG-3 API operations
                  C.3.2     The InstructionExecutionError exception
                  C.3.3     MHEG-3 API exceptions
                  C.3.4     MHEG API exceptions
Annex D – IDL Platform mapping specification form
Annex E – MHEG API definition process
        E.1     Generic API definition framework
                  E.1.1     MHEG elements input to MHEG API definition process
                  E.1.2     IDL elements output by MHEG API definition process
                  E.1.3     Requirements on the MHEG API definition process
                  E.1.4     General structure of the MHEG API
                  E.1.5     IDL non-object datatype definition
                  E.1.6     IDL interface definition
                  E.1.7     IDL attribute definition
                  E.1.8     IDL operation definition
                  E.1.9     IDL exception definition
        E.2     MHEG API mapping to MHEG-SIR
Annex F – IDL specification of the MHEG-3 API
Annex G – Relationships with other ITU-T Recommendations of the T.170-Series (and parts of ISO/IEC 13522)
        G.1     Relationships with ITU-T Rec. T.171 (and ISO/IEC 13522‑1)
        G.2     Relationships with ITU-T Rec. T.172 (and ISO/IEC 13522‑5)
Appendix I – MHEG-SIR syntax (EBNF notation)
Appendix II – Textual notation for MHEG-SIR scripts
Appendix III – MHEG entities
      III.1     MHEG objects
      III.2     Mh-objects
      III.3     Rt-objects
      III.4     Interchanged MHEG objects
Appendix IV – Main features of MHEG-SIR
       IV.1     Features of using applications
                 IV.1.1     Manipulation of MHEG entities
                 IV.1.2     Computations, variable handling and control structures
                 IV.1.3     External device control
                 IV.1.4     Data acquisition
                 IV.1.5     Access to external data
                 IV.1.6     Access to arbitrary external run-time services
       IV.2     Functional features
                 IV.2.1     Data processing operations
                 IV.2.2     Access to external data and functions
       IV.3     Technical features
                 IV.3.1     Hardware independence
                 IV.3.2     Final form representation
                 IV.3.3     Compactness
                 IV.3.4     Ease of implementation
                 IV.3.5     Interpretation efficiency
                 IV.3.6     Openness and extensibility
                 IV.3.7     Non-revisability
                 IV.3.8     Provisions for real-time interchange
                 IV.3.9     Semantic validation for quality of service purposes
                IV.3.10     Syntax checkability (with regard to contamination hazards)
                IV.3.11     Non-proprietary representation
                IV.3.12     Secure script processing