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_op:AircraftOp)that returns:OK, if every waypoint in the flight plan ofac_oplies inside the USS operational volume, orFailure(wps)otherwise, wherewpsis the list of waypoints in its flight plan that lie outside the USS operational volume.
- Modify the function
subscribeinUTM.pvsso that only aircraft operationsac_opthat satisfycheck_flight_plan(uss,ac_op) = OKare subscribed. Throw an exception ifcheck_flight_plan(uss)returns aFailure.