Parameter Checking ------------------ Author: Gabrielle Allen Date: February 2001 Why --- Need to firm up and document the parameter checking from parameter files, and for steerable parameters, and recovery from parameter files Definitions ----------- Parameter syntax: parameter (global parameters) label::parameter Where label indicates a implementation or thorn. Parameter checking levels set by command line -parameter-level= where level is relaxed: only error for out of range normal: error for parameters from an active thorn which are not found strict: error for anything wrong Specification ------------- Steered parameters: steered parameters should never cause errors From a parameter file: if (label is active implementation and/or thorn) if (active implementation with different name to implementing thorn) set parameter end if if (active thorn) set parameter end if if (succeeding in setting for BOTH active thorn and active implementation) if (parameter check == strict or normal) ERROR else if (parameter check == relaxed) WARN end if else if (couldn't set for EITHER active thorn or active implementation) /* If both active which one do I report about here? */ if (parameter name valid) if (changing value of a non steerable parameter at recovery) if (parameter check == strict or normal) ERROR else if (parameter check == relaxed) WARN end if else if (out or range) ERROR endif else /* parameter name not valid */ if (parameter check == strict or normal) ERROR else if (parameter check == relaxed) WARN end if end if end if else if (label exists but not active) if (parameter check == strict) ERROR else if (parameter check == normal) WARN else if (parameter check == relaxed) NOTHING end if else set global parameter if (parameter name valid) if (changing value of a non steerable parameter at recovery) if (parameter check == strict or normal) ERROR else if (parameter check == relaxed) WARN end if else if (out or range) ERROR endif else /* parameter name not valid */ if (parameter check == strict or normal) ERROR else if (parameter check == relaxed) WARN end if endif end if Notes ----- The correct syntax is to specify a parameter using its implementation if it is public or protected, and its thorn name if it is private. However, we allow parameters to be specified wrongly using either an implementation or thorn name, but strongly recommend people to use the correct syntax, especially is they are working with multiple thorns for a single implementation. Questions: --------- 1) implementations/thorns with the same name as described above 2) is there any way to set the parameter checking level apart from at the command line?