Demonstrate the moonbit_static_analysis three-inspection pipeline (structural / type / behavior) over embedded MoonBit-subset samples and a sample state-machine audit with the published CLI. Use to showcase or smoke-check the analyzer's findings format (line:col findings with family, lens tags, and virtual stacks). This entry takes no input. To ANALYSE a real project use the scanner skill (moonx riantr/moonbit_static_analysis@latest <target>), or import the module and call @pipeline.run / @moonfiles.* / @statecheck.audit.
moonx riantr/moonbit_static_analysis/src/climoon run src/cli2:10 - error: undefined variable 'missing' (UndefinedName) [structural+type+behavior]
in main() at undefined.mbt:4
in g at undefined.mbt:1
Summary: 1 finding(s) (before merge: structural 1, type 2, behavior 1)182:12 - warning: state '失忆' is never entered: it appears only as a transition source (UnusedLocal) [structural]
Machine '主体' summary: 4 finding(s)moonx riantr/moonbit_static_analysis@latest riantr/moonbit_doubleML@latest// program revision: source is a String in the MoonBit subset
let result : @pipeline.PipelineResult = @pipeline.run(source, "main.mbt")
println(@pipeline.render_result(result))
// the other file kinds have their own frontends (src/moonfiles)
let doc = @moonfiles.literate(md_text, "README.mbt.md") // .mbt.md, real line numbers
// 3rd arg = the module-wide interface table (every .mbti of the scanned target);
// empty means "nothing beyond this file is resolvable"
let iface = @moonfiles.iface(mbti_text, "pkg.mbti", @core.IfaceSymTab::empty()) // interface audit
let proof = @moonfiles.proof(mbtp_text, "core.mbtp") // proof lint
println(@moonfiles.render_reports(iface))
// machine-table audit: plain data, any state machine
let spec : @statecheck.MachineSpec = {
name: "主体",
states: ["站立", "宁静"],
initial: "站立",
terminal: "宁静",
transitions: [("站立", "抵达", "宁静")],
trigger_slots: [("抵达", "处境")],
slot_names: ["处境"],
blocks: [],
course: ["站立", "宁静"],
}
println(@statecheck.render(spec))The moon runwasm … command shown on this skill's page is deprecated (the toolchain says removal after 2026-09-14) but still works. Prefer moonx, which is the recommended invocation above.The "Download wasm" button on this skill's page is usable. It serves the same prebuilt artifact moonx downloads and caches — nothing to compile. (If a tool reports that URL as 404, that check used an HTTP HEAD; download.mooncakes.io answers 404 to HEAD even for artifacts that exist. Re-check with GET.)