You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's currently not possible to use Dafny's datatypes and immutables collections with concurrent Rust code, because their generated structs are behind a reference-counted pointer Rc<> by default, and the reference count is not updated synchronously.
This makes it hard to use Dafny-generated code with external libraries like Tokio, which requires structs to implement the Send, and reference counting does not extend this trait. However, Arc<>, or asynchronous reference counting, implements the Send trait.
Sequences, Maps, Multisets and Sets all use Rc internally, so this means we would need to emit a modified version of the Runtime as well. Also, we should also ensure any lazy evaluation (like for sequence concatenation or codatatypes) also uses asynchronous reference counting or at least mutexes
The text was updated successfully, but these errors were encountered:
It's currently not possible to use Dafny's datatypes and immutables collections with concurrent Rust code, because their generated structs are behind a reference-counted pointer Rc<> by default, and the reference count is not updated synchronously.
This makes it hard to use Dafny-generated code with external libraries like Tokio, which requires structs to implement the Send, and reference counting does not extend this trait. However, Arc<>, or asynchronous reference counting, implements the Send trait.
Sequences, Maps, Multisets and Sets all use Rc internally, so this means we would need to emit a modified version of the Runtime as well. Also, we should also ensure any lazy evaluation (like for sequence concatenation or codatatypes) also uses asynchronous reference counting or at least mutexes
The text was updated successfully, but these errors were encountered: