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

Add temporal contracts #23

Open
disnet opened this issue Feb 3, 2012 · 0 comments
Open

Add temporal contracts #23

disnet opened this issue Feb 3, 2012 · 0 comments

Comments

@disnet
Copy link
Owner

disnet commented Feb 3, 2012

Add support for temporal contracts. The idea is described in this paper and a Racket implementation is here.

There are two parts. One is the guard/monitor interface and the second is the language/automaton.

We'll have to think about how the syntax fits into CoffeeScript but it should be something like this describing a sort function that is not re-entrant (can only be called after all previous calls to sort have returned) and cannot call cmp after sort has returned:

sort :: ([Pos], cmp : (Pos, Pos) -> Bool) -> [Pos]
  where not ... call(sort, _) !ret(sort, _)*
                call(sort, _)
    and not ... ret(sort, _) ... call(cmp, _)
sort = (l, cmp) -> ...

Note that cmp : (Pos... is doing name binding and is not supposed to be an object contract. Will need to figure out an unambiguous naming syntax.

@ghost ghost assigned jcfrank77 Feb 3, 2012
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

2 participants