If I have a parameter file containing
CoordBase::ymin = -CoordBase::dy * 2 CoordBase::dy = 0.1
it looks like Cactus silently ignores the CoordBase::dy in CoordBase::ymin, and tries to set ymin = 2, presumably because dy has not been set "yet". This raises two points:
- The parser should raise a fatal error if it does not have a value for a parameter it is expanding;
- The order of parameters listed in the parameter file should not matter.
I think that parameter files should be declarative rather than imperative; i.e. you should think of them as a static mapping from parameter names to values rather than as a program which sets (and resets?) variables in the sequence written in the parameter file. A simple way to transform the current "set each parameter in sequence" implementation would be to sort the assignments so that parameters are set before they are used, and to raise a fatal error if a parameter is set twice. Would it be possible to implement this?