[論文レビュー] Compositional Symbolic Execution for Correctness and Incorrectness Reasoning
本稿では、『消費』および『生成』操作の健全な公理的インターフェースを通じて、正しさと誤りの両方の推論を統合する、形式的根拠に基づいた構成的記号実行(CSE)エンジンを提示する。ギリアンにインspiredされ、分離論理を用いて過剰近似(正しさ)と不足近似(誤り)の両方の推論をサポートするが、充足可能性または妥当性に基づく統一された意味論を有する。本手法は、ギリアン-Cを拡張して真のバグ検出をネイティブにサポートする形で評価されている。
The introduction of separation logic has led to the development of symbolic execution techniques and tools that are (functionally) compositional with function specifications that can be used in broader calling contexts. Many of the compositional symbolic execution tools developed in academia and industry have been grounded on a formal foundation, but either the function specifications are not validated with respect to the underlying separation logic of the theory, or there is a large gulf between the theory and the implementation of the tool. We introduce a formal compositional symbolic execution engine which creates and uses function specifications from an underlying separation logic and provides a sound theoretical foundation for, and indeed was partially inspired by, the Gillian symbolic execution platform. This is achieved by providing an axiomatic interface which describes the properties of the consume and produce operations used in the engine to update compositionally the symbolic state, for example when calling function specifications. This consume-produce technique is used by VeriFast, Viper, and Gillian, but has not been previously characterised independently of the tool. As part of our result, we give consume and produce operations inspired by the Gillian implementation that satisfy the properties described by our axiomatic interface. A surprising property is that our engine semantics provides a common foundation for both correctness and incorrectness reasoning, with the difference in the underlying engine only amounting to the choice to use satisfiability or validity. We use this property to extend the Gillian platform, which previously only supported correctness reasoning, with incorrectness reasoning and automatic true bug-finding using incorrectness bi-abduction. We evaluate our new Gillian platform by using the Gillian instantiation to C. This instantiation is the first tool grounded on a common formal compositional symbolic execution engine to support both correctness and incorrectness reasoning.
研究の動機と目的
- 構成的記号実行のための健全な理論的基盤を提供することで、形式的分離論理と実用的記号実行ツールの間のギャップを埋めること。
- 充足可能性または妥当性の使用に差をおくだけで、同一の形式的意味論の下で正しさと誤りの両方の推論を統一すること。
- 関数仕様を形式的分離論理に根拠を置くことで、ツール間での仕様相互運用性を可能にすること。
- ギリアンプラットフォームに誤りの推論と自動的真のバグ検出をbi-abductionを用いて追加すること。
- ギリアン-Cを用いてC言語にCSEエンジンを形式的にインスタンス化することで、本手法を評価し、正しさと誤りの両方の推論をサポートすることを示すこと。
提案手法
- 関数仕様を更新するための『消費』および『生成』操作を用いて、記号的状態を更新する構成的記号的操作的意味論を定義する。
- 特定のツールに依存しない『消費』および『生成』操作が満たすべき性質を規定する公理的インターフェースを導入する。
- 一般の健全性結果を証明する:公理的性質が満たされ、関数仕様が分離論理で妥当であれば、CSEエンジンは健全である。
- ギリアンにインspiredされた操作を用いて公理的インターフェースをインスタンス化し、それらが必要な性質を満たすことを証明する。
- 下位の論理において妥当性から充足可能性に切り替えることで、ギリアンプラットフォームを誤りの推論をサポートするように拡張する。
- ギリアン-C上で本手法を実装および評価し、Cコードの正しいおよび誤った関数仕様を生成するためにbi-abductionを用いる。
実験結果
リサーチクエスチョン
- RQ1正しさと誤りの両方の推論を統一された意味論的基盤でサポートする形式的構成的記号実行エンジンを設計できるか?
- RQ2過剰近似および不足近似の両方の推論において健全性を保証するため、『消費』および『生成』操作が満たすべき公理的性質は何か?
- RQ3関数仕様を形式的分離論理に根拠を置きつつ、ツール間で相互運用可能にするにはどうすればよいか?
- RQ4ギリアンプラットフォームに誤りの推論と自動的真のバグ検出を追加しても、健全性を損なわずに行えるか?
- RQ5C言語へのCSEエンジンのインスタンス化(ギリアン-C経由)は、現実世界のプログラム解析における実用的妥当性をどの程度示しているか?
主な発見
- CSEエンジンは、正しさの推論では妥当性、誤りの推論では充足可能性を用いることで、正しさと誤りの両方の推論に対する統一された意味論的基盤を提供する。
- 『消費』および『生成』操作のための公理的インターフェースは形式的に特徴付けられ、ギリアンにインspiredされた操作でインスタンス化され、必要な性質を満たすことが証明された。
- エンジンは仕様の相互運用性を可能にし、異なるソースからの関数仕様を、ツール間で健全に使用できるようにする。
- 評価の結果、拡張されたギリアン-Cは、1つのC関数に対して9つの異なる仕様を生成した。そのうち4つは正しい、5つは誤ったケースであり、両方の推論モードをサポートしていることが示された。
- 現在のギリアン-Cの実装は、エンコーディングの制限により仕様の爆発的増加を示しているが、これは理論的枠組みの欠陥ではなく、実装上の制限である。
- 本手法は、誤りのbi-abductionを用いた自動的真のバグ検出を成功裏に実現した。特に、セグメンテーションフォールトを引き起こすNULLポインタ参照が検出された重要な例が存在する。
この論文を読む
Nubintのビューアで原文を開き、読みながら気になる箇所をすぐに質問できます。
Nubintでこの論文を読むこのレビューはAIが論文の原文をもとに作成しました。引用する前に原文をご確認ください。