next up previous contents index
Next: Data Structures Up: No Title Previous: Contents

Introduction

  This paper is about connecting Oz to the rest of the computational world. Sometimes this is paraphrased as interoperability . Any programming system which claims to be of practical use has to provide facilities for interfacing to other computer applications. We show herein how DFKI Oz allows to interoperate with other computational activities. The presentation consists of two different levels of abstraction, which can be summarized as follows:

Ready--to--Use Functionality.
We describe functionality which can be used at a high level within DFKI Oz. It is useful for programming open applications. Open applications consist of agents communicating via data. The most common situations for data interchange are: For all of them we give basic patterns of use, a description of the functionality available in DFKI Oz, and sample applications.
Predefined Interfacing Functionality.
This level of functionality is designed for building high level interfaces. We present the functionality provided by the module included in the file Unix.oz. It consists of functionality obtained by lifting Unix functions to Oz procedures. Some procedures are useful for the application programmer, e.g. procedures for time inquiry, for execution of arbitrary Unix commands and the like. Others are only useful for assembling higher level functionality: for instance Unix system calls for handling of files and sockets.

Relationship to Kernel Oz

In Kernel Oz [6] two procedures are described, namely `Input`  and `Output`  serving as a semantic model for input and output. As specified there, input and output is allowed only in the top level computation space. The implementation of the functionality described in this paper is conceptually an instance provided by DFKI Oz making use of `Input and `Output`. Hence,

input and output do not work in local computation spaces!

Conventions

Throughout this report we will refer to Unix manual pages  for further information. If you see open(2)  this means that you should look up the manual page with title ``open'' in the section 2. Type man 2 open to your Unixgif shell to see the manual page. Whenever we explain procedures or object methods, we will use the same notational conventions as in [1]. In particular, this is true for the application scheme for procedures in the module Unix, i.e. the schema

{pipe +CmdV +ArgsVs ?PidI ?StatusTI}
is an abbrevation for
{Unix.pipe +CmdV +ArgsVs ?PidI ?StatusTI}
A variable name of an argument possibly starts with a prefix giving the purpose of the variable, and ends with a letter combination giving the expected type(s) of the argument. We will use A for atoms, B for boolean values, I for integers, S for strings, R for records, T for tuples, V for virtual strings, and X, Y, Z for any type. Lists of a certain type are marked by appending s to the latter. So for instance, the argument with name ArgsVs is supposed to be a list of virtual strings. The arguments may be annotated by + (an input argument) or ? (an output argument). For more information on this, see [1].

!!! Attention !!!

This sign means that the described features and functionality is either difficult to use, or needs special attention in using.

Try the Demos!

This paper contains quite a number of examples. As usually, it is easiest to read this paper and try the examples immediately. For this purpose, the Oz system is shipped with a file, containing all the demos contained in this paper. The file can be found at ${OZHOME}/demos/documentation/OpenProgramming.oz, where ${OZHOME} is the directory where the Oz system has been installedgif. For convenience you can choose the appropriate submenu entry of the menu entry Find in your Oz Programming Interface to find the demo file. In the presentation of the paper the necessary declarations of variables are left out for readability. In the demo file you will find all the declarations in place.



next up previous contents index
Next: Data Structures Up: No Title Previous: Contents



Sven Schmeier
Tue Sep 5 10:43:51 MET DST 1995