Welcome to the wonderful world of Oz, Freejack.

Freejack wrote:
I'm curious, does Oz/Mozart have any sort of "Representation" tool for
optimizing and mapping functors and data to lower level constructs? i.e.

tree(key:X Item:Y left:LT right:RT)
declare in
        tree[
          for Key use Unsigned_Integer_32
          for Item use Machine_Word
          for LT#RT use Machine_Word ]

The internal representation is not available to the programmer. Oz is machine-independent, you have no direct access to low-level constructs.

Though in your example, the representation will be close to optimality. The record itself has a pointer to its type (label + arity), and a table with references to the fields. At first approximation, the reference is a pointer to the value itself, or to another reference, or an integer (if not too large). Intermediate references come from logic variables.

raph

_________________________________________________________________________________
mozart-users mailing list                               
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users

Reply via email to