Language
-
Allow empty types
-
Update meaning of the
(0)type characteristic. Each type now falls into one of three categories:- Auto-initializing, denoted by the type characteristic
(0). The type is known to have a
compilable value. This lets variables in compiled contexts be used before initialization. - Nonempty, denoted by the type characteristic
(00). The type is known to have at least one
possible value. This lets variables in ghost contexts be used before initialization. In
compiled contexts, a variable of this type is subject to definite-assignment rules (which
means the variable must be assigned before any use). - Possibly empty, denoted by the absence of
(0)and(00). This restricts use of variables
of the type, making them subject to definite-assignment rules in both compiled and ghost
contexts.
- Auto-initializing, denoted by the type characteristic
-
Introduce map merge operator (syntax
m0 + m1), whose keys are the union of the keys ofm0andm1,
and which for the keys inm1associates the same values as inm1and for the other keys
associates the values ofm0. Works on bothmapandimap, but both arguments must be the same.
Compilation support in 5 target languages (C#, JavaScript, Go, Java, C++). -
Introduce map domain subtraction operator (syntax
m - s), which is like mapmbut without
any key in sets. Operandmcan be either amaporimap, butscan only be aset
(not aniset).
Compilation support in 5 target languages (C#, JavaScript, Go, Java, C++). -
Fix some inconsistencies in the grammar. For example, be more consistent about where digit names
and names beginning with an underscore are allowed. -
Allow assignments
c := t;where the type oftis a parent trait of the type ofc. This gives
a way to cast atraitto aclass. However, this is not a type test and the verifier will
check that the value oftreally does satisfy the type ofc.
Verification
-
Pass fewer options to Z3.
-
Add bitvector type axioms.
-
Fix termination check for infinite/unknown types.
Compilation
-
Clean up some Java runtime. For example, remove some unused methods. Also, rename some methods.
-
Fix construction of maps in Java.
-
Append “
-java” to the name of the Java target folder. For example, compilingMyProgram.dfy
to Java will create the target folderMyProgram-java.
Documentation
- Update Dafny Language Reference Manual
Tool
- Move from .NET Core 3.1 to .NET 5.0.
Miscellaneous
- Fix various bugs.