Solving II

Suppose that we didn't have the web service area-rad that returns radius given the area of the circle?
But suppose we have a special web service
Compute that returns the value of some simple functions given an input value.

A Variant Rule for Knowing:
<= (True (Know ?part-name2 Return-Compute)
        (do (Call-Web-Service Compute
            function ?function ?part-name1 ?value1 ?part-name2) ?s))
      (Yields ?function ?part-name1 ?part-name2 )
      (True (Know (?part-name1 ?value1)) ?s)

Now we just need function RADAR
(Yields RADAR area-circle radius-circle )
that returns the radius of the circle given the area of the circle and we would have the plan:
(DO (CALL-WEB-SERVICE COMPUTE FUNCTION RADAR
       AREA-CIRCLE RETURN-CIRCUM-RAD RADIUS-CIRCLE)
   (DO (CALL-WEB-SERVICE CIRCUM-RAD CIRCUMFERENCE-CIRCLE 8 AREA-CIRCLE)
    S0) )



© 2005 Charles Petrie cjp