Re: [classad-users] Newbie Question: Evaluation of logicalexpressions


Date: Mon, 4 Feb 2002 13:27:40 -0600 (CST)
From: Rajesh Raman <dr_rajesh_raman@xxxxxxxxx>
Subject: Re: [classad-users] Newbie Question: Evaluation of logicalexpressions
Both Alain and Marv are right.

1. The current implementation does evaluate all
operands --- even in new classads (I think)

2. The semantics allow for a better implementation,
and were designed with this purpose in mind.  (See the
truth tables in the C++ classad tutorial.)  I just
didn't spend the time to optimize all the cases
because the current expressions aren't very expensive
to evaluate (particularly with caching)  This is
obviously an invalid assumption given db/corba/rpc
calls.

3. The code Marv showed lives inside _doOperation (I
think).  The code Alain showed lives inside Operation.
They are co-existent (to the best of my recall).  At
some point in time, I just plugged in the new classad
evaluation engine under old classads.  Obviously, the
higher layers didn't use many of the features of the
lower layers, and the new classad evaluation engine
had subsequent improvements made.  The bottom line is
that there is more commonality than one might
initially think, but many differences as well.  You
just have to read the source ... :-)

4. It should be possible to clean up the
implementation
to allow the desired semantics, HOWEVER ...

5. ... if you're looking up databases, corba, etc.
(which are all stateful as implied by the desired
usage), I urge someone to carefully think about the
implications with respect to partial evaluation and
flattening.  If some function call is partially
evaluated prematurely and the state of the database,
corba object, etc. later changes, you're going to face
problems.  (This is me wearing my language designer
hat --- in practice, Condor probably doesn't partially
evaluate, avoiding this issue.)  But think about this
one anyway ... at some time Condor will flatten both
expressions and the competition ;-)

Cheers,


++Rajesh

__________________________________________________
Do You Yahoo!?
Great stuff seeking new owners in Yahoo! Auctions! 
http://auctions.yahoo.com
Condor Classads Info:
http://www.cs.wisc.edu/condor/classad/




[← Prev in Thread] Current Thread [Next in Thread→]