fix(deps): update dependency org.dafny:dafnyruntime to v4.8.1 #901
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
4.8.0
->4.8.1
Release Notes
dafny-lang/dafny (org.dafny:DafnyRuntime)
v4.8.1
New features
feat: allow type parameters of
newtype
declarationsfeat: support optional
witness
clause of constraint-lessnewtype
declarationsfeat: show tool tips for auto-completed type parameters
feat: show tool tips for inferred
(==)
characteristicsfix: Don't let
newtype
well-formedness checking affect witness checking (fixes ##5520)fix: Check the emptiness status of constraint-less
newtype
declarations (fixes #5521)https://github.com/dafny-lang/dafny/pull/54955495)
New feature: model extractor
CLI option
The
dafny verify
command now has an option--extract:<file>
, where (just like for the various print options)<file>
is allowed to be-
to denote standard output.Extract mechanism
Upon successful verification, the new extract mechanism visits the AST of the given program. For any module marked with
{:extract}
, the extract-worthy material from the module is output. The output declarations will be in the same order as they appear textually in the module (in particular, the fact that module-level Dafny declarations are collected in an internal class_default
has no bearing on the output order).Three kinds of declarations are extract-worthy:
A type declaration
A<X, Y, Z>
that bears an attribute{:extract_name B}
is extracted into a Boogie type declarationtype B _ _ _;
.The definition of the type is ignored. (The intended usage for an extracted type is that the Dafny program give a definition for the type, which goes to show the existence of such a type.)
A function declaration
F(x: X, y: Y): Z
that bears an attribute{:extract_name G}
is extracted into a Boogie function declarationfunction G(x: X, y: Y): Z;
.The body of the Dafny function is ignored. (The intended usage for an extracted function is that the Dafny program give a definition for the function, which goes to show the existence of such a function.)
A lemma declaration
L(x: X, y: Y) requires P ensures Q
that bears an attribute{:extract_pattern ...}
or an attribute{:extract_used_by ...}
is extracted into a Boogieaxiom
. The axiom has the basic formaxiom (forall x: X, y: Y :: P ==> Q);
.If the lemma has an attribute
{:extract_used_by F}
, then the axiom will be emitted into theuses
clause of the Boogie function generated for Dafny functionF
.If the lemma has no in-parameters, the axiom is just
P ==> Q
.If the lemma has in-parameters, then any attribute
{:extract_pattern E, F, G}
adds a matching pattern{ E, F, G }
to the emitted quantifier. Also, any attribute{:extract_attribute "name", E, F, G}
adds an attribute{:name E, F, G}
to the quantifier.Expressions
The pre- and postconditions of extracted lemmas turn into analogous Boogie expressions, and the types of function/lemma parameters and bound variables are extracted into analogous Boogie types. The intended usage of the extract mechanism is that these expressions and types do indeed have analogous Boogie types.
At this time, only a limited set of expressions and types are supported, but more can be added in the future.
Any
forall
andexists
quantifiers in expressions are allowed to use:extract_pattern
and:extract_attribute
attributes, as described above for lemmas.Some extracted expressions are simplified. For example,
true && !!P
is simplified toP
.Soundness
The Dafny program that is used as input for the extraction is treated like any other Dafny program. The intended usage of the extraction mechanism is to prove parts of the axiomatization in
DafnyPrelude.bpl
to be logically consistent. Whether or not the extracted Boogie declarations meet this goal depends on the given Dafny program. For example, if the given Dafny program formalizes sequences in terms of maps and formalizes maps in terms of sequences, then the extraction probably does not provide guarantees of consistency.(https://github.com/dafny-lang/dafny/pull/5621)
{:test}
methods generate#[test]
wrappers in Rust that can be invoked usingcargo test
.Similarly,
{:rust_cfg_test}
on modules generates a#[cfg(test)]
in the resulting rust module.https://github.com/dafny-lang/dafny/pull/56765676)
Bug fixes
Allow hiding instance member using a static reference
Enable using "hide *" in the context of a recursive function
Support for double constant initialization in Dafny-to-Rust (https://github.com/dafny-lang/dafny/pull/5642)
Support for enumerating datatypes in the Rust backend (https://github.com/dafny-lang/dafny/pull/5643)
Tail-Recursion for the Dafny-to-Rust compiler (https://github.com/dafny-lang/dafny/pull/5647)
The new resolver (accessible using
--type-system-refresh
) can now handle revealing instance functions using a static receiver, as it is the case for the current resolver (https://github.com/dafny-lang/dafny/pull/5760)Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.