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

Count down loop termination check is wrong #785

Open
Alan-Jowett opened this issue Nov 9, 2024 · 0 comments
Open

Count down loop termination check is wrong #785

Alan-Jowett opened this issue Nov 9, 2024 · 0 comments

Comments

@Alan-Jowett
Copy link
Contributor

test-case: Count down loop - incorrectly passes
options: ["termination"]

pre: []

code:
  <start>: |
    r0 = 0
    r1 = 10
  <loop>: |
    r1 -= 1
    if r1 > 1 goto <loop>
    exit

post:
  - pc[2]=[1, +oo]
  - r0.svalue=0
  - r0.type=number
  - r0.uvalue=0
  - r1.svalue=[0, 1]
  - r1.type=number
  - r1.uvalue=[0, 1]

messages:
  - "2: Loop counter is too large (pc[2] < 100000)"

Test case should fail, but passes. It clearly terminates within 10 iterations, but termination check things it's unbounded.

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

No branches or pull requests

1 participant