Open Baltoli opened 2 months ago
https://github.com/runtimeverification/mx-backend/pull/108 addresses a problem with variable subsorting:
When a rule with variable A:SortA
is matched against a configuration that has a variable B:SortB
and SortA < SortB
, the match will be conditional/indeterminate (causing an abort in booster, and matching with further rules/branching in kore-rpc).
This is the correct behaviour, but in this particular case, the variable B
was only introduced temporarily (programmatically in the python client code) to temporarily abstract unnecessary payload. It is easy to make this mistake of picking too general a sort when abstracting. pyk
will insert the required injections SortA -> SortB
automatically so the fix was easy.
Some book-keeping of past PRs related to mx-backend
performance:
booster
aborts if a RHS contains partial functions unless the rule is marked as preserves-definedness
) newWasmInstance
rule to compute this new WASM instance externally (using LLVM from the python client). However, when marking a rule as a cut-point-rule
, the following next state (RHS of the rule) will still be computed and returned. The PR introduced an intermediate execution state that requires no computation to avoid the duplicate computation.no-evaluators
to avoid LLVM errors (which may also cause fallbacks but mainly warning messages).Recent PRs
Map
fields (paraphrased: <a> K |-> K2 ...</a> <b> K2 |-> V ... </b>
) to avoid a natch abort.preserves-definedness
(including justification for the added attributes in comments)#if B #then exp1 #else exp2 #fi
into a configuration cell, by forcing the decision depending on B
(Caveat: This modifies the branching structure and may duplicate work so it might not always be better!)
@jberthold and @virgil-serbanuta are working on optimizing symbolic execution of the MX- family of projects. Part of this work will entail making changes at the K level to improve performance. We'd ideally like to learn from this process and perhaps write up some guides on writing K code that performs well from the get-go.
Please log any MX PRs that are in aid of improved performance here: