Browse Prior Art Database

Static Checking of Application Program Interfaces Semantics

IP.com Disclosure Number: IPCOM000118676D
Original Publication Date: 1997-May-01
Included in the Prior Art Database: 2005-Apr-01
Document File: 2 page(s) / 42K

Publishing Venue

IBM

Related People

Cobbett, M: AUTHOR [+2]

Abstract

All Application Program Interfaces (API) that are published have specific rules about how they are to be used. These specify relationships between various parts of the API.

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 66% of the total text.

Static Checking of Application Program Interfaces Semantics

      All Application Program Interfaces (API) that are published
have specific rules about how they are to be used.  These specify
relationships between various parts of the API.

As an example, in the AIX4.1 interface:
  'xmalloc' is forbidden between an 'i_disable' 'i_enable' pair
  file descriptor is only valid between an 'open' and a 'close'

      At present, it is not possible to verify that code does not
violate these rules except by running it and waiting for either an
invalid return code or a crash.  Even then, it is still necessary to
work out how and where the rules are violated, which can be very hard
and time consuming.  This is especially a problem when developing
system extensions as a failure could cause the whole machine to
crash.

      The problem can be solved by using a compiler to generate
detailed information (in a language independent format) about the
compiled code which is in turn used to verify that the rules are
being adhered to, for example:
  Definitions of symbols (and their types)
  For each function a list of functions that it calls and
   a list of functions that call it
  References of symbols
  Assignments to symbols
  Control flow through a function
  i.e., All possible instruction paths through the function

      Following this solution a provider creates a specification for
their API which formalizes its semantics, for example:
  All calls to API...