Oz Highlights

Logic variables and concurrent control.

Oz is based on logic variables and fair concurrent control. Variables can be used before they are assigned values, and multiple computations are advanced fairly. If a computation requires the value of a not yet assigned variable, the computation suspends and automatically resumes when the value of the variable becomes available.

Oz is a higher-order language.

Functions, procedures, objects, classes, methods, messages, and modules are created dynamically and are designated by first-class values, which may be passed as arguments, returned as results, tested for equality, and stored in the attributes of objects.

Full compositionality.

Every computation in Oz is described by an expression. Expressions are closed under concurrent composition, local declaration, and procedural abstraction. Oz is lexically scoped. Since full compositionality in Oz is not hampered by a static type discipline, parameterized modules come for free.

Concurrent objects and multiple inheritance.

Objects are the primary concurrent structuring concept of Oz. They combine data encapsulation through procedural abstraction with state and mutual exclusion. Objects can be seen as service-providing agents. The services of an object are provided through methods and can be requested by sending messages to the object. Objects are created as instances of classes. Classes define methods, attributes and features. The definition of a class may involve inheritance from other classes. Objects and classes are first-class citizens. They are created dynamically. Objects can be spawned as concurrent agents. Creating communicating agents in Oz is as simple as writing functions in Lisp.

Values and Data structures.

Values in Oz include arbitrary-precision integers, floats, strings, tuples, lists, and records. Arrays and dictionaries are provided as objects. Composite data structures combine with logic variables and higher-order values. Cyclic data structures and infinite streams (e.g., the lazy list of all primes) are easily expressible.

First-class names.

In Oz, the names of record fields, methods and attributes are first-class values that can be specified through variables. Values in Oz include a class of primitive names that are created dynamically and cannot be faked. In conjunction with lexical scoping, first class names provide for safety features so far available only in typed languages: one can express abstract data types as well as private methods and attributes of objects.

Soft real-time control.

Oz is well-suited for reactive programming with soft real-time requirements. Oz employs an asynchronous, preemptive and priority-controlled task scheduling policy. Timers and access to real time are available. Control with time-outs is easily expressible.

Computing with partial information.

Oz can compute with variables whose values are only partially specified. Information about the values of variables is specified by means of constraints, which are automatically combined by a simplification method generalizing unification. A computation can be synchronized on the event that a guard constraint is entailed by the constraint store.

Search.

Oz comes with powerful predefined search abstractions, including depth-first one solution, demand-driven multiple solution, all solutions, and best solution (branch and bound) search. Search is performed as speculative computation with constraints taking place in local computation spaces. Branching is postponed until a stability condition is met. There is no backtracking. All search abstractions are obtained from a single higher-order search combinator.

Finite domain constraints.

Oz comes with powerful constraints for variables constrained to finite sets of nonnegative integers (so-called finite domain variables), including addition, multiplication and comparisons. Finite domain constraints are essential for combinatorial search problems such as scheduling, configuration, and placement.

Deep guards.

Oz is a deep guard language. It has two concurrent guarded choice combinators, committed choice and disjunction.

New computation model.

Oz has been designed hand-in-hand with a new concurrent computation model incorporating ideas from functional programming, logic programming, and concurrent computation (the pi -calculus, in particular). A guiding principle was the requirement that Oz be definable by reduction to a lean kernel language. The quest for semantic minimality led to the discovery of new primitives for expressing familiar computational abstractions such as functions, objects, and search. Objects, for instance, can be reduced to procedural abstraction and cells; cells are a new primitive providing for concurrent state.

Logic sublanguage.

Oz has a logic sublanguage. Horn clause programs will execute in a logically sound manner. Since Oz has no backtracking, their operational behavior will be quite different from Prolog, however. Don't know choices (i.e., disjunctions) are suspended until they become determinate (similar to the so-called Andorra Principle). A Horn clause program can be executed with search by submitting it to a suitable search abstraction (i.e., one can choose the search strategy). Due to constraint propagation, Oz often explores much smaller search spaces than Prolog. Oz can express logically sound negation.