# gipsyh/ric3 architecture

> Architecture diagram of the GitHub repository gipsyh/ric3, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/gipsyh/ric3
- Repository: https://github.com/gipsyh/ric3

## Overview

rIC3 is a hardware model checker. Users either check AIGER/BTOR models directly or configure an RTL project, build it through Yosys, and run verification; the checker returns property results and can expose traces or certificates. The runtime includes bit-level IC3 and SAT solving, word-level engines, multi-property and portfolio strategies, plus CIll invariant generation. The README documents these capabilities, but several CLI and engine internals were not sampled, so the graph omits uncertain implementation links rather than inferring them.

Main entry points: [`src/transys/mod.rs`](https://github.com/gipsyh/ric3/blob/master/src/transys/mod.rs) (Transition system), [`src/ic3/mod.rs`](https://github.com/gipsyh/ric3/blob/master/src/ic3/mod.rs) (IC3 engine), [`src/portfolio/mod.rs`](https://github.com/gipsyh/ric3/blob/master/src/portfolio/mod.rs) (Portfolio checking), [`src/wltransys/mod.rs`](https://github.com/gipsyh/ric3/blob/master/src/wltransys/mod.rs) (Word-level model)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["User entry"]
  node_cli["CLI commands<br/>[mod.rs]"]
  node_project["Project config<br/>[rproj.rs]"]
  node_rtl["RTL synthesis<br/>[yosys.rs]"]
end

subgraph group_models["Model handling"]
  node_aig["AIG frontend<br/>[mod.rs]"]
  node_btor["BTOR frontend<br/>[mod.rs]"]
  node_transition["Transition system<br/>[mod.rs]"]
  node_wordmodel["Word-level model<br/>[mod.rs]"]
  node_bitblast["Bit blasting<br/>[bitblast.rs]"]
end

subgraph group_engines["Verification engines"]
  node_ic3["IC3 engine<br/>[mod.rs]"]
  node_sat["SAT solver<br/>[mod.rs]"]
  node_bmc["Bounded checking<br/>[bmc.rs]"]
  node_wordengines["Word-level engines<br/>[wlbmc.rs]"]
  node_portfolio["Portfolio checking<br/>[mod.rs]"]
  node_multiprop["Multi-property checking<br/>[mod.rs]"]
  node_polynexus["Parallel properties<br/>[mod.rs]"]
  node_cegar["CEGAR refinement<br/>[mod.rs]"]
end

subgraph group_support["Results and assistance"]
  node_cill["CIll invariant flow<br/>[mod.rs]"]
  node_trace["Trace inspection<br/>[trace.rs]"]
  node_vcd["VCD tools<br/>[vcd.rs]"]
  node_tracer["Trace and certificates<br/>[tracer.rs]"]
end

node_user(("Engineer"))

node_user -->|"runs"| node_cli
node_cli -->|"project flow"| node_project
node_project -->|"configures synthesis"| node_rtl
node_user -->|"checks model"| node_aig
node_user -->|"checks model"| node_btor
node_aig -->|"builds system"| node_transition
node_btor -->|"builds system"| node_transition
node_wordmodel -->|"bit-blasts"| node_bitblast
node_bitblast -->|"produces system"| node_transition
node_transition -.->|"checked by"| node_ic3
node_ic3 -->|"solves clauses"| node_sat
node_transition -->|"checked in parallel"| node_portfolio
node_portfolio -->|"spawns engines"| node_ic3
node_transition -->|"checks properties"| node_multiprop
node_multiprop -->|"runs per property"| node_ic3
node_transition -.->|"checks properties"| node_polynexus
node_wordmodel -->|"refines abstraction"| node_cegar
node_cegar -->|"checks abstraction"| node_ic3
node_user -->|"checks word-level"| node_wordengines
node_user -->|"generates invariants"| node_cill
node_user -->|"inspects traces"| node_trace
node_user -->|"uses VCD tools"| node_vcd
node_ic3 -->|"emits traces"| node_tracer
node_portfolio -->|"forwards certificates"| node_tracer

click node_cli "https://github.com/gipsyh/ric3/blob/master/src/cli/mod.rs"
click node_project "https://github.com/gipsyh/ric3/blob/master/src/cli/rproj.rs"
click node_rtl "https://github.com/gipsyh/ric3/blob/master/src/cli/yosys.rs"
click node_aig "https://github.com/gipsyh/ric3/blob/master/src/frontend/aig/mod.rs"
click node_btor "https://github.com/gipsyh/ric3/blob/master/src/frontend/btor/mod.rs"
click node_transition "https://github.com/gipsyh/ric3/blob/master/src/transys/mod.rs"
click node_wordmodel "https://github.com/gipsyh/ric3/blob/master/src/wltransys/mod.rs"
click node_bitblast "https://github.com/gipsyh/ric3/blob/master/src/wltransys/bitblast.rs"
click node_ic3 "https://github.com/gipsyh/ric3/blob/master/src/ic3/mod.rs"
click node_sat "https://github.com/gipsyh/ric3/blob/master/src/gipsat/mod.rs"
click node_bmc "https://github.com/gipsyh/ric3/blob/master/src/bmc.rs"
click node_wordengines "https://github.com/gipsyh/ric3/blob/master/src/wlbmc.rs"
click node_portfolio "https://github.com/gipsyh/ric3/blob/master/src/portfolio/mod.rs"
click node_multiprop "https://github.com/gipsyh/ric3/blob/master/src/mp/mod.rs"
click node_polynexus "https://github.com/gipsyh/ric3/blob/master/src/polynexus/mod.rs"
click node_cegar "https://github.com/gipsyh/ric3/blob/master/src/cegar/mod.rs"
click node_cill "https://github.com/gipsyh/ric3/blob/master/src/cli/cill/mod.rs"
click node_trace "https://github.com/gipsyh/ric3/blob/master/src/cli/trace.rs"
click node_vcd "https://github.com/gipsyh/ric3/blob/master/src/cli/vcd.rs"
click node_tracer "https://github.com/gipsyh/ric3/blob/master/src/tracer.rs"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_cli,node_project,node_rtl toneBlue
class node_aig,node_btor,node_transition,node_wordmodel,node_bitblast toneAmber
class node_ic3,node_sat,node_bmc,node_wordengines,node_portfolio,node_multiprop,node_polynexus,node_cegar toneMint
class node_cill,node_trace,node_vcd,node_tracer toneRose
class node_user toneIndigo
```

## Components

### User entry

- [CLI commands](https://github.com/gipsyh/ric3/blob/master/src/cli/mod.rs): `src/cli/mod.rs`
- [Project config](https://github.com/gipsyh/ric3/blob/master/src/cli/rproj.rs): `src/cli/rproj.rs`
- [RTL synthesis](https://github.com/gipsyh/ric3/blob/master/src/cli/yosys.rs): `src/cli/yosys.rs`

### Model handling

- [AIG frontend](https://github.com/gipsyh/ric3/blob/master/src/frontend/aig/mod.rs): `src/frontend/aig/mod.rs`
- [BTOR frontend](https://github.com/gipsyh/ric3/blob/master/src/frontend/btor/mod.rs): `src/frontend/btor/mod.rs`
- [Transition system](https://github.com/gipsyh/ric3/blob/master/src/transys/mod.rs): `src/transys/mod.rs`
- [Word-level model](https://github.com/gipsyh/ric3/blob/master/src/wltransys/mod.rs): `src/wltransys/mod.rs`
- [Bit blasting](https://github.com/gipsyh/ric3/blob/master/src/wltransys/bitblast.rs): `src/wltransys/bitblast.rs`

### Verification engines

- [IC3 engine](https://github.com/gipsyh/ric3/blob/master/src/ic3/mod.rs): `src/ic3/mod.rs`
- [SAT solver](https://github.com/gipsyh/ric3/blob/master/src/gipsat/mod.rs): `src/gipsat/mod.rs`
- [Bounded checking](https://github.com/gipsyh/ric3/blob/master/src/bmc.rs): `src/bmc.rs`
- [Word-level engines](https://github.com/gipsyh/ric3/blob/master/src/wlbmc.rs): `src/wlbmc.rs`
- [Portfolio checking](https://github.com/gipsyh/ric3/blob/master/src/portfolio/mod.rs): `src/portfolio/mod.rs`
- [Multi-property checking](https://github.com/gipsyh/ric3/blob/master/src/mp/mod.rs): `src/mp/mod.rs`
- [Parallel properties](https://github.com/gipsyh/ric3/blob/master/src/polynexus/mod.rs): `src/polynexus/mod.rs`
- [CEGAR refinement](https://github.com/gipsyh/ric3/blob/master/src/cegar/mod.rs): `src/cegar/mod.rs`

### Results and assistance

- [CIll invariant flow](https://github.com/gipsyh/ric3/blob/master/src/cli/cill/mod.rs): `src/cli/cill/mod.rs`
- [Trace inspection](https://github.com/gipsyh/ric3/blob/master/src/cli/trace.rs): `src/cli/trace.rs`
- [VCD tools](https://github.com/gipsyh/ric3/blob/master/src/cli/vcd.rs): `src/cli/vcd.rs`
- [Trace and certificates](https://github.com/gipsyh/ric3/blob/master/src/tracer.rs): `src/tracer.rs`

### Other components

- **Engineer**

## Connections

- Engineer → CLI commands: runs
- CLI commands → Project config: project flow (evidence: `src/cli/mod.rs`)
- Project config → RTL synthesis: configures synthesis (evidence: `src/cli/run/mod.rs`)
- Engineer → AIG frontend: checks model
- Engineer → BTOR frontend: checks model
- AIG frontend → Transition system: builds system
- BTOR frontend → Transition system: builds system
- Word-level model → Bit blasting: bit-blasts (evidence: `src/wltransys/mod.rs`)
- Bit blasting → Transition system: produces system
- Transition system → IC3 engine: checked by
- IC3 engine → SAT solver: solves clauses (evidence: `src/ic3/mod.rs`)
- Transition system → Portfolio checking: checked in parallel (evidence: `src/portfolio/mod.rs`)
- Portfolio checking → IC3 engine: spawns engines (evidence: `src/portfolio/mod.rs`)
- Transition system → Multi-property checking: checks properties (evidence: `src/mp/mod.rs`)
- Multi-property checking → IC3 engine: runs per property (evidence: `src/mp/mod.rs`)
- Transition system → Parallel properties: checks properties
- Word-level model → CEGAR refinement: refines abstraction (evidence: `src/cegar/mod.rs`)
- CEGAR refinement → IC3 engine: checks abstraction (evidence: `src/cegar/mod.rs`)
- Engineer → Word-level engines: checks word-level
- Engineer → CIll invariant flow: generates invariants
- Engineer → Trace inspection: inspects traces
- Engineer → VCD tools: uses VCD tools
- IC3 engine → Trace and certificates: emits traces (evidence: `src/ic3/mod.rs`)
- Portfolio checking → Trace and certificates: forwards certificates (evidence: `src/portfolio/mod.rs`)
