[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-aptos-move":3,"mdc-ayowue-key":29,"related-repo-aptos-move":2193,"related-org-aptos-move":2262},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":12,"stars":20,"repoUrl":21,"updatedAt":22,"license":23,"forks":20,"topics":24,"repo":25,"sourceUrl":27,"mdContent":28},"move","develop applications on Aptos","Move development on Aptos",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},"aptos","Aptos Labs","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Faptos.png","aptos-labs",[13,17],{"name":14,"slug":15,"type":16},"Blockchain","blockchain","tag",{"name":18,"slug":19,"type":16},"Web3","web3",0,"https:\u002F\u002Fgithub.com\u002Faptos-labs\u002Faptos-ai","2026-07-19T06:03:46.40898",null,[],{"repoUrl":21,"stars":20,"forks":20,"topics":26,"description":23},[],"https:\u002F\u002Fgithub.com\u002Faptos-labs\u002Faptos-ai\u002Ftree\u002FHEAD\u002Fplugins\u002Fmove-flow\u002Fskills\u002Fmove","---\nname: move\ndescription: Move development on Aptos\n---\n\n\n## Move Language\n\nMove on Aptos is a safe, resource-oriented programming language for smart contracts on the\nAptos blockchain. It uses a linear type system to enforce ownership and prevent\ndouble-spending at compile time.\n\n## Move Language Basics\n\n- **Modules** are the unit of code organization, published at an address.\n- **Structs** define data types; abilities (`key`, `store`, `copy`, `drop`) control what\n  operations are permitted.\n- **Entry functions** (`entry fun`) are transaction entry points callable from outside Move.\n- **View functions** (`#[view]`) are read-only queries that do not modify state.\n- **Global storage** stores resources (structs with `key`) at addresses.\n- **Move 2 syntax** (required):\n    - Read resource: `&T[addr]` (not `borrow_global\u003CT>(addr)`)\n    - Mutate resource: `&mut T[addr]` (not `borrow_global_mut\u003CT>(addr)`)\n    - Access field: `T[addr].field` directly (the compiler inserts the ref op)\n    - `acquires` annotations are no longer needed — do not add them.\n- **Error codes**: Use named constants for abort codes (`const E_NOT_FOUND: u64 = 1;`) and\n  document them.\n- **Comments**: Use `\u002F\u002F` for regular comments. `\u002F\u002F\u002F` is a **doc comment** and is only valid\n  directly before a `module`, `struct`, `enum`, `fun`, or `const` declaration.\n- **Edit hook**: The edit hook auto-runs on `.move` files after edits. If it reports\n  compilation errors, fix them before proceeding with further changes.\n\n\n### Links\n\n- [The Move Book](https:\u002F\u002Faptos-labs.github.io\u002Fmove-book\u002F)\n- [Aptos Framework Book](https:\u002F\u002Faptos-labs.github.io\u002Fframework-book\u002F)\n\n\n\n## Move Specification Language\n\nMove specifications use `spec` blocks to express formal properties that are checked\nby the Move Prover.\n\n### Function spec clauses\n\nThese appear in `spec fun_name { ... }` blocks. Spec blocks always appear after the function\ndefinition. If `fun_name` clashes with a soft keyword (e.g. `lemma`), use `spec @fun_name { ... }`\nto escape it.\n\n- `ensures \u003Cexpr>`: Postcondition that must hold when the function returns normally.\n  Evaluated in the **post-state**. Use `old(expr)` to refer to pre-state values.\n- `aborts_if \u003Cexpr>`: Condition under which the function may abort. **Evaluated in the\n  pre-state** — do not use `old()` (see `old()` usage rules below). If any\n  `aborts_if` conditions are present, the function must abort if and only if one of the\n  conditions holds. Omitting all `aborts_if` clauses means abort behavior is *unspecified*\n  (any abort is allowed). To express that a function never aborts, write `aborts_if false;`.\n- `requires \u003Cexpr>`: Precondition that callers must satisfy. **Evaluated in the pre-state** —\n  Do not use `old()` (see `old()` usage rules below).\n- `modifies \u003Cresource>`: Declares which global resources the function may modify.\n\n### Loop invariants\n\nLoop invariants appear in a `spec` block after the loop body:\n\n```move\nwhile (cond) {\n    \u002F\u002F body\n} spec {\n    invariant \u003Cexpr>;\n};\n```\n\n- `invariant \u003Cexpr>`: A property that holds before the first iteration and is preserved by\n  each iteration. `old(x)` is only allowed on function parameters (see `old()` usage rules below.)\n\nLoops without invariants cause the prover to *havoc* all loop-modified variables, which can\nproduce vacuous, incorrect, or overly weak specifications. Every loop needs an invariant —\nexamine the actual `while` loops in function bodies to find all loops that lack one.\n\nA good invariant:\n1. Holds before the first iteration (initial values satisfy it).\n2. Is preserved by each iteration (inductive step).\n3. Relates loop-modified variables to function parameters and constants\n   (e.g., bounds like `i \u003C= n`, accumulators like `sum == i * step`).\n\n### Expressions in specs\n\n- `old(expr)`: Value of `expr` at function entry. See `old()` usage rules below for\n  where this is allowed.\n- `result`: Return value. Only valid in `ensures`.\n- `global\u003CT>(addr)`: Global resource of type `T` at address `addr`.\n- `exists\u003CT>(addr)`: True if a resource of type `T` exists at address `addr`.\n- Numeric type bounds: `MAX_U8`, `MAX_U16`, `MAX_U32`, `MAX_U64`, `MAX_U128`, `MAX_U256`.\n- **No dereference or borrow**: `*e` and `&e` are not allowed in spec\n  expressions. Spec expressions operate on values, not references — access\n  fields directly (e.g. `v.field`, not `(*v).field` or `(&v).field`).\n\n### `old()` usage rules\n\n`old(expr)` means \"value of `expr` at function entry.\" It is only valid in specific contexts:\n\n**Wrong \u002F Right examples:**\n\n```move\n\u002F\u002F WRONG: old() in aborts_if — compilation error\naborts_if old(x) + old(y) > MAX_U64;\n\u002F\u002F RIGHT: aborts_if is pre-state, just use the variables directly\naborts_if x + y > MAX_U64;\n\n\u002F\u002F WRONG: old() in requires — compilation error\nrequires old(len(v)) > 0;\n\u002F\u002F RIGHT: requires is pre-state\nrequires len(v) > 0;\n\n\u002F\u002F WRONG: old(local) in loop invariant — compilation error\ninvariant old(sum) \u003C= old(n) * MAX_U64;\n\u002F\u002F RIGHT: sum is a local — use it directly; n is a parameter — old(n) is ok\ninvariant sum \u003C= old(n) * MAX_U64;\n\n\u002F\u002F WRONG: old(resource) in loop invariant — compilation error\ninvariant old(global\u003CT>(addr)).field == 0;\n\u002F\u002F RIGHT: use resource directly\ninvariant global\u003CT>(addr).field == 0;\n```\n\n### Referring to Behavior of other Functions\n\nWhen specifying a function that calls other functions **which are not inline functions**, you\ncan use **behavioral predicates** to abstract the callee's specification without inlining its\ndetails. These built-in predicates lift a function's spec clauses into expressions:\n\n- `requires_of\u003Cf>(args)` — true when `f`'s `requires` clauses hold for `args`.\n- `aborts_of\u003Cf>(args)` — true when `f`'s `aborts_if` clauses hold for `args`.\n- `ensures_of\u003Cf>(args, result)` — true when `f`'s `ensures` clauses hold for\n  `args` and the given `result` value(s). For functions returning unit, omit\n  the result argument. For multiple return values, pass `result_1, result_2, ...`.\n- `result_of\u003Cf>(args)` — the return value of `f` when called with `args`,\n  usable in `let` bindings and expressions inside spec blocks.\n\nThe `\u003Cf>` target can be:\n- A **function parameter** of function type: `ensures_of\u003Cf>(x, result)` where\n  `f` is a parameter with type `|u64| u64`.\n- A **named function** (same module or cross-module): `ensures_of\u003Cincrement>(x, result)`\n  or `ensures_of\u003CM::increment>(x, result)`.\n- A **generic function** with explicit or inferred type arguments:\n  `ensures_of\u003Cidentity\u003Cu64>>(x, result)` or `ensures_of\u003Cidentity>(x, result)`.\n\n**Examples:**\n\nSpecifying a higher-order function that applies a callback:\n\n```move\nfun apply(f: |u64| u64, x: u64): u64 { f(x) }\nspec apply {\n    aborts_if aborts_of\u003Cf>(x);\n    ensures ensures_of\u003Cf>(x, result);\n}\n```\n\nUsing `result_of` to chain calls in a spec (e.g. `f(f(x))`):\n\n```move\nfun apply_seq(f: |u64| u64 has copy, x: u64): u64 { f(f(x)) }\nspec apply_seq {\n    let y = result_of\u003Cf>(x);\n    requires requires_of\u003Cf>(x) && requires_of\u003Cf>(y);\n    aborts_if aborts_of\u003Cf>(x) || aborts_of\u003Cf>(y);\n    ensures result == result_of\u003Cf>(y);\n}\n```\n\nReferring to a named function's behavior from a caller:\n\n```move\nspec bar {\n    ensures ensures_of\u003Cincrement>(x, result);\n}\n```\n\nUsing `result_of` inside loop invariants with closures:\n\n```move\nspec {\n    invariant forall j in 0..i: !result_of\u003Cpred>(v[j]);\n};\n```\n\n### Property markers\n\nThe `[inferred]` property marks conditions that were not written by the user. Its value indicates\nthe origin or quality:\n\n- `[inferred]`: Automatically inferred by weakest-precondition (WP) analysis. It may be overly complex, redundant,\n  or occasionally incorrect.\n- `[inferred = vacuous]`: Inferred by WP but detected as potentially vacuous (trivially true)\n  due to unconstrained quantifier variables. Typically results from missing loop invariants.\n- `[inferred = sathard]`: Inferred by WP but contains quantifier patterns that are hard for\n  SMT solvers. Likely to cause verification timeouts — should be simplified or reformulated.\n\n\n### Links\n\n- [Move Specification Language](https:\u002F\u002Faptos.dev\u002Fen\u002Fbuild\u002Fsmart-contracts\u002Fprover\u002Fspec-lang)\n\n\n\n## Move Packages\n\nA Move package is a directory with a `Move.toml` manifest and source files. The manifest defines the package name, dependencies, and named addresses.\n\n### Named Addresses\n\nModules are published at named addresses (e.g., `@my_package`). These must resolve to hex values for compilation.\n\n- **`[addresses]`** — production addresses (may use `_` placeholder for deploy-time assignment)\n- **`[dev-addresses]`** — development\u002Ftest values (used when compiling in dev or test mode)\n\n**Fixing \"Unresolved addresses\" errors:** For each `Named address 'X' in package 'Y'`, add `X = \"0x...\"` to `[dev-addresses]` in that package's `Move.toml`. Use `0x100` and up, avoiding reserved addresses (`0x0`=vm_reserved, `0x1`=std\u002Faptos_std\u002Faptos_framework, `0x3`=aptos_token, `0x4`=aptos_token_objects, `0x5`=aptos_trading, `0x7`=aptos_experimental, `0xA`=aptos_fungible_asset, `0xA550C18`=core_resources):\n\n```toml\n[dev-addresses]\nmy_package = \"0x100\"\nother_addr = \"0x101\"\n```\n\n\n\n## Checking Move Code\n\nUse the `move_package_status` MCP tool to check for compilation errors and warnings.\n\n- Call `move_package_status` with `package_path` set to the package directory.\n- The tool sets error and returns detailed error messages if the package does not compile.\n\nNotice that like with a build system, the tool is idempotent, and does not cause recompilation\nif the compilation result and sources are up-to-date.\n\n\n## Package Manifest\n\nUse the `move_package_manifest` MCP tool to discover source files and dependencies\nof a Move package:\n\n- Call `move_package_manifest` with `package_path` set to the package directory.\n- The result includes `source_paths` (target modules) and `dep_paths` (dependencies).\n\n\n## Querying Package Structure\n\nUse the `move_package_query` MCP tool to inspect the structure of a Move package.\n\nParameters:\n\n- **`package_path`** (required) — path to the Move package directory.\n- **`query`** (required) — one of the query types below.\n- **`function`** (required for `function_usage`) — function name in the form `module_name::function_name`.\n\n### Query Types\n\n- **`dep_graph`** — returns a map from each module to the modules it depends on.\n  Useful for understanding module layering and import structure.\n- **`module_summary`** — returns a summary of each module's constants, structs,\n  and functions. Useful for getting an overview without reading all source files.\n- **`call_graph`** — returns a function-level call graph as a map from each\n  function to the functions it calls.\n- **`function_usage`** — returns direct and transitive calls\u002Fuses for a given\n  function. \"called\" = direct calls; \"used\" = direct calls + closure captures.\n  Requires the `function` parameter.\n\n\n",{"data":30,"body":31},{"name":4,"description":6},{"type":32,"children":33},"root",[34,43,49,55,347,354,379,385,398,404,441,576,582,594,651,680,700,705,740,746,938,949,966,974,1146,1152,1171,1313,1326,1414,1422,1427,1474,1495,1557,1562,1592,1603,1633,1639,1651,1686,1691,1703,1709,1722,1728,1741,1780,1891,1924,1930,1943,1971,1976,1982,1994,2034,2040,2052,2057,2116,2122,2187],{"type":35,"tag":36,"props":37,"children":39},"element","h2",{"id":38},"move-language",[40],{"type":41,"value":42},"text","Move Language",{"type":35,"tag":44,"props":45,"children":46},"p",{},[47],{"type":41,"value":48},"Move on Aptos is a safe, resource-oriented programming language for smart contracts on the\nAptos blockchain. It uses a linear type system to enforce ownership and prevent\ndouble-spending at compile time.",{"type":35,"tag":36,"props":50,"children":52},{"id":51},"move-language-basics",[53],{"type":41,"value":54},"Move Language Basics",{"type":35,"tag":56,"props":57,"children":58},"ul",{},[59,71,112,130,147,164,241,259,329],{"type":35,"tag":60,"props":61,"children":62},"li",{},[63,69],{"type":35,"tag":64,"props":65,"children":66},"strong",{},[67],{"type":41,"value":68},"Modules",{"type":41,"value":70}," are the unit of code organization, published at an address.",{"type":35,"tag":60,"props":72,"children":73},{},[74,79,81,88,90,96,97,103,104,110],{"type":35,"tag":64,"props":75,"children":76},{},[77],{"type":41,"value":78},"Structs",{"type":41,"value":80}," define data types; abilities (",{"type":35,"tag":82,"props":83,"children":85},"code",{"className":84},[],[86],{"type":41,"value":87},"key",{"type":41,"value":89},", ",{"type":35,"tag":82,"props":91,"children":93},{"className":92},[],[94],{"type":41,"value":95},"store",{"type":41,"value":89},{"type":35,"tag":82,"props":98,"children":100},{"className":99},[],[101],{"type":41,"value":102},"copy",{"type":41,"value":89},{"type":35,"tag":82,"props":105,"children":107},{"className":106},[],[108],{"type":41,"value":109},"drop",{"type":41,"value":111},") control what\noperations are permitted.",{"type":35,"tag":60,"props":113,"children":114},{},[115,120,122,128],{"type":35,"tag":64,"props":116,"children":117},{},[118],{"type":41,"value":119},"Entry functions",{"type":41,"value":121}," (",{"type":35,"tag":82,"props":123,"children":125},{"className":124},[],[126],{"type":41,"value":127},"entry fun",{"type":41,"value":129},") are transaction entry points callable from outside Move.",{"type":35,"tag":60,"props":131,"children":132},{},[133,138,139,145],{"type":35,"tag":64,"props":134,"children":135},{},[136],{"type":41,"value":137},"View functions",{"type":41,"value":121},{"type":35,"tag":82,"props":140,"children":142},{"className":141},[],[143],{"type":41,"value":144},"#[view]",{"type":41,"value":146},") are read-only queries that do not modify state.",{"type":35,"tag":60,"props":148,"children":149},{},[150,155,157,162],{"type":35,"tag":64,"props":151,"children":152},{},[153],{"type":41,"value":154},"Global storage",{"type":41,"value":156}," stores resources (structs with ",{"type":35,"tag":82,"props":158,"children":160},{"className":159},[],[161],{"type":41,"value":87},{"type":41,"value":163},") at addresses.",{"type":35,"tag":60,"props":165,"children":166},{},[167,172,174],{"type":35,"tag":64,"props":168,"children":169},{},[170],{"type":41,"value":171},"Move 2 syntax",{"type":41,"value":173}," (required):\n",{"type":35,"tag":56,"props":175,"children":176},{},[177,198,217,230],{"type":35,"tag":60,"props":178,"children":179},{},[180,182,188,190,196],{"type":41,"value":181},"Read resource: ",{"type":35,"tag":82,"props":183,"children":185},{"className":184},[],[186],{"type":41,"value":187},"&T[addr]",{"type":41,"value":189}," (not ",{"type":35,"tag":82,"props":191,"children":193},{"className":192},[],[194],{"type":41,"value":195},"borrow_global\u003CT>(addr)",{"type":41,"value":197},")",{"type":35,"tag":60,"props":199,"children":200},{},[201,203,209,210,216],{"type":41,"value":202},"Mutate resource: ",{"type":35,"tag":82,"props":204,"children":206},{"className":205},[],[207],{"type":41,"value":208},"&mut T[addr]",{"type":41,"value":189},{"type":35,"tag":82,"props":211,"children":213},{"className":212},[],[214],{"type":41,"value":215},"borrow_global_mut\u003CT>(addr)",{"type":41,"value":197},{"type":35,"tag":60,"props":218,"children":219},{},[220,222,228],{"type":41,"value":221},"Access field: ",{"type":35,"tag":82,"props":223,"children":225},{"className":224},[],[226],{"type":41,"value":227},"T[addr].field",{"type":41,"value":229}," directly (the compiler inserts the ref op)",{"type":35,"tag":60,"props":231,"children":232},{},[233,239],{"type":35,"tag":82,"props":234,"children":236},{"className":235},[],[237],{"type":41,"value":238},"acquires",{"type":41,"value":240}," annotations are no longer needed — do not add them.",{"type":35,"tag":60,"props":242,"children":243},{},[244,249,251,257],{"type":35,"tag":64,"props":245,"children":246},{},[247],{"type":41,"value":248},"Error codes",{"type":41,"value":250},": Use named constants for abort codes (",{"type":35,"tag":82,"props":252,"children":254},{"className":253},[],[255],{"type":41,"value":256},"const E_NOT_FOUND: u64 = 1;",{"type":41,"value":258},") and\ndocument them.",{"type":35,"tag":60,"props":260,"children":261},{},[262,267,269,275,277,283,285,290,292,298,299,305,306,312,313,319,321,327],{"type":35,"tag":64,"props":263,"children":264},{},[265],{"type":41,"value":266},"Comments",{"type":41,"value":268},": Use ",{"type":35,"tag":82,"props":270,"children":272},{"className":271},[],[273],{"type":41,"value":274},"\u002F\u002F",{"type":41,"value":276}," for regular comments. ",{"type":35,"tag":82,"props":278,"children":280},{"className":279},[],[281],{"type":41,"value":282},"\u002F\u002F\u002F",{"type":41,"value":284}," is a ",{"type":35,"tag":64,"props":286,"children":287},{},[288],{"type":41,"value":289},"doc comment",{"type":41,"value":291}," and is only valid\ndirectly before a ",{"type":35,"tag":82,"props":293,"children":295},{"className":294},[],[296],{"type":41,"value":297},"module",{"type":41,"value":89},{"type":35,"tag":82,"props":300,"children":302},{"className":301},[],[303],{"type":41,"value":304},"struct",{"type":41,"value":89},{"type":35,"tag":82,"props":307,"children":309},{"className":308},[],[310],{"type":41,"value":311},"enum",{"type":41,"value":89},{"type":35,"tag":82,"props":314,"children":316},{"className":315},[],[317],{"type":41,"value":318},"fun",{"type":41,"value":320},", or ",{"type":35,"tag":82,"props":322,"children":324},{"className":323},[],[325],{"type":41,"value":326},"const",{"type":41,"value":328}," declaration.",{"type":35,"tag":60,"props":330,"children":331},{},[332,337,339,345],{"type":35,"tag":64,"props":333,"children":334},{},[335],{"type":41,"value":336},"Edit hook",{"type":41,"value":338},": The edit hook auto-runs on ",{"type":35,"tag":82,"props":340,"children":342},{"className":341},[],[343],{"type":41,"value":344},".move",{"type":41,"value":346}," files after edits. If it reports\ncompilation errors, fix them before proceeding with further changes.",{"type":35,"tag":348,"props":349,"children":351},"h3",{"id":350},"links",[352],{"type":41,"value":353},"Links",{"type":35,"tag":56,"props":355,"children":356},{},[357,369],{"type":35,"tag":60,"props":358,"children":359},{},[360],{"type":35,"tag":361,"props":362,"children":366},"a",{"href":363,"rel":364},"https:\u002F\u002Faptos-labs.github.io\u002Fmove-book\u002F",[365],"nofollow",[367],{"type":41,"value":368},"The Move Book",{"type":35,"tag":60,"props":370,"children":371},{},[372],{"type":35,"tag":361,"props":373,"children":376},{"href":374,"rel":375},"https:\u002F\u002Faptos-labs.github.io\u002Fframework-book\u002F",[365],[377],{"type":41,"value":378},"Aptos Framework Book",{"type":35,"tag":36,"props":380,"children":382},{"id":381},"move-specification-language",[383],{"type":41,"value":384},"Move Specification Language",{"type":35,"tag":44,"props":386,"children":387},{},[388,390,396],{"type":41,"value":389},"Move specifications use ",{"type":35,"tag":82,"props":391,"children":393},{"className":392},[],[394],{"type":41,"value":395},"spec",{"type":41,"value":397}," blocks to express formal properties that are checked\nby the Move Prover.",{"type":35,"tag":348,"props":399,"children":401},{"id":400},"function-spec-clauses",[402],{"type":41,"value":403},"Function spec clauses",{"type":35,"tag":44,"props":405,"children":406},{},[407,409,415,417,423,425,431,433,439],{"type":41,"value":408},"These appear in ",{"type":35,"tag":82,"props":410,"children":412},{"className":411},[],[413],{"type":41,"value":414},"spec fun_name { ... }",{"type":41,"value":416}," blocks. Spec blocks always appear after the function\ndefinition. If ",{"type":35,"tag":82,"props":418,"children":420},{"className":419},[],[421],{"type":41,"value":422},"fun_name",{"type":41,"value":424}," clashes with a soft keyword (e.g. ",{"type":35,"tag":82,"props":426,"children":428},{"className":427},[],[429],{"type":41,"value":430},"lemma",{"type":41,"value":432},"), use ",{"type":35,"tag":82,"props":434,"children":436},{"className":435},[],[437],{"type":41,"value":438},"spec @fun_name { ... }",{"type":41,"value":440},"\nto escape it.",{"type":35,"tag":56,"props":442,"children":443},{},[444,470,534,565],{"type":35,"tag":60,"props":445,"children":446},{},[447,453,455,460,462,468],{"type":35,"tag":82,"props":448,"children":450},{"className":449},[],[451],{"type":41,"value":452},"ensures \u003Cexpr>",{"type":41,"value":454},": Postcondition that must hold when the function returns normally.\nEvaluated in the ",{"type":35,"tag":64,"props":456,"children":457},{},[458],{"type":41,"value":459},"post-state",{"type":41,"value":461},". Use ",{"type":35,"tag":82,"props":463,"children":465},{"className":464},[],[466],{"type":41,"value":467},"old(expr)",{"type":41,"value":469}," to refer to pre-state values.",{"type":35,"tag":60,"props":471,"children":472},{},[473,479,481,486,488,494,496,501,503,509,511,516,518,524,526,532],{"type":35,"tag":82,"props":474,"children":476},{"className":475},[],[477],{"type":41,"value":478},"aborts_if \u003Cexpr>",{"type":41,"value":480},": Condition under which the function may abort. ",{"type":35,"tag":64,"props":482,"children":483},{},[484],{"type":41,"value":485},"Evaluated in the\npre-state",{"type":41,"value":487}," — do not use ",{"type":35,"tag":82,"props":489,"children":491},{"className":490},[],[492],{"type":41,"value":493},"old()",{"type":41,"value":495}," (see ",{"type":35,"tag":82,"props":497,"children":499},{"className":498},[],[500],{"type":41,"value":493},{"type":41,"value":502}," usage rules below). If any\n",{"type":35,"tag":82,"props":504,"children":506},{"className":505},[],[507],{"type":41,"value":508},"aborts_if",{"type":41,"value":510}," conditions are present, the function must abort if and only if one of the\nconditions holds. Omitting all ",{"type":35,"tag":82,"props":512,"children":514},{"className":513},[],[515],{"type":41,"value":508},{"type":41,"value":517}," clauses means abort behavior is ",{"type":35,"tag":519,"props":520,"children":521},"em",{},[522],{"type":41,"value":523},"unspecified",{"type":41,"value":525},"\n(any abort is allowed). To express that a function never aborts, write ",{"type":35,"tag":82,"props":527,"children":529},{"className":528},[],[530],{"type":41,"value":531},"aborts_if false;",{"type":41,"value":533},".",{"type":35,"tag":60,"props":535,"children":536},{},[537,543,545,550,552,557,558,563],{"type":35,"tag":82,"props":538,"children":540},{"className":539},[],[541],{"type":41,"value":542},"requires \u003Cexpr>",{"type":41,"value":544},": Precondition that callers must satisfy. ",{"type":35,"tag":64,"props":546,"children":547},{},[548],{"type":41,"value":549},"Evaluated in the pre-state",{"type":41,"value":551}," —\nDo not use ",{"type":35,"tag":82,"props":553,"children":555},{"className":554},[],[556],{"type":41,"value":493},{"type":41,"value":495},{"type":35,"tag":82,"props":559,"children":561},{"className":560},[],[562],{"type":41,"value":493},{"type":41,"value":564}," usage rules below).",{"type":35,"tag":60,"props":566,"children":567},{},[568,574],{"type":35,"tag":82,"props":569,"children":571},{"className":570},[],[572],{"type":41,"value":573},"modifies \u003Cresource>",{"type":41,"value":575},": Declares which global resources the function may modify.",{"type":35,"tag":348,"props":577,"children":579},{"id":578},"loop-invariants",[580],{"type":41,"value":581},"Loop invariants",{"type":35,"tag":44,"props":583,"children":584},{},[585,587,592],{"type":41,"value":586},"Loop invariants appear in a ",{"type":35,"tag":82,"props":588,"children":590},{"className":589},[],[591],{"type":41,"value":395},{"type":41,"value":593}," block after the loop body:",{"type":35,"tag":595,"props":596,"children":600},"pre",{"className":597,"code":598,"language":4,"meta":599,"style":599},"language-move shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","while (cond) {\n    \u002F\u002F body\n} spec {\n    invariant \u003Cexpr>;\n};\n","",[601],{"type":35,"tag":82,"props":602,"children":603},{"__ignoreMap":599},[604,615,624,633,642],{"type":35,"tag":605,"props":606,"children":609},"span",{"class":607,"line":608},"line",1,[610],{"type":35,"tag":605,"props":611,"children":612},{},[613],{"type":41,"value":614},"while (cond) {\n",{"type":35,"tag":605,"props":616,"children":618},{"class":607,"line":617},2,[619],{"type":35,"tag":605,"props":620,"children":621},{},[622],{"type":41,"value":623},"    \u002F\u002F body\n",{"type":35,"tag":605,"props":625,"children":627},{"class":607,"line":626},3,[628],{"type":35,"tag":605,"props":629,"children":630},{},[631],{"type":41,"value":632},"} spec {\n",{"type":35,"tag":605,"props":634,"children":636},{"class":607,"line":635},4,[637],{"type":35,"tag":605,"props":638,"children":639},{},[640],{"type":41,"value":641},"    invariant \u003Cexpr>;\n",{"type":35,"tag":605,"props":643,"children":645},{"class":607,"line":644},5,[646],{"type":35,"tag":605,"props":647,"children":648},{},[649],{"type":41,"value":650},"};\n",{"type":35,"tag":56,"props":652,"children":653},{},[654],{"type":35,"tag":60,"props":655,"children":656},{},[657,663,665,671,673,678],{"type":35,"tag":82,"props":658,"children":660},{"className":659},[],[661],{"type":41,"value":662},"invariant \u003Cexpr>",{"type":41,"value":664},": A property that holds before the first iteration and is preserved by\neach iteration. ",{"type":35,"tag":82,"props":666,"children":668},{"className":667},[],[669],{"type":41,"value":670},"old(x)",{"type":41,"value":672}," is only allowed on function parameters (see ",{"type":35,"tag":82,"props":674,"children":676},{"className":675},[],[677],{"type":41,"value":493},{"type":41,"value":679}," usage rules below.)",{"type":35,"tag":44,"props":681,"children":682},{},[683,685,690,692,698],{"type":41,"value":684},"Loops without invariants cause the prover to ",{"type":35,"tag":519,"props":686,"children":687},{},[688],{"type":41,"value":689},"havoc",{"type":41,"value":691}," all loop-modified variables, which can\nproduce vacuous, incorrect, or overly weak specifications. Every loop needs an invariant —\nexamine the actual ",{"type":35,"tag":82,"props":693,"children":695},{"className":694},[],[696],{"type":41,"value":697},"while",{"type":41,"value":699}," loops in function bodies to find all loops that lack one.",{"type":35,"tag":44,"props":701,"children":702},{},[703],{"type":41,"value":704},"A good invariant:",{"type":35,"tag":706,"props":707,"children":708},"ol",{},[709,714,719],{"type":35,"tag":60,"props":710,"children":711},{},[712],{"type":41,"value":713},"Holds before the first iteration (initial values satisfy it).",{"type":35,"tag":60,"props":715,"children":716},{},[717],{"type":41,"value":718},"Is preserved by each iteration (inductive step).",{"type":35,"tag":60,"props":720,"children":721},{},[722,724,730,732,738],{"type":41,"value":723},"Relates loop-modified variables to function parameters and constants\n(e.g., bounds like ",{"type":35,"tag":82,"props":725,"children":727},{"className":726},[],[728],{"type":41,"value":729},"i \u003C= n",{"type":41,"value":731},", accumulators like ",{"type":35,"tag":82,"props":733,"children":735},{"className":734},[],[736],{"type":41,"value":737},"sum == i * step",{"type":41,"value":739},").",{"type":35,"tag":348,"props":741,"children":743},{"id":742},"expressions-in-specs",[744],{"type":41,"value":745},"Expressions in specs",{"type":35,"tag":56,"props":747,"children":748},{},[749,774,792,818,842,889],{"type":35,"tag":60,"props":750,"children":751},{},[752,757,759,765,767,772],{"type":35,"tag":82,"props":753,"children":755},{"className":754},[],[756],{"type":41,"value":467},{"type":41,"value":758},": Value of ",{"type":35,"tag":82,"props":760,"children":762},{"className":761},[],[763],{"type":41,"value":764},"expr",{"type":41,"value":766}," at function entry. See ",{"type":35,"tag":82,"props":768,"children":770},{"className":769},[],[771],{"type":41,"value":493},{"type":41,"value":773}," usage rules below for\nwhere this is allowed.",{"type":35,"tag":60,"props":775,"children":776},{},[777,783,785,791],{"type":35,"tag":82,"props":778,"children":780},{"className":779},[],[781],{"type":41,"value":782},"result",{"type":41,"value":784},": Return value. Only valid in ",{"type":35,"tag":82,"props":786,"children":788},{"className":787},[],[789],{"type":41,"value":790},"ensures",{"type":41,"value":533},{"type":35,"tag":60,"props":793,"children":794},{},[795,801,803,809,811,817],{"type":35,"tag":82,"props":796,"children":798},{"className":797},[],[799],{"type":41,"value":800},"global\u003CT>(addr)",{"type":41,"value":802},": Global resource of type ",{"type":35,"tag":82,"props":804,"children":806},{"className":805},[],[807],{"type":41,"value":808},"T",{"type":41,"value":810}," at address ",{"type":35,"tag":82,"props":812,"children":814},{"className":813},[],[815],{"type":41,"value":816},"addr",{"type":41,"value":533},{"type":35,"tag":60,"props":819,"children":820},{},[821,827,829,834,836,841],{"type":35,"tag":82,"props":822,"children":824},{"className":823},[],[825],{"type":41,"value":826},"exists\u003CT>(addr)",{"type":41,"value":828},": True if a resource of type ",{"type":35,"tag":82,"props":830,"children":832},{"className":831},[],[833],{"type":41,"value":808},{"type":41,"value":835}," exists at address ",{"type":35,"tag":82,"props":837,"children":839},{"className":838},[],[840],{"type":41,"value":816},{"type":41,"value":533},{"type":35,"tag":60,"props":843,"children":844},{},[845,847,853,854,860,861,867,868,874,875,881,882,888],{"type":41,"value":846},"Numeric type bounds: ",{"type":35,"tag":82,"props":848,"children":850},{"className":849},[],[851],{"type":41,"value":852},"MAX_U8",{"type":41,"value":89},{"type":35,"tag":82,"props":855,"children":857},{"className":856},[],[858],{"type":41,"value":859},"MAX_U16",{"type":41,"value":89},{"type":35,"tag":82,"props":862,"children":864},{"className":863},[],[865],{"type":41,"value":866},"MAX_U32",{"type":41,"value":89},{"type":35,"tag":82,"props":869,"children":871},{"className":870},[],[872],{"type":41,"value":873},"MAX_U64",{"type":41,"value":89},{"type":35,"tag":82,"props":876,"children":878},{"className":877},[],[879],{"type":41,"value":880},"MAX_U128",{"type":41,"value":89},{"type":35,"tag":82,"props":883,"children":885},{"className":884},[],[886],{"type":41,"value":887},"MAX_U256",{"type":41,"value":533},{"type":35,"tag":60,"props":890,"children":891},{},[892,897,899,905,907,913,915,921,923,929,931,937],{"type":35,"tag":64,"props":893,"children":894},{},[895],{"type":41,"value":896},"No dereference or borrow",{"type":41,"value":898},": ",{"type":35,"tag":82,"props":900,"children":902},{"className":901},[],[903],{"type":41,"value":904},"*e",{"type":41,"value":906}," and ",{"type":35,"tag":82,"props":908,"children":910},{"className":909},[],[911],{"type":41,"value":912},"&e",{"type":41,"value":914}," are not allowed in spec\nexpressions. Spec expressions operate on values, not references — access\nfields directly (e.g. ",{"type":35,"tag":82,"props":916,"children":918},{"className":917},[],[919],{"type":41,"value":920},"v.field",{"type":41,"value":922},", not ",{"type":35,"tag":82,"props":924,"children":926},{"className":925},[],[927],{"type":41,"value":928},"(*v).field",{"type":41,"value":930}," or ",{"type":35,"tag":82,"props":932,"children":934},{"className":933},[],[935],{"type":41,"value":936},"(&v).field",{"type":41,"value":739},{"type":35,"tag":348,"props":939,"children":941},{"id":940},"old-usage-rules",[942,947],{"type":35,"tag":82,"props":943,"children":945},{"className":944},[],[946],{"type":41,"value":493},{"type":41,"value":948}," usage rules",{"type":35,"tag":44,"props":950,"children":951},{},[952,957,959,964],{"type":35,"tag":82,"props":953,"children":955},{"className":954},[],[956],{"type":41,"value":467},{"type":41,"value":958}," means \"value of ",{"type":35,"tag":82,"props":960,"children":962},{"className":961},[],[963],{"type":41,"value":764},{"type":41,"value":965}," at function entry.\" It is only valid in specific contexts:",{"type":35,"tag":44,"props":967,"children":968},{},[969],{"type":35,"tag":64,"props":970,"children":971},{},[972],{"type":41,"value":973},"Wrong \u002F Right examples:",{"type":35,"tag":595,"props":975,"children":977},{"className":597,"code":976,"language":4,"meta":599,"style":599},"\u002F\u002F WRONG: old() in aborts_if — compilation error\naborts_if old(x) + old(y) > MAX_U64;\n\u002F\u002F RIGHT: aborts_if is pre-state, just use the variables directly\naborts_if x + y > MAX_U64;\n\n\u002F\u002F WRONG: old() in requires — compilation error\nrequires old(len(v)) > 0;\n\u002F\u002F RIGHT: requires is pre-state\nrequires len(v) > 0;\n\n\u002F\u002F WRONG: old(local) in loop invariant — compilation error\ninvariant old(sum) \u003C= old(n) * MAX_U64;\n\u002F\u002F RIGHT: sum is a local — use it directly; n is a parameter — old(n) is ok\ninvariant sum \u003C= old(n) * MAX_U64;\n\n\u002F\u002F WRONG: old(resource) in loop invariant — compilation error\ninvariant old(global\u003CT>(addr)).field == 0;\n\u002F\u002F RIGHT: use resource directly\ninvariant global\u003CT>(addr).field == 0;\n",[978],{"type":35,"tag":82,"props":979,"children":980},{"__ignoreMap":599},[981,989,997,1005,1013,1022,1031,1040,1049,1058,1066,1075,1084,1093,1102,1110,1119,1128,1137],{"type":35,"tag":605,"props":982,"children":983},{"class":607,"line":608},[984],{"type":35,"tag":605,"props":985,"children":986},{},[987],{"type":41,"value":988},"\u002F\u002F WRONG: old() in aborts_if — compilation error\n",{"type":35,"tag":605,"props":990,"children":991},{"class":607,"line":617},[992],{"type":35,"tag":605,"props":993,"children":994},{},[995],{"type":41,"value":996},"aborts_if old(x) + old(y) > MAX_U64;\n",{"type":35,"tag":605,"props":998,"children":999},{"class":607,"line":626},[1000],{"type":35,"tag":605,"props":1001,"children":1002},{},[1003],{"type":41,"value":1004},"\u002F\u002F RIGHT: aborts_if is pre-state, just use the variables directly\n",{"type":35,"tag":605,"props":1006,"children":1007},{"class":607,"line":635},[1008],{"type":35,"tag":605,"props":1009,"children":1010},{},[1011],{"type":41,"value":1012},"aborts_if x + y > MAX_U64;\n",{"type":35,"tag":605,"props":1014,"children":1015},{"class":607,"line":644},[1016],{"type":35,"tag":605,"props":1017,"children":1019},{"emptyLinePlaceholder":1018},true,[1020],{"type":41,"value":1021},"\n",{"type":35,"tag":605,"props":1023,"children":1025},{"class":607,"line":1024},6,[1026],{"type":35,"tag":605,"props":1027,"children":1028},{},[1029],{"type":41,"value":1030},"\u002F\u002F WRONG: old() in requires — compilation error\n",{"type":35,"tag":605,"props":1032,"children":1034},{"class":607,"line":1033},7,[1035],{"type":35,"tag":605,"props":1036,"children":1037},{},[1038],{"type":41,"value":1039},"requires old(len(v)) > 0;\n",{"type":35,"tag":605,"props":1041,"children":1043},{"class":607,"line":1042},8,[1044],{"type":35,"tag":605,"props":1045,"children":1046},{},[1047],{"type":41,"value":1048},"\u002F\u002F RIGHT: requires is pre-state\n",{"type":35,"tag":605,"props":1050,"children":1052},{"class":607,"line":1051},9,[1053],{"type":35,"tag":605,"props":1054,"children":1055},{},[1056],{"type":41,"value":1057},"requires len(v) > 0;\n",{"type":35,"tag":605,"props":1059,"children":1061},{"class":607,"line":1060},10,[1062],{"type":35,"tag":605,"props":1063,"children":1064},{"emptyLinePlaceholder":1018},[1065],{"type":41,"value":1021},{"type":35,"tag":605,"props":1067,"children":1069},{"class":607,"line":1068},11,[1070],{"type":35,"tag":605,"props":1071,"children":1072},{},[1073],{"type":41,"value":1074},"\u002F\u002F WRONG: old(local) in loop invariant — compilation error\n",{"type":35,"tag":605,"props":1076,"children":1078},{"class":607,"line":1077},12,[1079],{"type":35,"tag":605,"props":1080,"children":1081},{},[1082],{"type":41,"value":1083},"invariant old(sum) \u003C= old(n) * MAX_U64;\n",{"type":35,"tag":605,"props":1085,"children":1087},{"class":607,"line":1086},13,[1088],{"type":35,"tag":605,"props":1089,"children":1090},{},[1091],{"type":41,"value":1092},"\u002F\u002F RIGHT: sum is a local — use it directly; n is a parameter — old(n) is ok\n",{"type":35,"tag":605,"props":1094,"children":1096},{"class":607,"line":1095},14,[1097],{"type":35,"tag":605,"props":1098,"children":1099},{},[1100],{"type":41,"value":1101},"invariant sum \u003C= old(n) * MAX_U64;\n",{"type":35,"tag":605,"props":1103,"children":1105},{"class":607,"line":1104},15,[1106],{"type":35,"tag":605,"props":1107,"children":1108},{"emptyLinePlaceholder":1018},[1109],{"type":41,"value":1021},{"type":35,"tag":605,"props":1111,"children":1113},{"class":607,"line":1112},16,[1114],{"type":35,"tag":605,"props":1115,"children":1116},{},[1117],{"type":41,"value":1118},"\u002F\u002F WRONG: old(resource) in loop invariant — compilation error\n",{"type":35,"tag":605,"props":1120,"children":1122},{"class":607,"line":1121},17,[1123],{"type":35,"tag":605,"props":1124,"children":1125},{},[1126],{"type":41,"value":1127},"invariant old(global\u003CT>(addr)).field == 0;\n",{"type":35,"tag":605,"props":1129,"children":1131},{"class":607,"line":1130},18,[1132],{"type":35,"tag":605,"props":1133,"children":1134},{},[1135],{"type":41,"value":1136},"\u002F\u002F RIGHT: use resource directly\n",{"type":35,"tag":605,"props":1138,"children":1140},{"class":607,"line":1139},19,[1141],{"type":35,"tag":605,"props":1142,"children":1143},{},[1144],{"type":41,"value":1145},"invariant global\u003CT>(addr).field == 0;\n",{"type":35,"tag":348,"props":1147,"children":1149},{"id":1148},"referring-to-behavior-of-other-functions",[1150],{"type":41,"value":1151},"Referring to Behavior of other Functions",{"type":35,"tag":44,"props":1153,"children":1154},{},[1155,1157,1162,1164,1169],{"type":41,"value":1156},"When specifying a function that calls other functions ",{"type":35,"tag":64,"props":1158,"children":1159},{},[1160],{"type":41,"value":1161},"which are not inline functions",{"type":41,"value":1163},", you\ncan use ",{"type":35,"tag":64,"props":1165,"children":1166},{},[1167],{"type":41,"value":1168},"behavioral predicates",{"type":41,"value":1170}," to abstract the callee's specification without inlining its\ndetails. These built-in predicates lift a function's spec clauses into expressions:",{"type":35,"tag":56,"props":1172,"children":1173},{},[1174,1208,1236,1280],{"type":35,"tag":60,"props":1175,"children":1176},{},[1177,1183,1185,1191,1193,1199,1201,1207],{"type":35,"tag":82,"props":1178,"children":1180},{"className":1179},[],[1181],{"type":41,"value":1182},"requires_of\u003Cf>(args)",{"type":41,"value":1184}," — true when ",{"type":35,"tag":82,"props":1186,"children":1188},{"className":1187},[],[1189],{"type":41,"value":1190},"f",{"type":41,"value":1192},"'s ",{"type":35,"tag":82,"props":1194,"children":1196},{"className":1195},[],[1197],{"type":41,"value":1198},"requires",{"type":41,"value":1200}," clauses hold for ",{"type":35,"tag":82,"props":1202,"children":1204},{"className":1203},[],[1205],{"type":41,"value":1206},"args",{"type":41,"value":533},{"type":35,"tag":60,"props":1209,"children":1210},{},[1211,1217,1218,1223,1224,1229,1230,1235],{"type":35,"tag":82,"props":1212,"children":1214},{"className":1213},[],[1215],{"type":41,"value":1216},"aborts_of\u003Cf>(args)",{"type":41,"value":1184},{"type":35,"tag":82,"props":1219,"children":1221},{"className":1220},[],[1222],{"type":41,"value":1190},{"type":41,"value":1192},{"type":35,"tag":82,"props":1225,"children":1227},{"className":1226},[],[1228],{"type":41,"value":508},{"type":41,"value":1200},{"type":35,"tag":82,"props":1231,"children":1233},{"className":1232},[],[1234],{"type":41,"value":1206},{"type":41,"value":533},{"type":35,"tag":60,"props":1237,"children":1238},{},[1239,1245,1246,1251,1252,1257,1259,1264,1266,1271,1273,1279],{"type":35,"tag":82,"props":1240,"children":1242},{"className":1241},[],[1243],{"type":41,"value":1244},"ensures_of\u003Cf>(args, result)",{"type":41,"value":1184},{"type":35,"tag":82,"props":1247,"children":1249},{"className":1248},[],[1250],{"type":41,"value":1190},{"type":41,"value":1192},{"type":35,"tag":82,"props":1253,"children":1255},{"className":1254},[],[1256],{"type":41,"value":790},{"type":41,"value":1258}," clauses hold for\n",{"type":35,"tag":82,"props":1260,"children":1262},{"className":1261},[],[1263],{"type":41,"value":1206},{"type":41,"value":1265}," and the given ",{"type":35,"tag":82,"props":1267,"children":1269},{"className":1268},[],[1270],{"type":41,"value":782},{"type":41,"value":1272}," value(s). For functions returning unit, omit\nthe result argument. For multiple return values, pass ",{"type":35,"tag":82,"props":1274,"children":1276},{"className":1275},[],[1277],{"type":41,"value":1278},"result_1, result_2, ...",{"type":41,"value":533},{"type":35,"tag":60,"props":1281,"children":1282},{},[1283,1289,1291,1296,1298,1303,1305,1311],{"type":35,"tag":82,"props":1284,"children":1286},{"className":1285},[],[1287],{"type":41,"value":1288},"result_of\u003Cf>(args)",{"type":41,"value":1290}," — the return value of ",{"type":35,"tag":82,"props":1292,"children":1294},{"className":1293},[],[1295],{"type":41,"value":1190},{"type":41,"value":1297}," when called with ",{"type":35,"tag":82,"props":1299,"children":1301},{"className":1300},[],[1302],{"type":41,"value":1206},{"type":41,"value":1304},",\nusable in ",{"type":35,"tag":82,"props":1306,"children":1308},{"className":1307},[],[1309],{"type":41,"value":1310},"let",{"type":41,"value":1312}," bindings and expressions inside spec blocks.",{"type":35,"tag":44,"props":1314,"children":1315},{},[1316,1318,1324],{"type":41,"value":1317},"The ",{"type":35,"tag":82,"props":1319,"children":1321},{"className":1320},[],[1322],{"type":41,"value":1323},"\u003Cf>",{"type":41,"value":1325}," target can be:",{"type":35,"tag":56,"props":1327,"children":1328},{},[1329,1363,1389],{"type":35,"tag":60,"props":1330,"children":1331},{},[1332,1334,1339,1341,1347,1349,1354,1356,1362],{"type":41,"value":1333},"A ",{"type":35,"tag":64,"props":1335,"children":1336},{},[1337],{"type":41,"value":1338},"function parameter",{"type":41,"value":1340}," of function type: ",{"type":35,"tag":82,"props":1342,"children":1344},{"className":1343},[],[1345],{"type":41,"value":1346},"ensures_of\u003Cf>(x, result)",{"type":41,"value":1348}," where\n",{"type":35,"tag":82,"props":1350,"children":1352},{"className":1351},[],[1353],{"type":41,"value":1190},{"type":41,"value":1355}," is a parameter with type ",{"type":35,"tag":82,"props":1357,"children":1359},{"className":1358},[],[1360],{"type":41,"value":1361},"|u64| u64",{"type":41,"value":533},{"type":35,"tag":60,"props":1364,"children":1365},{},[1366,1367,1372,1374,1380,1382,1388],{"type":41,"value":1333},{"type":35,"tag":64,"props":1368,"children":1369},{},[1370],{"type":41,"value":1371},"named function",{"type":41,"value":1373}," (same module or cross-module): ",{"type":35,"tag":82,"props":1375,"children":1377},{"className":1376},[],[1378],{"type":41,"value":1379},"ensures_of\u003Cincrement>(x, result)",{"type":41,"value":1381},"\nor ",{"type":35,"tag":82,"props":1383,"children":1385},{"className":1384},[],[1386],{"type":41,"value":1387},"ensures_of\u003CM::increment>(x, result)",{"type":41,"value":533},{"type":35,"tag":60,"props":1390,"children":1391},{},[1392,1393,1398,1400,1406,1407,1413],{"type":41,"value":1333},{"type":35,"tag":64,"props":1394,"children":1395},{},[1396],{"type":41,"value":1397},"generic function",{"type":41,"value":1399}," with explicit or inferred type arguments:\n",{"type":35,"tag":82,"props":1401,"children":1403},{"className":1402},[],[1404],{"type":41,"value":1405},"ensures_of\u003Cidentity\u003Cu64>>(x, result)",{"type":41,"value":930},{"type":35,"tag":82,"props":1408,"children":1410},{"className":1409},[],[1411],{"type":41,"value":1412},"ensures_of\u003Cidentity>(x, result)",{"type":41,"value":533},{"type":35,"tag":44,"props":1415,"children":1416},{},[1417],{"type":35,"tag":64,"props":1418,"children":1419},{},[1420],{"type":41,"value":1421},"Examples:",{"type":35,"tag":44,"props":1423,"children":1424},{},[1425],{"type":41,"value":1426},"Specifying a higher-order function that applies a callback:",{"type":35,"tag":595,"props":1428,"children":1430},{"className":597,"code":1429,"language":4,"meta":599,"style":599},"fun apply(f: |u64| u64, x: u64): u64 { f(x) }\nspec apply {\n    aborts_if aborts_of\u003Cf>(x);\n    ensures ensures_of\u003Cf>(x, result);\n}\n",[1431],{"type":35,"tag":82,"props":1432,"children":1433},{"__ignoreMap":599},[1434,1442,1450,1458,1466],{"type":35,"tag":605,"props":1435,"children":1436},{"class":607,"line":608},[1437],{"type":35,"tag":605,"props":1438,"children":1439},{},[1440],{"type":41,"value":1441},"fun apply(f: |u64| u64, x: u64): u64 { f(x) }\n",{"type":35,"tag":605,"props":1443,"children":1444},{"class":607,"line":617},[1445],{"type":35,"tag":605,"props":1446,"children":1447},{},[1448],{"type":41,"value":1449},"spec apply {\n",{"type":35,"tag":605,"props":1451,"children":1452},{"class":607,"line":626},[1453],{"type":35,"tag":605,"props":1454,"children":1455},{},[1456],{"type":41,"value":1457},"    aborts_if aborts_of\u003Cf>(x);\n",{"type":35,"tag":605,"props":1459,"children":1460},{"class":607,"line":635},[1461],{"type":35,"tag":605,"props":1462,"children":1463},{},[1464],{"type":41,"value":1465},"    ensures ensures_of\u003Cf>(x, result);\n",{"type":35,"tag":605,"props":1467,"children":1468},{"class":607,"line":644},[1469],{"type":35,"tag":605,"props":1470,"children":1471},{},[1472],{"type":41,"value":1473},"}\n",{"type":35,"tag":44,"props":1475,"children":1476},{},[1477,1479,1485,1487,1493],{"type":41,"value":1478},"Using ",{"type":35,"tag":82,"props":1480,"children":1482},{"className":1481},[],[1483],{"type":41,"value":1484},"result_of",{"type":41,"value":1486}," to chain calls in a spec (e.g. ",{"type":35,"tag":82,"props":1488,"children":1490},{"className":1489},[],[1491],{"type":41,"value":1492},"f(f(x))",{"type":41,"value":1494},"):",{"type":35,"tag":595,"props":1496,"children":1498},{"className":597,"code":1497,"language":4,"meta":599,"style":599},"fun apply_seq(f: |u64| u64 has copy, x: u64): u64 { f(f(x)) }\nspec apply_seq {\n    let y = result_of\u003Cf>(x);\n    requires requires_of\u003Cf>(x) && requires_of\u003Cf>(y);\n    aborts_if aborts_of\u003Cf>(x) || aborts_of\u003Cf>(y);\n    ensures result == result_of\u003Cf>(y);\n}\n",[1499],{"type":35,"tag":82,"props":1500,"children":1501},{"__ignoreMap":599},[1502,1510,1518,1526,1534,1542,1550],{"type":35,"tag":605,"props":1503,"children":1504},{"class":607,"line":608},[1505],{"type":35,"tag":605,"props":1506,"children":1507},{},[1508],{"type":41,"value":1509},"fun apply_seq(f: |u64| u64 has copy, x: u64): u64 { f(f(x)) }\n",{"type":35,"tag":605,"props":1511,"children":1512},{"class":607,"line":617},[1513],{"type":35,"tag":605,"props":1514,"children":1515},{},[1516],{"type":41,"value":1517},"spec apply_seq {\n",{"type":35,"tag":605,"props":1519,"children":1520},{"class":607,"line":626},[1521],{"type":35,"tag":605,"props":1522,"children":1523},{},[1524],{"type":41,"value":1525},"    let y = result_of\u003Cf>(x);\n",{"type":35,"tag":605,"props":1527,"children":1528},{"class":607,"line":635},[1529],{"type":35,"tag":605,"props":1530,"children":1531},{},[1532],{"type":41,"value":1533},"    requires requires_of\u003Cf>(x) && requires_of\u003Cf>(y);\n",{"type":35,"tag":605,"props":1535,"children":1536},{"class":607,"line":644},[1537],{"type":35,"tag":605,"props":1538,"children":1539},{},[1540],{"type":41,"value":1541},"    aborts_if aborts_of\u003Cf>(x) || aborts_of\u003Cf>(y);\n",{"type":35,"tag":605,"props":1543,"children":1544},{"class":607,"line":1024},[1545],{"type":35,"tag":605,"props":1546,"children":1547},{},[1548],{"type":41,"value":1549},"    ensures result == result_of\u003Cf>(y);\n",{"type":35,"tag":605,"props":1551,"children":1552},{"class":607,"line":1033},[1553],{"type":35,"tag":605,"props":1554,"children":1555},{},[1556],{"type":41,"value":1473},{"type":35,"tag":44,"props":1558,"children":1559},{},[1560],{"type":41,"value":1561},"Referring to a named function's behavior from a caller:",{"type":35,"tag":595,"props":1563,"children":1565},{"className":597,"code":1564,"language":4,"meta":599,"style":599},"spec bar {\n    ensures ensures_of\u003Cincrement>(x, result);\n}\n",[1566],{"type":35,"tag":82,"props":1567,"children":1568},{"__ignoreMap":599},[1569,1577,1585],{"type":35,"tag":605,"props":1570,"children":1571},{"class":607,"line":608},[1572],{"type":35,"tag":605,"props":1573,"children":1574},{},[1575],{"type":41,"value":1576},"spec bar {\n",{"type":35,"tag":605,"props":1578,"children":1579},{"class":607,"line":617},[1580],{"type":35,"tag":605,"props":1581,"children":1582},{},[1583],{"type":41,"value":1584},"    ensures ensures_of\u003Cincrement>(x, result);\n",{"type":35,"tag":605,"props":1586,"children":1587},{"class":607,"line":626},[1588],{"type":35,"tag":605,"props":1589,"children":1590},{},[1591],{"type":41,"value":1473},{"type":35,"tag":44,"props":1593,"children":1594},{},[1595,1596,1601],{"type":41,"value":1478},{"type":35,"tag":82,"props":1597,"children":1599},{"className":1598},[],[1600],{"type":41,"value":1484},{"type":41,"value":1602}," inside loop invariants with closures:",{"type":35,"tag":595,"props":1604,"children":1606},{"className":597,"code":1605,"language":4,"meta":599,"style":599},"spec {\n    invariant forall j in 0..i: !result_of\u003Cpred>(v[j]);\n};\n",[1607],{"type":35,"tag":82,"props":1608,"children":1609},{"__ignoreMap":599},[1610,1618,1626],{"type":35,"tag":605,"props":1611,"children":1612},{"class":607,"line":608},[1613],{"type":35,"tag":605,"props":1614,"children":1615},{},[1616],{"type":41,"value":1617},"spec {\n",{"type":35,"tag":605,"props":1619,"children":1620},{"class":607,"line":617},[1621],{"type":35,"tag":605,"props":1622,"children":1623},{},[1624],{"type":41,"value":1625},"    invariant forall j in 0..i: !result_of\u003Cpred>(v[j]);\n",{"type":35,"tag":605,"props":1627,"children":1628},{"class":607,"line":626},[1629],{"type":35,"tag":605,"props":1630,"children":1631},{},[1632],{"type":41,"value":650},{"type":35,"tag":348,"props":1634,"children":1636},{"id":1635},"property-markers",[1637],{"type":41,"value":1638},"Property markers",{"type":35,"tag":44,"props":1640,"children":1641},{},[1642,1643,1649],{"type":41,"value":1317},{"type":35,"tag":82,"props":1644,"children":1646},{"className":1645},[],[1647],{"type":41,"value":1648},"[inferred]",{"type":41,"value":1650}," property marks conditions that were not written by the user. Its value indicates\nthe origin or quality:",{"type":35,"tag":56,"props":1652,"children":1653},{},[1654,1664,1675],{"type":35,"tag":60,"props":1655,"children":1656},{},[1657,1662],{"type":35,"tag":82,"props":1658,"children":1660},{"className":1659},[],[1661],{"type":41,"value":1648},{"type":41,"value":1663},": Automatically inferred by weakest-precondition (WP) analysis. It may be overly complex, redundant,\nor occasionally incorrect.",{"type":35,"tag":60,"props":1665,"children":1666},{},[1667,1673],{"type":35,"tag":82,"props":1668,"children":1670},{"className":1669},[],[1671],{"type":41,"value":1672},"[inferred = vacuous]",{"type":41,"value":1674},": Inferred by WP but detected as potentially vacuous (trivially true)\ndue to unconstrained quantifier variables. Typically results from missing loop invariants.",{"type":35,"tag":60,"props":1676,"children":1677},{},[1678,1684],{"type":35,"tag":82,"props":1679,"children":1681},{"className":1680},[],[1682],{"type":41,"value":1683},"[inferred = sathard]",{"type":41,"value":1685},": Inferred by WP but contains quantifier patterns that are hard for\nSMT solvers. Likely to cause verification timeouts — should be simplified or reformulated.",{"type":35,"tag":348,"props":1687,"children":1689},{"id":1688},"links-1",[1690],{"type":41,"value":353},{"type":35,"tag":56,"props":1692,"children":1693},{},[1694],{"type":35,"tag":60,"props":1695,"children":1696},{},[1697],{"type":35,"tag":361,"props":1698,"children":1701},{"href":1699,"rel":1700},"https:\u002F\u002Faptos.dev\u002Fen\u002Fbuild\u002Fsmart-contracts\u002Fprover\u002Fspec-lang",[365],[1702],{"type":41,"value":384},{"type":35,"tag":36,"props":1704,"children":1706},{"id":1705},"move-packages",[1707],{"type":41,"value":1708},"Move Packages",{"type":35,"tag":44,"props":1710,"children":1711},{},[1712,1714,1720],{"type":41,"value":1713},"A Move package is a directory with a ",{"type":35,"tag":82,"props":1715,"children":1717},{"className":1716},[],[1718],{"type":41,"value":1719},"Move.toml",{"type":41,"value":1721}," manifest and source files. The manifest defines the package name, dependencies, and named addresses.",{"type":35,"tag":348,"props":1723,"children":1725},{"id":1724},"named-addresses",[1726],{"type":41,"value":1727},"Named Addresses",{"type":35,"tag":44,"props":1729,"children":1730},{},[1731,1733,1739],{"type":41,"value":1732},"Modules are published at named addresses (e.g., ",{"type":35,"tag":82,"props":1734,"children":1736},{"className":1735},[],[1737],{"type":41,"value":1738},"@my_package",{"type":41,"value":1740},"). These must resolve to hex values for compilation.",{"type":35,"tag":56,"props":1742,"children":1743},{},[1744,1766],{"type":35,"tag":60,"props":1745,"children":1746},{},[1747,1756,1758,1764],{"type":35,"tag":64,"props":1748,"children":1749},{},[1750],{"type":35,"tag":82,"props":1751,"children":1753},{"className":1752},[],[1754],{"type":41,"value":1755},"[addresses]",{"type":41,"value":1757}," — production addresses (may use ",{"type":35,"tag":82,"props":1759,"children":1761},{"className":1760},[],[1762],{"type":41,"value":1763},"_",{"type":41,"value":1765}," placeholder for deploy-time assignment)",{"type":35,"tag":60,"props":1767,"children":1768},{},[1769,1778],{"type":35,"tag":64,"props":1770,"children":1771},{},[1772],{"type":35,"tag":82,"props":1773,"children":1775},{"className":1774},[],[1776],{"type":41,"value":1777},"[dev-addresses]",{"type":41,"value":1779}," — development\u002Ftest values (used when compiling in dev or test mode)",{"type":35,"tag":44,"props":1781,"children":1782},{},[1783,1788,1790,1796,1798,1804,1806,1811,1813,1818,1819,1825,1827,1833,1835,1841,1843,1849,1851,1857,1859,1865,1867,1873,1875,1881,1883,1889],{"type":35,"tag":64,"props":1784,"children":1785},{},[1786],{"type":41,"value":1787},"Fixing \"Unresolved addresses\" errors:",{"type":41,"value":1789}," For each ",{"type":35,"tag":82,"props":1791,"children":1793},{"className":1792},[],[1794],{"type":41,"value":1795},"Named address 'X' in package 'Y'",{"type":41,"value":1797},", add ",{"type":35,"tag":82,"props":1799,"children":1801},{"className":1800},[],[1802],{"type":41,"value":1803},"X = \"0x...\"",{"type":41,"value":1805}," to ",{"type":35,"tag":82,"props":1807,"children":1809},{"className":1808},[],[1810],{"type":41,"value":1777},{"type":41,"value":1812}," in that package's ",{"type":35,"tag":82,"props":1814,"children":1816},{"className":1815},[],[1817],{"type":41,"value":1719},{"type":41,"value":461},{"type":35,"tag":82,"props":1820,"children":1822},{"className":1821},[],[1823],{"type":41,"value":1824},"0x100",{"type":41,"value":1826}," and up, avoiding reserved addresses (",{"type":35,"tag":82,"props":1828,"children":1830},{"className":1829},[],[1831],{"type":41,"value":1832},"0x0",{"type":41,"value":1834},"=vm_reserved, ",{"type":35,"tag":82,"props":1836,"children":1838},{"className":1837},[],[1839],{"type":41,"value":1840},"0x1",{"type":41,"value":1842},"=std\u002Faptos_std\u002Faptos_framework, ",{"type":35,"tag":82,"props":1844,"children":1846},{"className":1845},[],[1847],{"type":41,"value":1848},"0x3",{"type":41,"value":1850},"=aptos_token, ",{"type":35,"tag":82,"props":1852,"children":1854},{"className":1853},[],[1855],{"type":41,"value":1856},"0x4",{"type":41,"value":1858},"=aptos_token_objects, ",{"type":35,"tag":82,"props":1860,"children":1862},{"className":1861},[],[1863],{"type":41,"value":1864},"0x5",{"type":41,"value":1866},"=aptos_trading, ",{"type":35,"tag":82,"props":1868,"children":1870},{"className":1869},[],[1871],{"type":41,"value":1872},"0x7",{"type":41,"value":1874},"=aptos_experimental, ",{"type":35,"tag":82,"props":1876,"children":1878},{"className":1877},[],[1879],{"type":41,"value":1880},"0xA",{"type":41,"value":1882},"=aptos_fungible_asset, ",{"type":35,"tag":82,"props":1884,"children":1886},{"className":1885},[],[1887],{"type":41,"value":1888},"0xA550C18",{"type":41,"value":1890},"=core_resources):",{"type":35,"tag":595,"props":1892,"children":1896},{"className":1893,"code":1894,"language":1895,"meta":599,"style":599},"language-toml shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","[dev-addresses]\nmy_package = \"0x100\"\nother_addr = \"0x101\"\n","toml",[1897],{"type":35,"tag":82,"props":1898,"children":1899},{"__ignoreMap":599},[1900,1908,1916],{"type":35,"tag":605,"props":1901,"children":1902},{"class":607,"line":608},[1903],{"type":35,"tag":605,"props":1904,"children":1905},{},[1906],{"type":41,"value":1907},"[dev-addresses]\n",{"type":35,"tag":605,"props":1909,"children":1910},{"class":607,"line":617},[1911],{"type":35,"tag":605,"props":1912,"children":1913},{},[1914],{"type":41,"value":1915},"my_package = \"0x100\"\n",{"type":35,"tag":605,"props":1917,"children":1918},{"class":607,"line":626},[1919],{"type":35,"tag":605,"props":1920,"children":1921},{},[1922],{"type":41,"value":1923},"other_addr = \"0x101\"\n",{"type":35,"tag":36,"props":1925,"children":1927},{"id":1926},"checking-move-code",[1928],{"type":41,"value":1929},"Checking Move Code",{"type":35,"tag":44,"props":1931,"children":1932},{},[1933,1935,1941],{"type":41,"value":1934},"Use the ",{"type":35,"tag":82,"props":1936,"children":1938},{"className":1937},[],[1939],{"type":41,"value":1940},"move_package_status",{"type":41,"value":1942}," MCP tool to check for compilation errors and warnings.",{"type":35,"tag":56,"props":1944,"children":1945},{},[1946,1966],{"type":35,"tag":60,"props":1947,"children":1948},{},[1949,1951,1956,1958,1964],{"type":41,"value":1950},"Call ",{"type":35,"tag":82,"props":1952,"children":1954},{"className":1953},[],[1955],{"type":41,"value":1940},{"type":41,"value":1957}," with ",{"type":35,"tag":82,"props":1959,"children":1961},{"className":1960},[],[1962],{"type":41,"value":1963},"package_path",{"type":41,"value":1965}," set to the package directory.",{"type":35,"tag":60,"props":1967,"children":1968},{},[1969],{"type":41,"value":1970},"The tool sets error and returns detailed error messages if the package does not compile.",{"type":35,"tag":44,"props":1972,"children":1973},{},[1974],{"type":41,"value":1975},"Notice that like with a build system, the tool is idempotent, and does not cause recompilation\nif the compilation result and sources are up-to-date.",{"type":35,"tag":36,"props":1977,"children":1979},{"id":1978},"package-manifest",[1980],{"type":41,"value":1981},"Package Manifest",{"type":35,"tag":44,"props":1983,"children":1984},{},[1985,1986,1992],{"type":41,"value":1934},{"type":35,"tag":82,"props":1987,"children":1989},{"className":1988},[],[1990],{"type":41,"value":1991},"move_package_manifest",{"type":41,"value":1993}," MCP tool to discover source files and dependencies\nof a Move package:",{"type":35,"tag":56,"props":1995,"children":1996},{},[1997,2013],{"type":35,"tag":60,"props":1998,"children":1999},{},[2000,2001,2006,2007,2012],{"type":41,"value":1950},{"type":35,"tag":82,"props":2002,"children":2004},{"className":2003},[],[2005],{"type":41,"value":1991},{"type":41,"value":1957},{"type":35,"tag":82,"props":2008,"children":2010},{"className":2009},[],[2011],{"type":41,"value":1963},{"type":41,"value":1965},{"type":35,"tag":60,"props":2014,"children":2015},{},[2016,2018,2024,2026,2032],{"type":41,"value":2017},"The result includes ",{"type":35,"tag":82,"props":2019,"children":2021},{"className":2020},[],[2022],{"type":41,"value":2023},"source_paths",{"type":41,"value":2025}," (target modules) and ",{"type":35,"tag":82,"props":2027,"children":2029},{"className":2028},[],[2030],{"type":41,"value":2031},"dep_paths",{"type":41,"value":2033}," (dependencies).",{"type":35,"tag":36,"props":2035,"children":2037},{"id":2036},"querying-package-structure",[2038],{"type":41,"value":2039},"Querying Package Structure",{"type":35,"tag":44,"props":2041,"children":2042},{},[2043,2044,2050],{"type":41,"value":1934},{"type":35,"tag":82,"props":2045,"children":2047},{"className":2046},[],[2048],{"type":41,"value":2049},"move_package_query",{"type":41,"value":2051}," MCP tool to inspect the structure of a Move package.",{"type":35,"tag":44,"props":2053,"children":2054},{},[2055],{"type":41,"value":2056},"Parameters:",{"type":35,"tag":56,"props":2058,"children":2059},{},[2060,2073,2087],{"type":35,"tag":60,"props":2061,"children":2062},{},[2063,2071],{"type":35,"tag":64,"props":2064,"children":2065},{},[2066],{"type":35,"tag":82,"props":2067,"children":2069},{"className":2068},[],[2070],{"type":41,"value":1963},{"type":41,"value":2072}," (required) — path to the Move package directory.",{"type":35,"tag":60,"props":2074,"children":2075},{},[2076,2085],{"type":35,"tag":64,"props":2077,"children":2078},{},[2079],{"type":35,"tag":82,"props":2080,"children":2082},{"className":2081},[],[2083],{"type":41,"value":2084},"query",{"type":41,"value":2086}," (required) — one of the query types below.",{"type":35,"tag":60,"props":2088,"children":2089},{},[2090,2099,2101,2107,2109,2115],{"type":35,"tag":64,"props":2091,"children":2092},{},[2093],{"type":35,"tag":82,"props":2094,"children":2096},{"className":2095},[],[2097],{"type":41,"value":2098},"function",{"type":41,"value":2100}," (required for ",{"type":35,"tag":82,"props":2102,"children":2104},{"className":2103},[],[2105],{"type":41,"value":2106},"function_usage",{"type":41,"value":2108},") — function name in the form ",{"type":35,"tag":82,"props":2110,"children":2112},{"className":2111},[],[2113],{"type":41,"value":2114},"module_name::function_name",{"type":41,"value":533},{"type":35,"tag":348,"props":2117,"children":2119},{"id":2118},"query-types",[2120],{"type":41,"value":2121},"Query Types",{"type":35,"tag":56,"props":2123,"children":2124},{},[2125,2139,2153,2167],{"type":35,"tag":60,"props":2126,"children":2127},{},[2128,2137],{"type":35,"tag":64,"props":2129,"children":2130},{},[2131],{"type":35,"tag":82,"props":2132,"children":2134},{"className":2133},[],[2135],{"type":41,"value":2136},"dep_graph",{"type":41,"value":2138}," — returns a map from each module to the modules it depends on.\nUseful for understanding module layering and import structure.",{"type":35,"tag":60,"props":2140,"children":2141},{},[2142,2151],{"type":35,"tag":64,"props":2143,"children":2144},{},[2145],{"type":35,"tag":82,"props":2146,"children":2148},{"className":2147},[],[2149],{"type":41,"value":2150},"module_summary",{"type":41,"value":2152}," — returns a summary of each module's constants, structs,\nand functions. Useful for getting an overview without reading all source files.",{"type":35,"tag":60,"props":2154,"children":2155},{},[2156,2165],{"type":35,"tag":64,"props":2157,"children":2158},{},[2159],{"type":35,"tag":82,"props":2160,"children":2162},{"className":2161},[],[2163],{"type":41,"value":2164},"call_graph",{"type":41,"value":2166}," — returns a function-level call graph as a map from each\nfunction to the functions it calls.",{"type":35,"tag":60,"props":2168,"children":2169},{},[2170,2178,2180,2185],{"type":35,"tag":64,"props":2171,"children":2172},{},[2173],{"type":35,"tag":82,"props":2174,"children":2176},{"className":2175},[],[2177],{"type":41,"value":2106},{"type":41,"value":2179}," — returns direct and transitive calls\u002Fuses for a given\nfunction. \"called\" = direct calls; \"used\" = direct calls + closure captures.\nRequires the ",{"type":35,"tag":82,"props":2181,"children":2183},{"className":2182},[],[2184],{"type":41,"value":2098},{"type":41,"value":2186}," parameter.",{"type":35,"tag":2188,"props":2189,"children":2190},"style",{},[2191],{"type":41,"value":2192},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"items":2194,"total":1033},[2195,2200,2211,2222,2233,2244,2253],{"slug":4,"name":4,"fn":5,"description":6,"org":2196,"tags":2197,"stars":20,"repoUrl":21,"updatedAt":22},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2198,2199],{"name":14,"slug":15,"type":16},{"name":18,"slug":19,"type":16},{"slug":2201,"name":2201,"fn":2202,"description":2203,"org":2204,"tags":2205,"stars":20,"repoUrl":21,"updatedAt":2210},"move-check","check Move packages for compilation errors","Check a Move package for compilation errors",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2206,2209],{"name":2207,"slug":2208,"type":16},"Debugging","debugging",{"name":18,"slug":19,"type":16},"2026-07-19T06:03:09.843322",{"slug":2212,"name":2212,"fn":2213,"description":2214,"org":2215,"tags":2216,"stars":20,"repoUrl":21,"updatedAt":2221},"move-inf","infer specifications for Move packages","Infer specifications for a Move package",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2217,2220],{"name":2218,"slug":2219,"type":16},"Data Modeling","data-modeling",{"name":18,"slug":19,"type":16},"2026-07-19T06:03:10.203983",{"slug":2223,"name":2223,"fn":2224,"description":2225,"org":2226,"tags":2227,"stars":20,"repoUrl":21,"updatedAt":2232},"move-init","initialize Move workflow routing","Initialize Move workflow routing in the project CLAUDE.md",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2228,2231],{"name":2229,"slug":2230,"type":16},"Configuration","configuration",{"name":18,"slug":19,"type":16},"2026-07-19T06:03:48.382736",{"slug":2234,"name":2234,"fn":2235,"description":2236,"org":2237,"tags":2238,"stars":20,"repoUrl":21,"updatedAt":2243},"move-prove","verify Move specifications with Move Prover","Run the Move Prover to formally verify specifications",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2239,2242],{"name":2240,"slug":2241,"type":16},"Testing","testing",{"name":18,"slug":19,"type":16},"2026-07-19T06:03:10.663492",{"slug":2245,"name":2245,"fn":2246,"description":2247,"org":2248,"tags":2249,"stars":20,"repoUrl":21,"updatedAt":2252},"move-replay","replay and debug Aptos transactions","Replay a committed on-chain Aptos transaction locally to debug its outcome. Use when investigating a failed or unexpected transaction, reproducing an abort, or testing a local Move patch against a historical transaction.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2250,2251],{"name":2207,"slug":2208,"type":16},{"name":18,"slug":19,"type":16},"2026-07-19T06:03:11.562048",{"slug":2254,"name":2254,"fn":2255,"description":2256,"org":2257,"tags":2258,"stars":20,"repoUrl":21,"updatedAt":2261},"move-test","generate unit tests for Move code","Generate unit tests for Move code. Use for test generation, writing tests, or improving coverage.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2259,2260],{"name":2240,"slug":2241,"type":16},{"name":18,"slug":19,"type":16},"2026-07-19T06:03:11.019744",{"items":2263,"total":2424},[2264,2279,2296,2310,2322,2336,2350,2365,2379,2394,2404,2414],{"slug":2265,"name":2265,"fn":2266,"description":2267,"org":2268,"tags":2269,"stars":1130,"repoUrl":2277,"updatedAt":2278},"analyze-gas-optimization","optimize Aptos Move contracts for gas","Analyze and optimize Aptos Move contracts for gas efficiency, identifying expensive operations and suggesting optimizations. Triggers on: 'optimize gas', 'reduce gas costs', 'gas analysis', 'make contract cheaper', 'gas efficiency', 'analyze gas usage', 'reduce transaction costs'.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2270,2271,2274],{"name":14,"slug":15,"type":16},{"name":2272,"slug":2273,"type":16},"Performance","performance",{"name":2275,"slug":2276,"type":16},"Smart Contracts","smart-contracts","https:\u002F\u002Fgithub.com\u002Faptos-labs\u002Faptos-agent-skills","2026-07-12T08:07:14.117466",{"slug":2280,"name":2280,"fn":2281,"description":2282,"org":2283,"tags":2284,"stars":1130,"repoUrl":2277,"updatedAt":2295},"create-aptos-project","scaffold new Aptos dApp projects","Scaffolds new Aptos projects using npx create-aptos-dapp. Supports fullstack (Vite or Next.js) and contract-only templates with network selection and optional API key. Triggers on: 'build app', 'create app', 'make app', 'new app', 'build dApp', 'create dApp', 'new dApp', 'build project', 'new project', 'create project', 'scaffold', 'start project', 'set up project', 'build me a', 'I want to build', 'make me a', 'help me build'.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2285,2288,2291,2294],{"name":2286,"slug":2287,"type":16},"Next.js","next-js",{"name":2289,"slug":2290,"type":16},"TypeScript","typescript",{"name":2292,"slug":2293,"type":16},"Vite","vite",{"name":18,"slug":19,"type":16},"2026-07-12T08:07:30.595111",{"slug":2297,"name":2297,"fn":2298,"description":2299,"org":2300,"tags":2301,"stars":1130,"repoUrl":2277,"updatedAt":2309},"deploy-contracts","deploy Move contracts to Aptos networks","Safely deploys Move contracts to Aptos networks (devnet, testnet, mainnet) with pre-deployment verification. Triggers on: 'deploy contract', 'publish to testnet', 'deploy to mainnet', 'how to deploy', 'publish module', 'deployment checklist', 'deploy to devnet'.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2302,2305,2308],{"name":2303,"slug":2304,"type":16},"Deployment","deployment",{"name":2306,"slug":2307,"type":16},"Engineering","engineering",{"name":2275,"slug":2276,"type":16},"2026-07-12T08:07:16.798352",{"slug":2311,"name":2311,"fn":2312,"description":2313,"org":2314,"tags":2315,"stars":1130,"repoUrl":2277,"updatedAt":2321},"generate-tests","generate test suites for Move contracts","Creates comprehensive test suites for Move contracts with 100% coverage requirement. Triggers on: 'generate tests', 'create tests', 'write test suite', 'test this contract', 'how to test', 'add test coverage', 'write unit tests'.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2316,2317,2320],{"name":2306,"slug":2307,"type":16},{"name":2318,"slug":2319,"type":16},"QA","qa",{"name":2240,"slug":2241,"type":16},"2026-07-12T08:07:18.0205",{"slug":2323,"name":2323,"fn":2324,"description":2325,"org":2326,"tags":2327,"stars":1130,"repoUrl":2277,"updatedAt":2335},"modernize-move","modernize Move V1 contracts to V2","Detects and modernizes outdated Move V1 syntax, patterns, and APIs to Move V2+. Use when upgrading legacy contracts, migrating to modern syntax, or converting old patterns to current best practices. NOT for writing new contracts (use write-contracts) or fixing bugs.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2328,2331,2332],{"name":2329,"slug":2330,"type":16},"Code Analysis","code-analysis",{"name":2306,"slug":2307,"type":16},{"name":2333,"slug":2334,"type":16},"Migration","migration","2026-07-12T08:07:10.226223",{"slug":2337,"name":2337,"fn":2338,"description":2339,"org":2340,"tags":2341,"stars":1130,"repoUrl":2277,"updatedAt":2349},"search-aptos-examples","search Aptos reference implementations","Searches aptos-core and daily-move for reference implementations before writing contracts. Triggers on: 'search examples', 'find example', 'check aptos-core', 'is there an example', 'reference implementation', 'how does aptos implement', 'similar contract', 'daily-move'.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2342,2343,2346],{"name":14,"slug":15,"type":16},{"name":2344,"slug":2345,"type":16},"Documentation","documentation",{"name":2347,"slug":2348,"type":16},"Search","search","2026-07-12T08:07:15.382039",{"slug":2351,"name":2351,"fn":2352,"description":2353,"org":2354,"tags":2355,"stars":1130,"repoUrl":2277,"updatedAt":2364},"security-audit","audit Move smart contracts for security","Audits Move contracts for security vulnerabilities before deployment using 7-category checklist. Triggers on: 'audit contract', 'security check', 'review security', 'check for vulnerabilities', 'security audit', 'is this secure', 'find security issues'.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2356,2359,2360,2363],{"name":2357,"slug":2358,"type":16},"Audit","audit",{"name":2329,"slug":2330,"type":16},{"name":2361,"slug":2362,"type":16},"Security","security",{"name":2275,"slug":2276,"type":16},"2026-07-12T08:07:11.680215",{"slug":2366,"name":2366,"fn":2367,"description":2368,"org":2369,"tags":2370,"stars":1130,"repoUrl":2277,"updatedAt":2378},"smoothsend-gasless","sponsor gas fees for Aptos dApps","How to sponsor gas fees for Aptos dApp users using SmoothSend. Paid commercial service: free on testnet, credit-based on mainnet. Covers 3-line wallet adapter integration (transactionSubmitter), Script Composer for fee-in-token stablecoin transfers. Triggers on: 'gasless', 'sponsor gas', 'users pay no APT', 'transactionSubmitter', 'SmoothSend', 'fee payer', 'pay gas for users', 'no gas required'.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2371,2374,2377],{"name":2372,"slug":2373,"type":16},"API Development","api-development",{"name":2375,"slug":2376,"type":16},"Payments","payments",{"name":18,"slug":19,"type":16},"2026-07-12T08:07:31.843242",{"slug":2380,"name":2380,"fn":2381,"description":2382,"org":2383,"tags":2384,"stars":1130,"repoUrl":2277,"updatedAt":2393},"ts-sdk-account","manage Aptos accounts with TS SDK","How to create and use Account (signer) in @aptos-labs\u002Fts-sdk. Covers Account.generate(), fromPrivateKey(), fromDerivationPath(), Ed25519 vs SingleKey vs MultiKey vs Keyless, serialization (fromHex\u002FtoHex). Triggers on: 'Account.generate', 'Account.fromPrivateKey', 'Ed25519PrivateKey', 'SDK account', 'mnemonic', 'SingleKeyAccount', 'KeylessAccount'.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2385,2388,2389,2392],{"name":2386,"slug":2387,"type":16},"Auth","auth",{"name":14,"slug":15,"type":16},{"name":2390,"slug":2391,"type":16},"SDK","sdk",{"name":2289,"slug":2290,"type":16},"2026-07-12T08:07:29.297415",{"slug":2395,"name":2395,"fn":2396,"description":2397,"org":2398,"tags":2399,"stars":1130,"repoUrl":2277,"updatedAt":2403},"ts-sdk-address","manage AccountAddress in Aptos TypeScript SDK","How to create and use AccountAddress in @aptos-labs\u002Fts-sdk. Covers address format (AIP-40), from\u002FfromString\u002FfromStrict, special addresses, LONG vs SHORT form, and derived addresses (object, resource, token, user-derived). Triggers on: 'AccountAddress', 'AccountAddress.from', 'AIP-40', 'derived address', 'createObjectAddress', 'createResourceAddress', 'createTokenAddress'.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2400,2401,2402],{"name":14,"slug":15,"type":16},{"name":2390,"slug":2391,"type":16},{"name":2289,"slug":2290,"type":16},"2026-07-12T08:07:26.430378",{"slug":2405,"name":2405,"fn":2406,"description":2407,"org":2408,"tags":2409,"stars":1130,"repoUrl":2277,"updatedAt":2413},"ts-sdk-client","configure Aptos SDK clients","How to create and configure the Aptos client (Aptos, AptosConfig) in @aptos-labs\u002Fts-sdk. Covers Network, fullnode\u002Findexer\u002Ffaucet URLs, singleton pattern, and Bun compatibility. Triggers on: 'Aptos client', 'AptosConfig', 'SDK client', 'client setup', 'new Aptos(', 'Network.TESTNET', 'Network.MAINNET'.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2410,2411,2412],{"name":2372,"slug":2373,"type":16},{"name":2390,"slug":2391,"type":16},{"name":2289,"slug":2290,"type":16},"2026-07-12T08:07:21.933342",{"slug":2415,"name":2415,"fn":2416,"description":2417,"org":2418,"tags":2419,"stars":1130,"repoUrl":2277,"updatedAt":2423},"ts-sdk-transactions","manage Aptos blockchain transactions","How to build, sign, submit, and simulate transactions in @aptos-labs\u002Fts-sdk. Covers build.simple(), signAndSubmitTransaction(), waitForTransaction(), simulate, sponsored (fee payer), and multi-agent. Triggers on: 'build.simple', 'signAndSubmitTransaction', 'transaction.build', 'waitForTransaction', 'signAsFeePayer', 'SDK transaction', 'sponsored transaction', 'multi-agent transaction'.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2420,2421,2422],{"name":2372,"slug":2373,"type":16},{"name":2289,"slug":2290,"type":16},{"name":18,"slug":19,"type":16},"2026-07-12T08:07:23.774257",24]