dynamic types +

Erik Zuurbier F.S.A.Zuurbier@inter.nl.net
Wed, 18 Mar 1998 19:50:54 +0100


Now that dynamic types are coming up,
the following programs seem to be easier to write:

Say I have an application in which I maintain many different
international purchasing contracts of say aircraft fuel.
They typically have all kinds of handling fees, airport tax,
environment tax, sliding scales, quantity discounts and what not.

I want to put all that and the calculation rules in the contract,
but (also) in a way that can in a later stage be used to check incoming
invoices, applying the calculation rules.

What formalism to record the calculation rules in the contract
would be better than Clean itself? So I would build the contract
application where the user would have (limited) access to the 
Clean compiler to produce an item of dynamic type that could
be filed by the contract application and used in the invoice-checking
system.

Or: say we have an application to produce an 'optimal' roster for
the flight attendants on all the scheduled flights of an airline. The
application might use an operations research algorithm to come up
with a number of alternative rosters, which then have to be checked
with a huge list of rules concerning the work hours regulations, airline
policy and labour union requirements. Those rules tend to change
often. State of the art rostering applications use a formal language to
express all the rules. That language is typically designed for that
particular rostering application. But why should we have to design
a formal language for such an application if we have....Clean!
Again a possible application where the user could be given
access to (part of) the compiler.

Maybe future versions of the Clean system could give me the
possibility to 'export' part of the compiler capability to the
applications I make.

Regards Erik zuurbier