[Oz] dynamic creation of objects

Alexander Felfernig alf at ifit.uni-klu.ac.at
Tue May 18 07:46:26 CEST 1999


I did'nd succeed in solving the following problems:
- How to use an attribute or a property of an object as
  a finite domain variable?
- Depending on the actual value of a FD-variable objects
  should be created resp. destroyed.
  -> if the number of subparts of X is instantiated to 2 then
  2 subpart-objects should exist for X.

Thanks,
Alexander Felfernig

>From - Wed May 19 09:54:25 1999
Received: from munchkin.ps.uni-sb.de (munchkin.ps.uni-sb.de [134.96.186.68])
	by grizzly.ps.uni-sb.de (8.9.1a/8.9.1) with ESMTP id JAA18614
	for <tmueller at grizzly.ps.uni-sb.de>; Wed, 19 May 1999 09:32:44 +0200
Received: by munchkin.ps.uni-sb.de (8.9.1a/8.9.1) id JAA11968;
	Wed, 19 May 1999 09:32:43 +0200 (MET DST)
Date: Wed, 19 May 1999 09:32:43 +0200 (MET DST)
From: owner-oz-users at ps.uni-sb.de
Message-Id: <199905190732.JAA11968 at munchkin.ps.uni-sb.de>
X-Authentication-Warning: munchkin.ps.uni-sb.de: majordom set sender to owner-oz-users at ps.uni-sb.de using -f
To: tmueller at ps.uni-sb.de
Subject: BOUNCE oz-users at ps.uni-sb.de: Approval required:    Non-member submission from [Christian Schulte <schulte at ps.uni-sb.de>]   

>From tmueller  Wed May 19 09:32:42 1999
Received: from grizzly.ps.uni-sb.de (IDENT:news at grizzly.ps.uni-sb.de [134.96.186.119])
	by munchkin.ps.uni-sb.de (8.9.1a/8.9.1) with ESMTP id JAA11962
	for <oz-users at munchkin.ps.uni-sb.de>; Wed, 19 May 1999 09:32:41 +0200 (MET DST)
Received: (from news at localhost)
	by grizzly.ps.uni-sb.de (8.9.1a/8.9.1) id JAA18593
	for users at mozart-oz.org; Wed, 19 May 1999 09:32:41 +0200
To: users at mozart-oz.org
Path: not-for-mail
From: Christian Schulte <schulte at ps.uni-sb.de>
Newsgroups: ps.lists.oz-users
Subject: Re: [Oz] dynamic creation of objects
Date: Wed, 19 May 1999 09:32:41 +0200
Organization: Programming Systems Lab, =?iso-8859-1?Q?Universit=E4t?= des Saarlandes
Lines: 36
Message-ID: <37426919.B3EF4D5E at ps.uni-sb.de>
References: <3740FEB2.C2A45208 at ifit.uni-klu.ac.at>
NNTP-Posting-Host: wallaby.ps.uni-sb.de
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Trace: grizzly.ps.uni-sb.de 927099161 18592 134.96.186.115 (19 May 1999 07:32:41 GMT)
X-Complaints-To: usenet at ps.uni-sb.de
NNTP-Posting-Date: 19 May 1999 07:32:41 GMT
X-Mailer: Mozilla 4.51 [en] (X11; I; Linux 2.2.5 i686)
X-Accept-Language: en

Alexander Felfernig wrote:
> 
> I did'nd succeed in solving the following problems:
> - How to use an attribute or a property of an object as
>   a finite domain variable?

The first step is to get a finite domain variable, say as follows:

	X = {FD.int 1#100}

The second step is: you can do whatever you like with X, in particular
store it into an attribute of an object

	meth storeXunderA
	   a <- X
        end

> - Depending on the actual value of a FD-variable objects
>   should be created resp. destroyed.
>   -> if the number of subparts of X is instantiated to 2 then
>   2 subpart-objects should exist for X.

When do you want the objects to be created? As soon as X is bound to the
value 2? This can be done as follows:

	if X==2 then
	   % Create object
        end

I might miss something here, perhaps you can clarify a little bit.

Best regards
--Christian

---------------------------------------------------------------
Christian Schulte, http://www.ps.uni-sb.de/~schulte/
-
Please send submissions to users at mozart-oz.org
and administriva mail to users-request at mozart-oz.org.
The Mozart Oz web site is at http://www.mozart-oz.org/.





More information about the mozart-users mailing list