Qihe:一种通用的静态分析框架用于Verilog
Qihe: A General-Purpose Static Analysis Framework for Verilog
AI总结:
Qihe是首个针对Verilog的通用静态分析框架,通过多种基本分析支持Bug检测、安全性和程序理解,发现大量硬件漏洞。
摘要:
在过去的几十年里,静态分析在软件领域蓬勃发展,广泛应用于Bug检测、安全性和程序理解。这些高级分析大多依赖于通用的静态分析框架,这些框架提供了必要的基础设施,以简化其开发。相反,硬件领域缺乏这样的框架,这阻碍了在硬件中进行复杂静态分析的潜力,阻碍了软件所见证的成就。因此,我们介绍了Qihe,这是第一个针对Verilog的通用静态分析框架——鉴于硬件领域缺乏先例,这是一项极具挑战性的任务。Qihe具有面向分析的前端,一个特定于Verilog的中间表示(IR),以及一系列多样化的基本分析,这些分析捕捉了硬件特有的特性,例如位向量算术、寄存器同步和数字组件并发,并能够检查复杂的硬件数据和控制流。这些基本分析旨在支持各种硬件分析客户端。为了验证Qihe的实用性,我们进一步开发了一组涵盖Bug检测、安全性和程序理解的客户端。我们的初步实验结果非常有希望;例如,Qihe在流行的现实世界硬件项目中发现了9个之前未知的Bug(平均1.5K+ GitHub stars),这些Bug均被开发人员确认;此外,Qihe成功识别了现有静态分析在Verilog Bug检测(即linters)之外的18个Bug,并检测了16个现实世界硬件程序中的漏洞。通过开源包含超过100,000行代码的Qihe,我们旨在激发进一步的复杂静态分析在硬件中的创新和应用,希望培育一个同样充满活力的生态系统,如同软件分析所享有。
英文摘要:
In the past decades, static analysis has thrived in software, facilitating applications in bug detection, security, and program understanding. These advanced analyses are largely underpinned by general-purpose static analysis frameworks, which offer essential infrastructure to streamline their development. Conversely, hardware lacks such a framework, which overshadows the promising opportunities for sophisticated static analysis in hardware, hindering achievements akin to those witnessed in software. We thus introduce Qihe, the first general-purpose static analysis framework for Verilog -- a highly challenging endeavor given the absence of precedents in hardware. Qihe features an analysis-oriented front end, a Verilog-specific IR, and a suite of diverse fundamental analyses that capture essential hardware-specific characteristics -- such as bit-vector arithmetic, register synchronization, and digital component concurrency -- and enable the examination of intricate hardware data and control flows. These fundamental analyses are designed to support a wide array of hardware analysis clients. To validate Qihe's utility, we further developed a set of clients spanning bug detection, security, and program understanding. Our preliminary experimental results are highly promising; for example, Qihe uncovered 9 previously unknown bugs in popular real-world hardware projects (averaging 1.5K+ GitHub stars), all of which were confirmed by developers; moreover, Qihe successfully identified 18 bugs beyond the capabilities of existing static analyses for Verilog bug detection (i.e., linters), and detected 16 vulnerabilities in real-world hardware programs. By open-sourcing Qihe, which comprises over 100K lines of code, we aim to inspire further innovation and applications of sophisticated static analysis for hardware, aspiring to foster a similarly vibrant ecosystem that software analysis enjoys.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。