Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 32 additions & 28 deletions lydite/README.md
Original file line number Diff line number Diff line change
@@ -1,41 +1,45 @@
# lydite

Rustで実装したハードウェア状態対応チェッカー。仕様と実装のreset・遷移・bindingを検査し、commit時の仕様ステップと、それ以外のstutterを対応づけます。入力は `.lyd` または宣言的JSONです。
A hardware refinement checker written in Rust. It checks the reset, transitions and
bindings of an implementation against a specification, matching each implementation
commit to one specification step and everything else to a stutter. Input is `.lyd`
or declarative JSON.

## はじめに
## Getting started

リポジトリの Rust ツールチェーン(`rust-toolchain.toml`)と Python 3.12 を使用します。既定のsolver経路にはZ3が必要です。有限Bool/BV経路は `LYDITE_SOLVER=finite` で選択し、外部solverへfallbackしません。
Use the repository Rust toolchain (`rust-toolchain.toml`) and Python 3.12. The default
solver route needs Z3; `LYDITE_SOLVER=finite` selects the finite Bool/BV route, which
never falls back to an external solver.

```sh
cargo build --release --locked
# 構文・名前・型だけを検査(証明ではありません)
# Check syntax, names and types only (not a proof)
../target/release/lydite audit/lemma_candidates/counter.lyd --check --out /tmp/lydite-check
# 小さな例を検証。出力先には新しいディレクトリを指定してください
# Verify a small example; --out must be a new directory
LYDITE_SOLVER=finite ../target/release/lydite audit/lemma_candidates/counter.lyd --out /tmp/lydite-counter
```

## ドキュメント
## Documentation

| 目的 | 参照先 |
| Topic | See |
|---|---|
| VS Codeで編集・補題の明示的な検査 | [Editor / LSP](docs/usage.md#editor-and-language-server) |
| 実行方法、終了コード、開発・CIチェック | [使い方](docs/usage.md) |
| `.lyd` の記法とJSONへの対応 | [言語](docs/language.md)、[JSON v2](docs/schema.md) |
| 関係仕様と再利用可能なモジュール | [v3仕様](docs/specifications.md)、[v4 scoped仕様](docs/scoped-specifications.md)、[expectationとtrace](docs/expectations.md) |
| 受理した要求の条件付き応答期限 | [v3/v4 bounded response](docs/specifications.md#conditional-bounded-response) |
| プログラムの不変条件・停止性 | [program契約](docs/program-contracts.md) |
| 補題を `.lyd` で書き、検査して使う | [補題](docs/lemmas.md) |
| 自動証明探索、分割、予算 | [証明エンジン](docs/automatic-proofs.md) |
| 何を証明し、何を信頼しているか | [信頼境界](docs/trust.md) |
| CPU例と現在のRV32I対象 | [小さなCPUモデル](docs/models.md)、[RV32I](docs/rv32i.md)、[メモリ合成](docs/memory-composition.md) |
| 再現テストと保存証跡 | [検査・証跡の入口](audit/README.md) |
| FPGA計測の再現と制限 | [合成・配置配線](https://github.com/tignear/hwverify/blob/ae8f84cca8859097ac2b0a7a4f6e311355c2b48d/synthesis/README.md) |

## 現在の検証範囲

- 選択した4段RV32I実装は、手動補題を含む経路で **436/436の保存条件と7個のglobal義務**、4/16/64語メモリとの合成を検査します。元の単一queryはUnknownのままです。
- 補題を与えない自動経路は **431/436**。5個のUnknownを含むため、全体の証明成功とは扱いません。
- Celox の再利用可能なVeryl テストスイート737件を証明付きで実行し、**713件通過+24件の記録済み例外**(Veryl の言語制約6件、証明バックエンド未対応のテストベンチ12件、Celox 自身も ignore している既知の失敗5件、Celox が Unsupported として拒否する構文1件)を CI の coverage contract としています。全737件成功という意味ではありません。
- `.lyd` の補題も自動探索も同じ型付き候補APIを使います。候補や保存済みレポートは証明ではなく、現在のqueryに対する新しい検査が必要です。

実際のcheckoutの合否は[CI](../.github/workflows/lydite.yml)と新しい実行結果で確認してください。過去の集計やハッシュは現在の証明を代替しません。Rustの変換・義務生成・カーネル・選択したsolverを信頼しており、処理系全体の形式的な正しさは証明していません。
| Running, exit codes, development and CI checks | [Usage](docs/usage.md), [Editor / LSP](docs/usage.md#editor-and-language-server) |
| `.lyd` syntax and its JSON mapping | [Language](docs/language.md), [JSON v2](docs/schema.md) |
| Relational and scoped specifications | [v3](docs/specifications.md), [v4 scoped](docs/scoped-specifications.md), [Expectations and traces](docs/expectations.md) |
| Program invariants and termination | [Program contracts](docs/program-contracts.md) |
| Lemmas and automatic proof search | [Lemmas](docs/lemmas.md), [Proof engine](docs/automatic-proofs.md) |
| What is proved and what is trusted | [Trust boundary](docs/trust.md) |
| CPU models | [Small CPU models](docs/models.md), [RV32I](docs/rv32i.md), [Memory composition](docs/memory-composition.md) |
| Reproduction tests and archived evidence | [Audit index](audit/README.md) |

## Current scope

- The selected 4-stage RV32I implementation passes all 436 preservation conditions
and 7 global obligations with hand-written lemmas, including composition with
4/16/64-word memories. Without lemmas, automatic search reaches 431/436.
- The reusable Celox Veryl test suite (745 cases) runs proof-backed in CI: 721 pass and
24 are recorded exceptions (see `conformance/veryl-proof/case-exceptions.json`).

The Rust translation, obligation generation, kernel and selected solver are trusted;
see the [trust boundary](docs/trust.md). Current results come from
[CI](../.github/workflows/lydite.yml), not archived reports.
2 changes: 1 addition & 1 deletion lydite/audit/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ contribute to closure, along with successful guarded use and source diagnostics.
| Concrete CPU oracle and counterexample replay | `cpu_simulation.py`, `replay_counterexamples.py`, `interpreter.py`; `cpu_simulation_results.json`, `counterexample_replay_results.json` |
| Structural/finite solver campaigns | `structural_solver`, `structural_independent`, `finite_solver_independent`, `finite_speed_independent`, `branch_solver_scaling*`, `branch_solver_decomposition*`, `expected_result_search*`; corresponding JSON/log/query trees under `results/` |
| Physical implementation | [Synthesis reproduction](https://github.com/tignear/hwverify/blob/ae8f84cca8859097ac2b0a7a4f6e311355c2b48d/synthesis/README.md), [emitted-SV differential/mutation instructions](veryl_scaling/split_candidate_tests/README.md) |
| Small memory-law formalization | [Lean proof and Rust comparison](../proof/README-ja.md) |
| Small memory-law formalization | [Lean proof and Rust comparison](../proof/README.md) |

Independent integer interpretation and SAT replay supplement the checker; they do
not certify UNSAT. The old counterexample-first policy under `counterexample_search*`
Expand Down
22 changes: 0 additions & 22 deletions lydite/audit/automatic_proof/phase1-evidence/validation.json

This file was deleted.

204 changes: 0 additions & 204 deletions lydite/audit/automatic_proof/phase1-published-files.json

This file was deleted.

This file was deleted.

This file was deleted.

Loading
Loading