Skip to content

Commit fa71fb0

Browse files
committed
Update Skill
1 parent b3118f3 commit fa71fb0

1 file changed

Lines changed: 18 additions & 21 deletions

File tree

skills/liquidjava-mcp/SKILL.md

Lines changed: 18 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,20 @@
11
---
22
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.
44
---
55

66
# LiquidJava MCP
77

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.
99

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
1111

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.
2018

2119
## Workflow
2220

@@ -39,18 +37,17 @@ LiquidJava is an additional compile-time type checker for Java, based on refinem
3937
| Check if assumptions imply a conclusion | `check_validity(variables, assumptions, conclusion)` | Test whether custom assumptions prove a specified conclusion. |
4038
| Check if constraints are satisfiable | `check_satisfiability(variables, constraints)` | Check if a set of constraints are satisfiable or detect contradictions.
4139

42-
## Tool Behavior
40+
## Behavior
4341

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.
4948
- `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.
5451

5552
## Instructions
5653

0 commit comments

Comments
 (0)