My favorites
▼
|
Sign in
pluralism
Modular object protocol checking for Java
Project Home
Wiki
Issues
Source
READ-ONLY: This project has been
archived
. For more information see
this post
.
Search
Search within:
All issues
Open issues
New issues
Issues to verify
for
Advanced search
Search tips
Subscriptions
Issue
5
attachment: AtomicShare.java
(550 bytes)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package nimby.simple;
import edu.cmu.cs.plural.annot.ClassStates;
import edu.cmu.cs.plural.annot.Share;
import edu.cmu.cs.plural.annot.State;
import edu.cmu.cs.plural.annot.TrueIndicates;
public class AtomicShare {
@Share
@TrueIndicates("OPEN")
boolean isOpen() { return true; }
@Share(requires="OPEN") void needsOpen() { }
// Simple test on a share permission...
// needs to be checked inside of an atomic block
void foo(@Share AtomicShare a_s) {
atomic: {
if( a_s.isOpen() )
a_s.needsOpen();
}
}
}
Powered by
Google Project Hosting