Download 1 Introduction

Transcript
Int
FDInt
Char
Number
Float
Atom
Record
Tuple
Thread
Array
Procedure
Dictionary
Literal
Bool
Name
Value
Unit
Class
Chunk
Object
Cell
Lock
Space
Port
Figure 1: Oz Type Hierarchy
state-container and state modication. Space will be needed for advanced problem
solving, and programming advanced search techniques including all you know of
from an AI course. FDint is the type of nite domain that is used frequently in
constraint programming, constraint satisfaction, and operational research. Name
introduces anonymous unique unforgeable tokens, we also think of security !
The language is dynamically typed in the sense that when a variable is introduced
its type (as well as its value) is unknown. Only when the variable is bound to an
Oz value, its type becomes determined.
Hello World. Let us do like everybody else. If you are unfamiliar with Oz, here
is your rst Oz program. If you feed it, it will print the string "Hello
window that appears in your screen1
World"
in a
{Browse "Hello World"}
In fact, the main reason for showing this program is to get you accustomed with
one of the unconventional syntactic aspects of Oz, namely the syntax of procedure
calls/applications.
{Browse "Hello World"}
is a procedure application of Browse on the single string argument "Hello World".
Browse is actually a pre-declared global variable that got bound to the browsing
procedure when the browsing module was loaded into the system. Oz follows in
What you see is an oz-application called the browser. You have to switch it to the virtual string
mode to enable string visualization.
1
3