---
title: Miscellaneous Dafny Examples
---

The links below connect to annotated examples of Dafny source code,
demonstrating various coding techniques or proof capabilities.
Each of these verify successfully.

The files for these examples can be found in 
the [examples folder of Dafny's github project](https://github.com/dafny-lang/dafny/tree/master/Source/IntegrationTests/TestFiles/LitTests/LitTest/examples).

- [Simple Maximum method](https://github.com/dafny-lang/dafny/tree/master/Source/IntegrationTests/TestFiles/LitTests/LitTest/examples/maximum.dfy)
- [Tutorial on parser combinators](https://github.com/dafny-lang/dafny/tree/master/Source/IntegrationTests/TestFiles/LitTests/LitTest/examples/parser_combinators.dfy)
- [A simple compiler](https://github.com/dafny-lang/dafny/tree/master/Source/IntegrationTests/TestFiles/LitTests/LitTest/examples/Simple_compiler)
- [An example of significant use of induction on a mini-compiler](https://github.com/dafny-lang/dafny/tree/master/Source/IntegrationTests/TestFiles/LitTests/LitTest/examples/induction-principle.md)

