Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix evaluation of stay moves #526

Merged
merged 11 commits into from
Sep 26, 2023
Merged

Fix evaluation of stay moves #526

merged 11 commits into from
Sep 26, 2023

Conversation

satabin
Copy link
Member

@satabin satabin commented Sep 25, 2023

Stay moves appear in MFT (and ESP) RHSs when a state is called on the Self forest. This results in the event stream processor to immediately call the state on the currently processed event. This is similar to calling a standard state on the child or next forest, but differs in the way it must evaluate the arguments.

In a standard call, the arguments must be stepped to resolve potentially nested (non self) calls. However when resolving a self call we should not apply standard calls, which should only be processed in the next step.

This is fixed in this PR.

Also this PR improves the code by:

  • using a Vector[Expr[Out] representation for state parameters instead of a Map[Int, Expr[Out]]
  • inlining more stay moves

In case we call `call` when inlining a stay move, we should not step
again when evaluating parameters, as it has been done before for this
event.
@satabin satabin added bug Something isn't working finite state labels Sep 25, 2023
@satabin satabin added this to the 1.9.0 milestone Sep 25, 2023
@satabin satabin marked this pull request as ready for review September 25, 2023 17:23
@satabin satabin requested a review from a team as a code owner September 25, 2023 17:23
@satabin
Copy link
Member Author

satabin commented Sep 25, 2023

@ybasket when you review it, the actual fix is in this commit.

Copy link
Collaborator

@ybasket ybasket left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some smaller comments asking for clarifications, other than that, it looks good to me.

@satabin satabin merged commit c9dea6a into main Sep 26, 2023
24 checks passed
@satabin satabin deleted the finite-state/esp/fix-stay-moves branch September 26, 2023 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working finite state
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants