arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2306.14027cs.CRcs.AI
收藏

大语言模型的(安全)断言

(Security) Assertions by Large Language Models

Texas A&M University(德克萨斯A&M大学);University of New South Wales(新南威尔士大学);University of Calgary(卡尔加里大学);New York University(纽约大学)

Rahul Kande, Hammond Pearce, Benjamin Tan, Brendan Dolan-Gavitt, Shailja Thakur, Ramesh Karri, Jeyavijayan Rajendran

AI总结:

本研究针对硬件安全断言编写难度大的问题,探索用大语言模型基于自然语言提示生成SystemVerilog安全断言,构建评估框架与含真实硬件设计的基准套件,测试不同提示细节下模型的断言生成能力。

摘要:

计算机系统的安全性通常依赖于硬件信任根。由于硬件中的漏洞可能对系统造成严重影响,因此需要有技术来支持安全验证活动。基于断言的验证是一种流行的验证技术,它涉及在一组断言中捕获设计意图,这些断言可用于形式化验证或基于测试的检查。然而,编写以安全为核心的断言是一项具有挑战性的任务。在本研究中,我们探讨了将新兴的大语言模型(LLM)的代码生成能力用于硬件安全断言生成的场景,主要使用自然语言提示(例如人们在断言文件中作为代码注释看到的内容)来生成SystemVerilog断言。我们聚焦于一种主流LLM,表征了在提示细节程度不同的情况下,其开箱即用的断言编写能力。我们设计了一个可生成多种提示的评估框架,并创建了一个包含真实硬件设计及相应黄金参考断言的基准测试套件,这些黄金参考断言正是我们希望通过LLM生成的目标。

英文摘要:

The security of computer systems typically relies on a hardware root of trust. As vulnerabilities in hardware can have severe implications on a system, there is a need for techniques to support security verification activities. Assertion-based verification is a popular verification technique that involves capturing design intent in a set of assertions that can be used in formal verification or testing-based checking. However, writing security-centric assertions is a challenging task. In this work, we investigate the use of emerging large language models (LLMs) for code generation in hardware assertion generation for security, where primarily natural language prompts, such as those one would see as code comments in assertion files, are used to produce SystemVerilog assertions. We focus our attention on a popular LLM and characterize its ability to write assertions out of the box, given varying levels of detail in the prompt. We design an evaluation framework that generates a variety of prompts, and we create a benchmark suite comprising real-world hardware designs and corresponding golden reference assertions that we want to generate with the LLM.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑