Browse Prior Art Database

Device Independent Graphics Using Dynamic Generic Operator Selection

IP.com Disclosure Number: IPCOM000045522D
Original Publication Date: 1983-Apr-01
Included in the Prior Art Database: 2005-Feb-07
Document File: 3 page(s) / 16K

Publishing Venue

IBM

Related People

Carlson, ED: AUTHOR [+3]

Abstract

This invention relates to the creation and use of a table having row entries of generic function names, device types, and names of device dependent routines such that upon invocation of a generic function by a process, independent of device type, a call to a specific device dependent routine can be made. The device type is assumed independently supplied and locally stored within the system. This method has the following two features: 1. It does not require that any existing code be changed when a new graphics device is supported. 2. It requires only one executable module per user application.

This text was extracted from a PDF file.
This is the abbreviated version, containing approximately 44% of the total text.

Page 1 of 3

Device Independent Graphics Using Dynamic Generic Operator Selection

This invention relates to the creation and use of a table having row entries of generic function names, device types, and names of device dependent routines such that upon invocation of a generic function by a process, independent of device type, a call to a specific device dependent routine can be made. The device type is assumed independently supplied and locally stored within the system. This method has the following two features: 1. It does not require that any existing code be changed when a new graphics device is supported. 2. It requires only one executable module per user application.

Dynamic generic operator selection, as it is described in the literature, cannot support device independence. This article describes: (1) an extension to the concept so that it is powerful enough to support device independence, and (2) how it is used to implement device independence. This support of device independence is, in fact, only one application of this extension to dynamic generic operator selection.

Other applications include version control where the code bodies for a particular version are selected, and compilers that compile for a number of machines where the code bodies generating code for a particular machine are selected.

Generic operator selection refers to the selection of a particular program (code body) based on the data types of the parameters to a generic subroutine or function. For example, if '+' is a generic name for two different procedures 'INTEGERPLUS' and 'REALPLUS', then the expression '2+3' will select 'INTEGERPLUS' for the generic operation ' ' and '2.0+3.4' will select 'REALPLUS' for the generic operation '+'. In those expressions the selection could be done at the time that expression is compiled. If the expression is 'a+b' and it is not known until run time whether a and b are integer or real, then the selection of the proper specific program cannot be done until execution time. Selection of the proper specific code body at execution time is known as dynamic generic operator selection. Many languages provide for compile time generic operator selection, but very few languages provide for dynamic generic operator selection of user-defined generic operations. We note that dynamic generic operator selection requires a dynamic load and link capability.

Generalized Dynamic Generic Selection

Dynamic generic operator selection refers to the selection, at run time, of a specific code body for a generic name, based on the data types of the parameters. We wish to extend the idea of dynamic generic operator selection to allow for dynamic selection of a specific code body based not only on the data types of the parameters of the generic operation, but also on the value of parameters and global variables. Standard dynamic generic operator selection needs

1

Page 2 of 3

information such as that in the following table:

GENERIC NAME OPERANDl OPERAND2 SPECIFIC...