Alex --
Though a developer rather than end user tool, I developed something similar for a translation program which updated data from a non-relational to a relational format.
There were 3 fields:
1. the sequence of the rule
2. a formula to evaluate whether the formula was applicable (returning .T. or .F.)
3. the formula to make a transformation if the applicable formula triggered .T.
For my simple needs, this worked well. I allowed all appropriate conditions to fire the transformation, so that might be triggered multiple times for one data item. Each transformation involved 1 piece of data -- an assignment or a replace. Therefore, the calling program didn't have to assign a return value to a specific variable; that was performed in the transformation function. The calling routine DID have to have variables and values in scope.
An approach like that can be adapted to a variety of different types of rule systems with a narrow focus. For a broad focus, Prolog would be more appropriate.
HTH,
Jay
>I want to create a very flexible program to interpret employee key punches (in, out, and perhaps missing) and by using a schedule and a previously defined set of rules, calculate the different rates of pay applicable.
>
>The rules may be very complex and they can be totally different from one locale to another. Essentially I would like to implement a rule definition language with which to write the rules. Can anybody point me towards some reference?
>
>TIA,
>
>Alex
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement