Functional composition in the distributed setting #892
josef-widder
started this conversation in
User stories
Replies: 2 comments
-
This is an interesting point. We have heard a request for pre/post-conditions in the recent user interview. They may actually solve the composition issue in a neat way. |
Beta Was this translation helpful? Give feedback.
0 replies
-
@shonfeder I was looking for something else and bumped into this. This seems pretty much the same thing we have been discussing with the action fusion. It actually states the problem much better than I had it in my head, and afaiu is similar to the scenario that me, Ivan and Jan have been talking about regarding synchronous message consumption between cosmwasm contracts. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The functional layer (
pure def
s) allows us to get closer to source code. If the whole business logic can be written as pure functions, this even allows us to do composition by using one function (defined viapure def
) within another one, e.g.,One problem is that when looking at source code, it might not be clear whether
bar
is a pure function, or whether it is, e.g., an synchronous RPC. In the later case, the above quint snippet wouldn't make sense anymore. it would need to correspond toRight now we can model these RPCs in TLA+ and quint. However, as the above list shows, we need to leave the functional level and go to the actions. It would be great if quint could be extended to lift this to the functional level from a syntax viewpoint, e.g.,
Under the hood, we could then import
bar(s)
from another quint specification, linking this line to eithercall_bar
andreturn_bar
).bar
implemention by its more abstract properties).Beta Was this translation helpful? Give feedback.
All reactions