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

(3rd type) An error in the long chain of call #35

Closed
APotyomkin opened this issue Mar 6, 2022 · 1 comment · Fixed by #51
Closed

(3rd type) An error in the long chain of call #35

APotyomkin opened this issue Mar 6, 2022 · 1 comment · Fixed by #51
Assignees

Comments

@APotyomkin
Copy link

APotyomkin commented Mar 6, 2022

Problematic code

[] > test
  [] > parent
    [self x] > f
      x.sub 5 > t
      seq > @
        assert (0.less t)
        x

    [self y1] > g
      self.f self y1 > @

    [self y2] > gg
      self.g self y2 > @

    [self y3] > ggg
      self.gg self y3 > @

    [self z] > h
      z > @
  [] > child
    test.parent > @
    [self y] > f
      y > @
    [self z] > h
      self.ggg self z > @

Expected result

RESULT BY AnOdin:
        [Unjustified Assumption] Method g is not referentially transparent

Actual result

RESULT BY AnOdin:
        Odin is not able to analyze the code, due to:
        Symbol value-of-before-f not declared

Assumption

I suppose that it is somehow related to a length of a calls chain.(not confirmed based on #36) With shortened chain, it works well.

Code

[] > test
  [] > parent
    [self x] > f
      x.sub 5 > t
      seq > @
        assert (0.less t)
        x

    [self y1] > g
      self.f self y1 > @

    [self y2] > gg
      self.g self y2 > @

    [self z] > h
      z > @
  [] > child
    test.parent > @
    [self y] > f
      y > @
    [self z] > h
      self.gg self z > @

Results

RESULT BY AnOdin:
        [Unjustified Assumption] Method g is not referentially transparent
@APotyomkin APotyomkin changed the title An error in the long chain of call (3d type) An error in the long chain of call Mar 6, 2022
@APotyomkin APotyomkin changed the title (3d type) An error in the long chain of call (3rd type) An error in the long chain of call Mar 6, 2022
@fizruk
Copy link
Member

fizruk commented Mar 21, 2022

@Leosimetti as discussed, we need to use define-funs-rec to enable (mutually) recursive definitions of function values and function properties.

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

Successfully merging a pull request may close this issue.

3 participants