{"id":20910101,"url":"https://github.com/viperproject/program-proofs-prusti","last_synced_at":"2025-07-06T23:34:27.409Z","repository":{"id":241795953,"uuid":"807608003","full_name":"viperproject/program-proofs-prusti","owner":"viperproject","description":"Examples and exercises from the book Program Proofs translated to Prusti","archived":false,"fork":false,"pushed_at":"2024-05-29T13:52:15.000Z","size":36,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-01-19T15:23:19.542Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/viperproject.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-05-29T12:31:53.000Z","updated_at":"2024-12-18T19:19:01.000Z","dependencies_parsed_at":"2024-05-30T05:02:06.148Z","dependency_job_id":null,"html_url":"https://github.com/viperproject/program-proofs-prusti","commit_stats":null,"previous_names":["viperproject/program-proofs-prusti"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/viperproject%2Fprogram-proofs-prusti","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/viperproject%2Fprogram-proofs-prusti/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/viperproject%2Fprogram-proofs-prusti/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/viperproject%2Fprogram-proofs-prusti/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/viperproject","download_url":"https://codeload.github.com/viperproject/program-proofs-prusti/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243302385,"owners_count":20269499,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-18T14:13:54.479Z","updated_at":"2025-03-12T22:23:15.289Z","avatar_url":"https://github.com/viperproject.png","language":"Rust","funding_links":[],"categories":["Books code"],"sub_categories":["Libraries"],"readme":"# `program-proofs-prusti`\n\nExamples and exercises from the book [*Program Proofs*](https://program-proofs.com/) by K. Rustan M. Leino translated to Rust and verified with [Prusti](https://prusti.ethz.ch/), a deductive verifier for Rust programs developed at ETH Zurich.\n\n## Repository structure\n\nEach chapter of the book that we have translated can be found in its own crate at the root of this repository.\n\nEach crate can be verified, as a whole, using [`cargo prusti`](https://viperproject.github.io/prusti-dev/user-guide/basic.html#command-line) from the command line or using the [Prusti Assistant](https://viperproject.github.io/prusti-dev/user-guide/basic.html#prusti-assistant) extension for VS Code.\n\nWithin each crate, there are two main subdirectories of interest:\n\n- `(chapter)/src/examples` - contains translated *examples*, i.e. various snippets of code from the given chapter;\n- `(chapter)/src/exercises` - contains translated *exercises*, i.e. (possible) solutions to the exercises from the given chapter.\n\nFiles in these subdirectories follow the naming scheme `example_(section)_(subsection).rs` or `exercise_(section)_(subsection).rs`. The remaining files in each crate serve to configure Prusti, configure Cargo, and to tie together the example and exercise files.\n\n## Current status\n\n|            | Chapter | Notes |\n| ----------:| ------- | ----- |\n| **PART 0** | **Learning the Ropes** | |\n| Chapter 1  | [Basics](chapter1) | |\n| Chapter 2  | [Making it Formal](chapter2) | |\n| Chapter 3  | [Recursion and Termination](chapter3) | Termination checking is not yet supported in Prusti |\n| Chapter 4  | [Inductive Datatypes](chapter4) | |\n| Chapter 5  | [Lemmas and Proofs](chapter5) | Ghost code is not yet supported in Prusti |\n| **PART 1** | **Functional Programs** | |\n| Chapter 6  | ~~Lists~~ | (Skipped) |\n| Chapter 7  | ~~Unary Numbers~~ | (Skipped) |\n| Chapter 8  | [Sorting](chapter8) | |\n| Chapter 9  | [Modules](chapter9) | |\n| Chapter 10 | ~~Data-Structure Invariants~~ | (Skipped) |\n| **PART 2** | **Imperative Programs** | |\n| Chapter 11 | ~~Loops~~ | (Skipped) |\n| Chapter 12 | ~~Recursive Specifications, Iterative Programs~~ | (Skipped) |\n| Chapter 13 | ~~Arrays and Searching~~ | (Skipped) |\n| Chapter 14 | [Modifying Arrays](chapter14) | |\n| Chapter 15 | ~~In-situ Sorting~~ | (Skipped) | |\n| Chapter 16 | [Objects](chapter16) | |\n| Chapter 17 | [Mutable Data Structures](chapter17) | |\n\n## References\n\nThe translations found in this repository were developed as part of Patrick Muntwiler's BSc thesis.\n\n- Muntwiler, Patrick. [\"Evaluating and Documenting a Rust Verifier.\"](https://ethz.ch/content/dam/ethz/special-interest/infk/chair-program-method/pm/documents/Education/Theses/Patrick_Muntwiler_BS_Thesis.pdf) (2023).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fviperproject%2Fprogram-proofs-prusti","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fviperproject%2Fprogram-proofs-prusti","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fviperproject%2Fprogram-proofs-prusti/lists"}