Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Solidity Backend Overview

The Solidity backend is built on top of solar-compiler (parser) and a set of analysis passes in ilold-core. It supports both a one-shot CLI (analyze, context) and the interactive REPL (explore, serve).

What it parses

crates/ilold-cli/src/main.rs::collect_sol_files walks the input path:

  • A single .sol file is loaded as-is.
  • A directory is walked recursively; the directories out, cache, node_modules, lib, target, .git, .svelte-kit and any dot-prefixed directory are skipped.

Once the project is parsed, ilold builds a per-function CFG via CfgBuilder::build_with_project and a path tree via build_path_tree (see crates/ilold-core/src/cfg/builder.rs and pathtree/walker.rs). Inheritance is resolved transitively, so inherited functions and state variables show up in funcs-all / vars-all and in info output.

What you can do with it

SurfacePurpose
analyzeOne-shot pretty-print of every contract: functions, CFG and path-tree stats, sequences up to --max-seq-depth, optional verbose function behavior breakdown
contextGenerate machine-readable narratives for a function or a comma-separated sequence
serveStart the HTTP/WS server only, no REPL: feed the web canvas
exploreInteractive REPL, with the HTTP/WS API running alongside

REPL command groups

The REPL has six command groups, all documented in their own pages:

  • Session: c/call, b/back, cl/clear, s/state, seq/sequence, st/step, ss/session.
  • Analysis: w/who, i/info, tr/trace, tl/timeline, sl/slice.
  • Contract: f/functions, fa/funcs-all, v/vars, va/vars-all, ct/contracts, use.
  • Findings: fi/finding, n/note, status, fl/findings, ex/export.
  • Scenarios: sc/scenario (new, list, switch, fork, delete).
  • Workspace: save, load, browser, q/quit/exit, ?/help.

Workflows

Two end-to-end walkthroughs are included: