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

RTCO does not propagate accumulated components #165

Open
vvergu opened this issue Feb 5, 2017 · 0 comments
Open

RTCO does not propagate accumulated components #165

vvergu opened this issue Feb 5, 2017 · 0 comments

Comments

@vvergu
Copy link
Member

vvergu commented Feb 5, 2017

Elimination of recursive tail calls may change the semantics of rules which accumulate results in semantic components:

  install-aliases(_, _) :: Als [] --> U() :: Als [].

  install-aliases(name, clos) :: Als [a@AliasL(_, ID(x)) | Als] --> u :: Als [a | Als']
  where
    name != x;
    install-aliases(name, clos) :: Als --> u :: Als'.

  ...

The second rule accumulates results in the Als read-write component. The rule is determined by the RTCO transformation as being tail recursive but the accumulated changes are dropped after the last call. At the end of the call chain the value of the semantic component Als is [] regardless of whether the list should or should not be empty.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant