-
Notifications
You must be signed in to change notification settings - Fork 35
Expand file tree
/
Copy pathRefinementPredicate.java
More file actions
46 lines (43 loc) · 1.21 KB
/
RefinementPredicate.java
File metadata and controls
46 lines (43 loc) · 1.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
package liquidjava.specification;
import java.lang.annotation.ElementType;
import java.lang.annotation.Repeatable;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* Annotation that allows the creation of ghost variables or refinement aliases within method or constructor scope.
* <p>
* This annotation enables the declaration of ghosts and refinement aliases.
* <p>
* <strong>Example:</strong>
* <pre>
* {@code
* @RefinementPredicate("ghost int size")
* @RefinementPredicate("type Nat(int x) { x > 0 }")
* public void process() {
* // ...
* }
* }
* </pre>
*
* @see Ghost
* @see RefinementAlias
* @author Catarina Gamboa
*/
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.METHOD, ElementType.CONSTRUCTOR})
@Repeatable(RefinementPredicateMultiple.class)
public @interface RefinementPredicate {
/**
* The refinement predicate string, which can define a ghost variable or a refinement alias.
* <p>
* <strong>Example:</strong>
* <pre>
* {@code
* @RefinementPredicate("ghost int size")
* @RefinementPredicate("type Nat(int x) { x > 0 }")
* }
* </pre>
*/
String value();
}