Replies: 1 comment
-
This is interesting to me - I did get a vague feeling of this three-valued logic being appropriate when writing my actions. Right now, the suggested pattern seems to be to have a From reading the initial post, I think |
Beta Was this translation helpful? Give feedback.
-
This is a very rough idea that needs some thinking. We have always had problems with
Assert
in Apalache, because it is kind of Boolean, but it also should report an error somehow, which is very hard to do in symbolic execution.Started as a comment: #552 (comment)
We could let actions to have three kinds of results:
Executed
,NotExecuted
, andFail
.Executed
is exactly liketrue
in the current system, andNotExecuted
andFail
representfalse
together.NotExecuted
would mean that the action is disabled in a state, whileFail
would mean that the action was not disabled, but it is not well-defined in a state. The most immediate example of this would beassert
.Moreover, as we have seen, it would help us to explain actions to people, as our first users are surprised to see Boolean results.
If we want to try this approach, we would have to understand how ternary results combine via
any
andall
. I did a quick search. There are paper on three-valued logics, e.g., this paper. That probably needs further search./cc @shonfeder, @bugarela, @Kukovec, @thpani
Beta Was this translation helpful? Give feedback.
All reactions