# Dafny

> programming language

**Wikidata**: [Q48989398](https://www.wikidata.org/wiki/Q48989398)  
**Wikipedia**: [English](https://en.wikipedia.org/wiki/Dafny)  
**Source**: https://4ort.xyz/entity/dafny

## Summary
Dafny is a verification-aware programming language and proof assistant created by K. Rustan M. Leino. Developed in 2009, it supports functional and imperative programming paradigms and is designed to communicate instructions to a machine while facilitating program verification.

## Key Facts
- **Developer:** Created by K. Rustan M. Leino, a computer scientist and Ph.D. graduate of the California Institute of Technology (1995). Contributors also include Remy Willems and Daniel Matichuk.
- **Inception:** The language was established in 2009.
- **Classification:** It is classified as both a programming language and a proof assistant.
- **Paradigms:** Dafny utilizes functional programming, imperative programming, and design by contract.
- **Google Knowledge Graph ID:** /g/11f3f1hqn2.
- **Wikipedia Presence:** Available in 4 language editions (English, Spanish, Estonian, Basque).
- **Related Technologies:** Associated with F*, a functional programming language aimed at program verification.

## FAQs
### Q: Who created the Dafny programming language?
A: Dafny was created by K. Rustan M. Leino, a computer scientist who received his Ph.D. from the California Institute of Technology in 1995.

### Q: What programming paradigms does Dafny support?
A: Dafny supports multiple paradigms, including functional programming, imperative programming, and design by contract.

### Q: When was Dafny developed?
A: Dafny was developed in 2009.

## Why It Matters
Dafny matters in the field of computer science because it bridges the gap between standard software development and formal verification. While most programming languages focus solely on instructing a machine to perform tasks, Dafny acts as both a programming language and a proof assistant. This dual nature allows developers to mathematically prove the correctness of their code, ensuring that the software behaves exactly as intended without bugs or logical errors.

Developed by K. Rustan M. Leino, the language incorporates "design by contract" principles, allowing programmers to define strict specifications that the code must adhere to. Its support for both functional and imperative paradigms provides flexibility, making it a significant tool for researchers and developers focused on high-assurance software. By enabling the verification of complex algorithms, Dafny plays a critical role in advancing the reliability and security of software systems.

## Notable For
- **Dual Functionality:** Uniquely classified as both a programming language and a proof assistant.
- **Verification-Oriented:** Designed specifically to support program verification, similar to related languages like F*.
- **Multi-Paradigm Support:** Combines functional and imperative programming styles alongside design by contract.
- **Academic Foundations:** Developed by a prominent computer scientist with a background from the California Institute of Technology.

## Body

### Development and Origins
Dafny was inceptioned in 2009. The primary developer is K. Rustan M. Leino, a computer scientist who obtained his Ph.D. from the California Institute of Technology in 1995. Development contributions are also credited to Remy Willems and Daniel Matichuk. The project is maintained openly, with contributor history available via its GitHub repository.

### Language Classification and Paradigms
Dafny is explicitly defined as an instance of a "programming language" and a "proof assistant." It serves as a language for communicating instructions to a machine. The language supports a hybrid of programming styles, specifically:
*   **Functional Programming**
*   **Imperative Programming**
*   **Design by Contract**

### Technical Context and Ecosystem
Dafny exists within an ecosystem of verification-focused tools. It is closely related to F*, a functional programming language inspired by ML that is also aimed at program verification. The language has a global presence with Wikipedia titles available in English, Spanish, Estonian, and Basque. Its official logo is hosted on Wikimedia Commons.

## References

1. [Source](https://github.com/dafny-lang/dafny/graphs/contributors)