stainless icon indicating copy to clipboard operation
stainless copied to clipboard

Stainless Actors

Open jad-hamza opened this issue 3 years ago • 5 comments

Since we've added checks to arguments aliasing https://github.com/epfl-lara/stainless/pull/965, the stainless actors fails because of aliasing here: https://github.com/epfl-lara/stainless-actors/blob/8173788e75880fa04d004cd8443ed0ef70b1cd83/examples/kvs/src/main/scala/KVS.scala#L67

There is aliasing between ctx.self and the implicit parameter ctx being passed to !: https://github.com/epfl-lara/stainless-actors/blob/8173788e75880fa04d004cd8443ed0ef70b1cd83/src/main/scala/Actors.scala#L25

jad-hamza avatar Apr 06 '21 13:04 jad-hamza

Was this fixed in the benchmark, @jad-hamza ?

vkuncak avatar May 25 '21 12:05 vkuncak

No, we need to reorganize a bit the actors library to avoid the aliasing. The actors nightly tests are currently disabled from Stainless.

jad-hamza avatar May 25 '21 15:05 jad-hamza

I have tested them locally, it verifies. We could maybe try to enable them back (https://github.com/epfl-lara/stainless/pull/1208)?

mario-bucev avatar Nov 19 '21 13:11 mario-bucev

We should see if we can pass mutable objects between actors by using array swap primitive or adding something analogous. Actors need to have a state, and this state can be used to emulate non-determinism of communication. This seems like the fastest path to some form of concurrency in Stainless.

vkuncak avatar May 04 '22 14:05 vkuncak

If I'm not mistaken, actors should exchange immutable messages, but they are (obviously) allowed to mutate their data.

mario-bucev avatar May 04 '22 14:05 mario-bucev