6.S057: 6.S057: Verified Software Engineering

Problem Set 10

Loops with arrays

The deadline for this problem set was Wednesday, December 2 at 9pm.

Submit your work on Gradescope at Problem Set 10.

Before you start this problem set

Please fill out a survey about the time you spent on Problem Set 9.

Download

The structure here follows that of previous psets: read pset10_definitions.dfy to see our supporting definitions, complete pset10.dfy with implementations of verified methods, and use pset10_validator.dfy to confirm you’re done.

You may not change the implementation code. // In this assignment, we provide method implementations but not enough // annotations to convince Dafny that the methods are correct. In each case, // your job is to add annotations without changing lines of code that // determine the step-by-step executable behavior of a method. Sometimes there // exists a simpler but less-efficient implementation of a method; it doesn’t // count to switch to that version so there is less proving work!

See also pset10_hints.dfy for suggestions, in case you get stuck. But beware that this file may give away some of the interesting challenges.

Copyright 6.S057 course staff.