Hi. I've just started learning Jess based on the notion that the
combination of Jess and Junit test cases could yield an inspection
gauge system that automatically determines compliance between 
Java implementations and their specifications.

I need to provide a simplest-possible demonnstration of what I mean
by this for a paper I'm writing and am not confident enough yet to
do it on my own. Hope somebody here will help.

My simplest imaginable specification is: all (simulated) military
equipment shall have a getWeight() method that returns the equipment's
(simulated) weight in kgms. That's it, except the presumption that there
will be lots of kinds of military equipment to comply with that spec:
helmets, rifles, trucks, tanks, aircraft carriers. The MilitaryEquipment
Java interface will be pubished and required by all implementations

        interface MililtaryEquipment
        {
                double getWeight();
        }

In pidgin Jess (all I'm capable of right now), I'd imagine something
like this

        (isImplementationOf ?thisImplementation "MilitaryEquipment" &&
                (compareWeights (?thisImplementation.getWeight()) computeWeight())
                =>
                ... print ?thisImplementation "passes" mumble

The idea is, isImplementationOf determines whether thisImplementation
claims to be an implementation of the MilitaryEquipment specification,
and computeWeight() is a function the specification site uses to compute
its view of the right answer. CompareWeights is pidgin for a function in
the specification sites library of Junit test cases that calls the
implementation's getWeight method and compares it to the external
argument computed by the specification site's computeWeight() method.

Of course, this is just a toy example. The real goal is to see if the
approach is workable for realistic ones. Can someone help get me
started?

--------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the list
(use your own address!) List problems? Notify [EMAIL PROTECTED]
--------------------------------------------------------------------

Reply via email to