Solving I

One Rule for Knowing

(<= (True (Know (?part-name2 ?value2))
        (do (call-web-service ?a ?part-name1 ?value1 ?part-name2) ?s))
(Web-Service ?a)
(Output ?a ?part-name2 ?value2)
(Input ?a ?part-name1)
(True (Know (?part-name1 ?value1)) ?s))

From (True (Know (circumference-circle 8)) s0)
The query (findx '?plan '(True (Know (radius-circle ?x)) ?plan) 'web-plan)
yields a plan to call the two web services in sequence:
(DO (CALL-WEB-SERVICE AREA-RAD
           AREA-CIRCLE RETURN-CIRCUM-RAD RADIUS-CIRCLE)
1)Call the web service (area-rad) that returns the radius of the circle
in the state where we got the area of the circle using the return of the next
web service as the input (area-circle := return-circum-rad)
   (DO (CALL-WEB-SERVICE CIRCUM-RAD
        CIRCUMFERENCE-CIRCLE 8 AREA-CIRCLE)
    S0) )
2) Call the web service (circum-rad) that returns the area of the circle given the circumference (circumference-circle := 8) that we know in state S0.



cjp