Exercises: Developing and Proving Algorithms with PVS (Part I)
Consider the theory UTM0 and the lecture Developing and Proving Algorithms with PVS (Part I).
- Using
remove_op, define the functionunsubscribethat unsubscribes any operation of aircraftac_idfromops. - Define a type judgement
unsubscribe_jfor the functionunsubscribestating thatresult, the output of the function, does not have an operation for aircraftac_id, the input parameter of the function. Prove the type judgement usingremove_op_jas a lemma. - Fix
test_1so that it holds. Hint: What is known aboutAc0,Ac1, andAc2? What should be assumed? - Fix
subscribeso that only one operation per aircraft can be subscribed. After the change, make sure all TCCs and LEMMAS are still valid. - Define the function
updatethat modifies the operation for a given aircraft. The function does nothing if the aircraft is not subscribed. Write a lemma to test the functionality. Hint: First, define a recursive function onOperationsthat changes an element in the list. Then, use this function to defineupdate.