Skip to content

Add experimental Dafny backend#119

Draft
Philipp15b wants to merge 1 commit into
mainfrom
feature/dafny-backend
Draft

Add experimental Dafny backend#119
Philipp15b wants to merge 1 commit into
mainfrom
feature/dafny-backend

Conversation

@Philipp15b

Copy link
Copy Markdown
Collaborator

Summary

This adds an experimental Dafny backend for Caesar.

  • adds caesar dafny and caesar to-dafny
  • translates a restricted Boolean proc-based fragment of HeyVL to Dafny
  • emits one .dfy file per input .heyvl file, with reachable and all output scopes
  • adds backend-focused tests, curated comparison examples, and user documentation
  • adds Dafny syntax highlighting for the docs site

Supported fragment

The current backend is intentionally narrow.

  • proc, not coproc
  • Boolean specifications via ?(b)
  • classical statements, procedure calls, and while loops with @invariant(?(...))
  • domains, axioms, definitional and bodyless functions, and built-in sequences

Limitations

This is an initial backend intended for iteration.

  • quantitative features and most proof-rule-specific encodings are out of scope
  • some translated programs still need manual adjustment before they pass dafny verify
  • the main remaining Dafny-side issue is recursive helper functions over symbolic domains

Validation

  • cargo test --quiet 'dafny::tests::'
  • cargo test --test integration -- comparison
  • npm run build in website/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant