Exercises: Developing and Proving Algorithms with PVS (Part II)
Consider the theories UTM0, UTM, and the lecture Developing and Proving Algorithms with PVS (Part II).
- Write a strategy called
uss-tccand use it to discharge the proofs ofsubscribe_j,test_0,test_1,Dos, andtest_update. Hint: The strategy does the following: first applygrind, then to each generated subgoal, expandexists_opas many times as needed. - Define the function
in_operational_volume?(uss:USS)(p:Vect3) : boolthat returnsTRUEif the pointpis inside the operational volume ofuss. Hint: Check that:- The vertical component of
p, i.e.,p`z, is belowuss`op_alt. - The horizontal component of
p, i.e.,vect2(p), is insideuss`op_area. - Look for the names of the functions in
NASALib/shapesthat check if a point is inside a circle, rectangle, and triangle.
- The vertical component of
- Define the function
check_flight_plan(uss:USS,ac_id:AircraftId)that returns:NotFound, if the aircraftac_idis not inuss;OK, if the aircraft is inussand every waypoint in its flight plan lies inside the USS operational volume;Failure(wps)otherwise, wherewpsis the list of waypoints in its flight plan that lie outside the USS operational volume.