HTCondor Project List Archives



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Condor-devel] [classad-users] RFC: an implementation of classads enhanced with macro evaluation



OK, I understand your goal, thanks. 

Two things strike me. 

First, there's a tradeoff between doing this in ClassAds and as a pre-processing step before it gets to ClassAds. Clearly you get more power if you can use ClassAd evaluation. But it's worth considering the tradeoff because it's also an extra complexity to the language.

Second, I think this has to be really carefully defined. The ClassAd language spec has been carefully thought through, and this proposal should get no less thought. A couple of things spring to mind. 

Order of evaluation: Are you guaranteed a specific order of evaluation? Probably, but I don't know if the ClassAd spec talks about that. I wonder about more complex cases where you have nested ClassAds. For example:

[
  x = 5;
  y = [ x = 6; y = $(x + 1); ];
  z = [ y = $parent.x ]
]

What value does y.y get? Was the "x = 6" evaluated at this point? How about z.y? 

What about "x = $(x)" ?

Does $ mean "value of this variable" or "evaluate this expression now"? Can I do the following?

x = $time()

can I do this?

[
  x = 3;
  y = [ x = 4 ];
  z = $x + $y.x; # should evaluate to 7? 
]

I'm sure there are reasonable answers to all of these, but there are lots of corner cases that you have to think through in order to make sure this all works as you expect.

-alain