1. Write down a C program and a Promela model to solve the Tower of Hanoi game (3 poles and 4 disks) by using CBMC and Spin • Hint: you may non-deterministically select the disk to move • Find and describe the shortest solution by analyzing counter examples. Also explain why your solution is the shortest one. – Use non-determinism and __CPROVER_assume() properly for the moving choice – Use assert statement to detect when all the disks are moved to the destination • Report the complexity of the problem – i.e., # of clauses and variables, # of states, memory usage, verification time, etc. HW #5 Due Nov 14 23:59
HW #5 Due Nov 14 23:59. 1. Write down a C program and a Promela model to solve the Tower of Hanoi game (3 poles and 4 disks) by using CBMC and Spin Hint : you may non-deterministically select the disk to move - PowerPoint PPT Presentation
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
1. Write down a C program and a Promela model to solve the Tower of Hanoi game (3 poles and 4 disks) by using CBMC and Spin
• Hint: you may non-deterministically select the disk to move
• Find and describe the shortest solution by analyzing counter examples. Also explain why your solution is the shortest one. – Use non-determinism and __CPROVER_assume() properly for the moving
choice– Use assert statement to detect when all the disks are moved to the desti-
nation • Report the complexity of the problem
– i.e., # of clauses and variables, # of states, memory usage, verification time, etc.
HW #5 Due Nov 14 23:59
Q2:Royal Garden’s Puzzle as a Model Checking Problem