CS计算机代考程序代写 object(package6).

object(package6).
object(package5).
object(package4).
object(package3).
object(package2).
object(package1).
object(city6).
object(city5).
object(city4).
object(city3).
object(city2).
object(city1).
object(truck6).
object(truck5).
object(truck4).
object(truck3).
object(truck2).
object(truck1).
object(plane2).
object(plane1).
object(city6__1).
object(city5__1).
object(city4__1).
object(city3__1).
object(city2__1).
object(city1__1).
object(city6__2).
object(city5__2).
object(city4__2).
object(city3__2).
object(city2__2).
object(city1__2).
reachable_a(load__truck(A, B, C)) :- reachable(c7(A, B, C)).
reachable(c7(A, B, C)) :- reachable(c8(A)), reachable(c9(B)), reachable(c10(C)), reachable(c11(B, C)), reachable(c12(A, C)).
reachable(c8(A)) :- reachable_f(obj(A)).
reachable(c9(A)) :- reachable_f(truck(A)).
reachable(c10(A)) :- reachable_f(location(A)).
reachable(c11(A, B)) :- reachable_f(at(A, B)).
reachable(c12(A, B)) :- reachable_f(at(A, B)).
reachable(c13(A, C, B)) :- reachable_a(load__truck(A, B, C)).
reachable(c14(A, B)) :- reachable(c13(A, B, C)).
reachable(c15(A, C)) :- reachable(c13(A, B, C)).
reachable_f(in(A, B)) :- reachable(c15(A, B)).
reachable_a(load__airplane(A, B, C)) :- reachable(c16(A, B, C)).
reachable(c16(A, B, C)) :- reachable(c17(A)), reachable(c18(B)), reachable(c19(C)), reachable(c20(A, C)), reachable(c21(B, C)).
reachable(c17(A)) :- reachable_f(obj(A)).
reachable(c18(A)) :- reachable_f(airplane(A)).
reachable(c19(A)) :- reachable_f(location(A)).
reachable(c20(A, B)) :- reachable_f(at(A, B)).
reachable(c21(A, B)) :- reachable_f(at(A, B)).
reachable(c22(A, C, B)) :- reachable_a(load__airplane(A, B, C)).
reachable(c23(A, B)) :- reachable(c22(A, B, C)).
reachable(c24(A, C)) :- reachable(c22(A, B, C)).
reachable_f(in(A, B)) :- reachable(c24(A, B)).
reachable_a(unload__truck(A, B, C)) :- reachable(c25(A, B, C)).
reachable(c25(A, B, C)) :- reachable(c26(A)), reachable(c27(B)), reachable(c28(C)), reachable(c29(B, C)), reachable(c30(A, B)).
reachable(c26(A)) :- reachable_f(obj(A)).
reachable(c27(A)) :- reachable_f(truck(A)).
reachable(c28(A)) :- reachable_f(location(A)).
reachable(c29(A, B)) :- reachable_f(at(A, B)).
reachable(c30(A, B)) :- reachable_f(in(A, B)).
reachable(c31(A, B, C)) :- reachable_a(unload__truck(A, B, C)).
reachable(c32(A, B)) :- reachable(c31(A, B, C)).
reachable(c33(A, C)) :- reachable(c31(A, B, C)).
reachable_f(at(A, B)) :- reachable(c33(A, B)).
reachable_a(unload__airplane(A, B, C)) :- reachable(c34(A, B, C)).
reachable(c34(A, B, C)) :- reachable(c35(A)), reachable(c36(B)), reachable(c37(C)), reachable(c38(A, B)), reachable(c39(B, C)).
reachable(c35(A)) :- reachable_f(obj(A)).
reachable(c36(A)) :- reachable_f(airplane(A)).
reachable(c37(A)) :- reachable_f(location(A)).
reachable(c38(A, B)) :- reachable_f(in(A, B)).
reachable(c39(A, B)) :- reachable_f(at(A, B)).
reachable(c40(A, B, C)) :- reachable_a(unload__airplane(A, B, C)).
reachable(c41(A, B)) :- reachable(c40(A, B, C)).
reachable(c42(A, C)) :- reachable(c40(A, B, C)).
reachable_f(at(A, B)) :- reachable(c42(A, B)).
reachable_a(drive__truck(A, B, C, D)) :- reachable(c43(A, B, C, D)).
reachable(c43(A, B, C, D)) :- reachable(c44(A)), reachable(c45(B)), reachable(c46(C)), reachable(c47(D)), reachable(c48(A, B)), reachable(c49(B, D)), reachable(c50(C, D)).
reachable(c44(A)) :- reachable_f(truck(A)).
reachable(c45(A)) :- reachable_f(location(A)).
reachable(c46(A)) :- reachable_f(location(A)).
reachable(c47(A)) :- reachable_f(city(A)).
reachable(c48(A, B)) :- reachable_f(at(A, B)).
reachable(c49(A, B)) :- reachable_f(in__city(A, B)).
reachable(c50(A, B)) :- reachable_f(in__city(A, B)).
reachable(c51(A, B, C)) :- reachable_a(drive__truck(A, B, C, D)).
reachable(c52(A, B)) :- reachable(c51(A, B, C)).
reachable(c53(A, C)) :- reachable(c51(A, B, C)).
reachable_f(at(A, B)) :- reachable(c53(A, B)).
reachable_a(fly__airplane(A, B, C)) :- reachable(c54(A, B, C)).
reachable(c54(A, B, C)) :- reachable(c55(A)), reachable(c56(B)), reachable(c57(C)), reachable(c58(A, B)).
reachable(c55(A)) :- reachable_f(airplane(A)).
reachable(c56(A)) :- reachable_f(airport(A)).
reachable(c57(A)) :- reachable_f(airport(A)).
reachable(c58(A, B)) :- reachable_f(at(A, B)).
reachable(c59(A, B, C)) :- reachable_a(fly__airplane(A, B, C)).
reachable(c60(A, B)) :- reachable(c59(A, B, C)).
reachable(c61(A, C)) :- reachable(c59(A, B, C)).
reachable_f(at(A, B)) :- reachable(c61(A, B)).
reachable_f(obj(package6)).
reachable_f(obj(package5)).
reachable_f(obj(package4)).
reachable_f(obj(package3)).
reachable_f(obj(package2)).
reachable_f(obj(package1)).
reachable_f(city(city6)).
reachable_f(city(city5)).
reachable_f(city(city4)).
reachable_f(city(city3)).
reachable_f(city(city2)).
reachable_f(city(city1)).
reachable_f(truck(truck6)).
reachable_f(truck(truck5)).
reachable_f(truck(truck4)).
reachable_f(truck(truck3)).
reachable_f(truck(truck2)).
reachable_f(truck(truck1)).
reachable_f(airplane(plane2)).
reachable_f(airplane(plane1)).
reachable_f(location(city6__1)).
reachable_f(location(city5__1)).
reachable_f(location(city4__1)).
reachable_f(location(city3__1)).
reachable_f(location(city2__1)).
reachable_f(location(city1__1)).
reachable_f(airport(city6__2)).
reachable_f(location(city6__2)).
reachable_f(airport(city5__2)).
reachable_f(location(city5__2)).
reachable_f(airport(city4__2)).
reachable_f(location(city4__2)).
reachable_f(airport(city3__2)).
reachable_f(location(city3__2)).
reachable_f(airport(city2__2)).
reachable_f(location(city2__2)).
reachable_f(airport(city1__2)).
reachable_f(location(city1__2)).
reachable_f(in__city(city6__2, city6)).
reachable_f(in__city(city6__1, city6)).
reachable_f(in__city(city5__2, city5)).
reachable_f(in__city(city5__1, city5)).
reachable_f(in__city(city4__2, city4)).
reachable_f(in__city(city4__1, city4)).
reachable_f(in__city(city3__2, city3)).
reachable_f(in__city(city3__1, city3)).
reachable_f(in__city(city2__2, city2)).
reachable_f(in__city(city2__1, city2)).
reachable_f(in__city(city1__2, city1)).
reachable_f(in__city(city1__1, city1)).
reachable_f(at(plane2, city4__2)).
reachable_f(at(plane1, city4__2)).
reachable_f(at(truck6, city6__1)).
reachable_f(at(truck5, city5__1)).
reachable_f(at(truck4, city4__1)).
reachable_f(at(truck3, city3__1)).
reachable_f(at(truck2, city2__1)).
reachable_f(at(truck1, city1__1)).
reachable_f(at(package6, city3__1)).
reachable_f(at(package5, city4__2)).
reachable_f(at(package4, city1__1)).
reachable_f(at(package3, city1__1)).
reachable_f(at(package2, city1__2)).
reachable_f(at(package1, city2__1)).
equal(A, B) :- object(A), object(B), A = B.
reachable_goal :- reachable(c0).
reachable(c0) :- reachable(c1), reachable(c2), reachable(c3), reachable(c4), reachable(c5), reachable(c6).
reachable(c1) :- reachable_f(at(package6, city1__2)).
reachable(c2) :- reachable_f(at(package5, city6__2)).
reachable(c3) :- reachable_f(at(package4, city3__2)).
reachable(c4) :- reachable_f(at(package3, city6__1)).
reachable(c5) :- reachable_f(at(package2, city6__2)).
reachable(c6) :- reachable_f(at(package1, city2__1)).
#show reachable_a/1.
#show reachable_f/1.
#show reachable/1.
#show reachable_goal/0.