You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: skills/liquidjava-mcp/SKILL.md
+18-21Lines changed: 18 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,22 +1,20 @@
1
1
---
2
2
name: liquidjava-mcp
3
-
description: Use the LiquidJava MCP to verify Java refinements and typestates, diagnose failures, inspect contracts, look up verification context, and query LiquidJava's solver with custom assumptions and conclusions.
3
+
description: Use the LiquidJava MCP to verify Java refinements and typestates, diagnose failures, inspect contracts and verification context, and query the solver with custom assumptions and conclusions.
4
4
---
5
5
6
6
# LiquidJava MCP
7
7
8
-
## Overview
8
+
LiquidJava is an additional compile-time Java type checker based on refinement types and typestates. Refinements constrain values and typestates constrain object states and call sequences. Verification checks whether the code satisfies the established refinements and states.
9
9
10
-
LiquidJava is an additional compile-time type checker for Java, based on refinement types and typestates. Refinements constrain values with predicates and typestates constrain object states and method call sequences. Verification checks whether the facts established by the code imply the required refinements and state conditions.
10
+
## Syntax
11
11
12
-
-`@Refinement("predicate")` refines a variable, field, parameter, or return type
13
-
- Predicates support comparisons, boolean operators, arithmetic operators, and conditional expressions
14
-
-`_` refers to the value being refined, such as in return refinements and shorthand variable refinements
15
-
-`@RefinementAlias("Name(type x) { predicate }")` defines a reusable predicate alias
16
-
-`@StateSet({"state1", "state2"})` declares named object states for typestate protocols, represented as uninterpreted functions
17
-
-`@StateRefinement(from="predicate", to="predicate")` describes method pre- and post-conditions for typestate transitions; predicates can refer to parameters, object states, and ghost variables
18
-
-`@Ghost("type name")` declares a ghost variable, which is also an uninterpreted function with first parameter `this`
19
-
-`old(this)` can be used in state refinements to refer to the receiver state before the method call (e.g. the predicate `size(this) == size(old(this)) + 1` can be used to specify that a method increments size by one)
12
+
-`@Refinement("predicate")` refines a variable, field, parameter, or return type. Predicates support comparisons, boolean/arithmetic operators, and conditional expressions; `_` means the refined value (such as in return/shorthand refinements).
13
+
-`@RefinementAlias("Name(type x) { predicate }")` defines a reusable predicate alias.
14
+
-`@StateSet({"state1", "state2"})` declares named object states for typestate protocols, represented as uninterpreted functions.
15
+
-`@StateRefinement(from="predicate", to="predicate")` specifies method pre/postconditions; predicates may refer to parameters, object states, and ghost variables.
16
+
-`@Ghost("type name")` declares a ghost variable, an uninterpreted function whose first parameter is `this`. `ghost(this)` is equivalent to `this.ghost()` and `ghost()`.
17
+
-`old(this)` refers to the receiver state before a call; e.g. `size(this) == size(old(this)) + 1` specifies a size increment.
20
18
21
19
## Workflow
22
20
@@ -39,18 +37,17 @@ LiquidJava is an additional compile-time type checker for Java, based on refinem
39
37
| Check if assumptions imply a conclusion |`check_validity(variables, assumptions, conclusion)`| Test whether custom assumptions prove a specified conclusion. |
40
38
| Check if constraints are satisfiable | `check_satisfiability(variables, constraints)` | Check if a set of constraints are satisfiable or detect contradictions.
41
39
42
-
## Tool Behavior
40
+
## Behavior
43
41
44
-
- Verification accepts a Java source file or a directory. Directory analysis recursively verifies `.java` files.
45
-
- The `verify`, `get_diagnostics`, `get_locals`, `get_globals`, and `get_contracts` tools reuse cached analysis when the input path, source hash, and debug option match.
46
-
- Requests time out after 60 seconds, including time waiting for another analysis, and return a verifier error with any captured output.
47
-
- The runner clears its cached analysis when a source changes, a run fails, or a run is cancelled.
48
-
- The context tools run the verification before taking their snapshot.
42
+
- Diagnostic and context tools accept a Java file or directory. Directories recursively verify `.java` files.
43
+
-`verify`, `get_diagnostics`, `get_locals`, `get_globals`, and `get_contracts` reuse cached analysis when path, source hash, and debug option match. The runner clears the cache when source changes, a run fails, or a run is cancelled.
44
+
- Requests time out after 60 seconds, including time waiting for another analysis, and return a verifier error with captured output.
45
+
- Context tools verify before taking their snapshot.
46
+
- Context information comes from recorded verifier history, not a reconstructed solver state.
47
+
- Contracts include source and external refinement contracts.
49
48
-`get_state_machine` parses the typestate protocol into a more readable format. It does not run the verification. Run it to check whether the actual code follows the protocol.
50
-
- Local variables are derived from recorded verifier history, not a reconstructed solver state.
51
-
-`get_contracts` includes both source contracts and external refinement contracts.
52
-
- The `check_validity` and `check_satisfiability` tools query the solver directly and do not verify Java source code.
53
-
-`line` and `column` parameters are one-based source coordinates.
49
+
-`check_validity` and `check_satisfiability` query the solver directly and do not verify Java source.
50
+
-`line` and `column` are one-based source coordinates.
0 commit comments