[PRL] Contracts vs aspects

Paul A. Steckler steck at stecksoft.com
Thu Apr 28 21:30:09 EDT 2005


> I don't know if you have a specific theoretical model of contracts in
> mind, but I could certainly write this in PLT contracts.  Contracts
> can contain arbitrary predicates, so they can also use and maintain
> mutable state recording whether foo has been called since the last
> call to bar.  This is before even considering adding new contract
> primitives for this kind of invariant.

Right; you'd have to setup the machinery to 
establish the evidence of the prior call to foo() 
to feed into the appropriate predicate. 
What I meant was, there's no ready-at-hand 
construct that does this for you, as far 
as I know.

-- Paul



More information about the PRL mailing list