Imagine a frame-based travel-planning assistant, as discussed in the text. Let us focus on two of the generic frames used there, LodgingStay (which represents a hotel stay in a city while on a trip) and TravelStep (which represents any travel from one city to another). A LodgingStay has a :Place, in which the lodging is located, an :ArrivingTravelStep, and a :DepartingTravelStep, both of which are TravelSteps. A TravelStep has an :Origin and a :Destination, each of which is a city, a possible :OriginLodgingStay, and a possible :DestinationLodgingStay, each of which is a LodgingStay. For simplicity, assume that there is always a LodgingStay between any two TravelSteps. Write in English some combination of IF-NEEDED and/or IF-ADDED procedures that could be attached to the city slots of the various LodgingStay and TravelStep frames to keep them consistent. Statements like “set the :Place of my :OriginLodgingStay to be the same as this one” in a procedure are fine. Make sure that a change to one of these city slots does not cause an infinite loop
#Sales Offer!| Get upto 25% Off: