Skip to content

Wiki page on Dynamic Frames #292

@samuelgruetter

Description

@samuelgruetter

I was struggling to understand how to get modifies clauses right. If I understand correctly, there's a mechanical pattern involving Repr and Valid, which is just some boilerplate code I have to write and then not worry about it anymore, or which I could even have autogenerated by :autocontracts. Is there a guide about this? At the moment, all I have is

What's missing is a bigger example with at least three layers of nested objects and some while loops, because that's where the difficulties usually come up.

The revisions of this gist show how I got stuck on a modifies clause problem and then solved it.
Not sure if I would have succeeded without talking to @RustanLeino, so the issue is "create documentation so that users can learn this on their own".

Metadata

Metadata

Assignees

Labels

part: documentationDafny's reference manual, tutorial, and other materialspriority: not yetWill reconsider working on this when we're looking for work

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions