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

Interpreter: Using ~ to refer to before value of a sequence gives error message #291

Closed
ZoeA opened this issue Aug 18, 2014 · 0 comments
Closed
Assignees
Labels
Milestone

Comments

@ZoeA
Copy link

ZoeA commented Aug 18, 2014

I have a state variable:

counts : seq of nat 

and I want to refer to the before value of one of the items of the sequence in a post condition. Here's a simple example:

 update:(nat)==>()
 update(n) ==
  (
    counts(n):=counts(n)+1;
        ...
  )
  pre n in set inds counts
  post counts(n) = counts~(n) + 1

This goes through the syntax/type checker fine, but when the operation is called by the interpreter it has an error message:

"Error 4034: Name 'counts~' not in scope in 'H:\Compass\CML\workspace\T243-timing\T243v2.cml' at line 99:19 at in 'H:\Compass\CML\workspace\T243-timing\T243v2.cml' at line 99:19".

I believe this is the correct syntax and there I have no such issue with doing the same thing with a variable of type nat.

@ZoeA ZoeA added the bug label Aug 18, 2014
@joey-coleman joey-coleman added this to the 0.3.6 milestone Aug 19, 2014
@lausdahl lausdahl changed the title Using ~ to refer to before value of a sequence gives error message Interpreter: Using ~ to refer to before value of a sequence gives error message Aug 22, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants