Skip to content

Formal specification verification framework: Automated TLA+/Dafny analysis with syntax, semantic, consistency, requirements, and feasibility validation

License

Notifications You must be signed in to change notification settings

itdoadmin/RigorFlow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Formal Specification Verification Framework

BDD要求から形式的仕様検証まで統合的品質保証フレームワーク

CI Status License: MIT Python 3.11+

🎯 概要

本フレームワークは、BDD要求仕様から形式的仕様(TLA+/Dafny)の正しさを5層構造で体系的に検証する統合的品質保証システムです。

主要特徴

  • 5層検証モデル: 構文→意味→整合性→要求適合性→実装可能性
  • 完全トレーサビリティ: 要求からコードまでの完全な追跡可能性
  • 自動化パイプライン: CI/CDに統合可能な自動検証
  • 複数仕様対応: TLA+(分散システム)+ Dafny(暗号・計算)
  • 実践的事例: 本格的なZK-Janken実装例を含む

適用領域

  • 分散システム設計
  • 暗号学的プロトコル
  • 安全重要システム
  • 高信頼性ソフトウェア

🚀 クイックスタート

環境構築

# リポジトリクローン
git clone https://github.com/itdoadmin/RigorFlow.git
cd RigorFlow

# 環境セットアップ(TLA+/Dafnyも自動インストール)
./scripts/setup.sh

# フレームワークインストール
pip install -e .

基本使用方法

# プロジェクト初期化
fsvf init my-project --template distributed-system

# 仕様検証実行
fsvf verify my-project/ --layers all --format html

# 継続監視モード
fsvf watch my-project/ --auto-report

📋 5層検証モデル

Layer 検証内容 主要ツール 検証時間目安
Layer 1 構文的正しさ TLA+ parser, Dafny compiler 1-5分
Layer 2 意味的正しさ TLC model checker, Dafny verifier 5-30分
Layer 3 仕様間整合性 独自解析エンジン 2-10分
Layer 4 要求適合性 トレーサビリティ分析 1-5分
Layer 5 実装可能性 アーキテクチャ分析 3-15分

💡 使用例:ZK-Janken

完全な実装例として、ゼロ知識証明を使った公平なじゃんけんゲームの仕様検証を提供:

cd examples/zk-janken
fsvf verify . --detailed-report

# 検証結果: 9.1/10 (本格運用可能)
# - セキュリティ要求カバレッジ: 100%
# - 性能制約適合性: 95%
# - 実装可能性: 90%

アーキテクチャ概要

  • TLA+ 仕様: 分散セッション管理、並行性制御、タイムアウト処理
  • Dafny 仕様: 暗号学的証明、コミットメント方式、ゲームロジック
  • 実装統合: Elixir(分散制御)+ Rust(暗号計算)+ WebAssembly

🔧 CLI コマンドリファレンス

プロジェクト管理

fsvf init <project-name>              # 新規プロジェクト作成
fsvf template list                    # テンプレート一覧
fsvf config show                      # 設定表示

検証実行

fsvf verify <path> [options]          # 仕様検証実行
  --layers <1,2,3,4,5>               # 検証層指定
  --format <html|json|md>            # 出力形式
  --timeout <seconds>                # タイムアウト設定
  --parallel                         # 並列実行

継続的検証

fsvf watch <path> [options]           # ファイル変更監視
  --auto-report                      # 自動レポート生成
  --notify <webhook-url>             # 通知設定

レポート・分析

fsvf report generate <path>           # 詳細レポート生成
fsvf metrics show <path>              # メトリクス表示
fsvf coverage analyze <path>          # カバレッジ分析

📄 ライセンス

MIT License - 詳細は LICENSE を参照。

🙏 謝辞

  • TLA+ - Leslie Lamport
  • Dafny - Microsoft Research
  • コミュニティコントリビューター各位

Author: ITDO Inc. | Organization: 株式会社アイティードゥ
Contact: engineering@itdo.jp | Website: https://itdo.jp

About

Formal specification verification framework: Automated TLA+/Dafny analysis with syntax, semantic, consistency, requirements, and feasibility validation

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages