Go is an increasingly-popular systems programming language targeting, especially, concurrent and distributed systems. Go differentiates itself from other imperative languages by offering structural subtyping and lightweight concurrency through goroutines with message-passing communication. This combination of features poses interesting challenges for static verification, most prominently the combination of a mutable heap and advanced concurrency primitives. We present Gobra, a modular, deductive program verifier for Go that proves memory safety, crash safety, data-race freedom, and user-provided specifications. Gobra is based on separation logic and supports a large subset of Go. Its implementation translates an annotated Go program into the Viper intermediate verification language and uses an existing SMT-based verification backend to compute and discharge proof obligations.
翻译:Go 将自身与其他必备语言区分开来,通过信息传递通信的通路提供结构性亚型和轻量级通货。这种组合对静态核查提出了有趣的挑战,其中最突出的是变压型堆肥和先进的货币化原始元素的组合。我们介绍了Gobra, 一个模块化的、可扣除的Go程序验证器,它证明了记忆安全、崩溃安全、数据搜索自由和用户提供的规格。Gobra以分离逻辑为基础,支持了Go的一大部分内容。它的实施将附加说明的Go程序翻译成了Viper中间核查语言,并使用基于SMT的现有核查后端来计算和履行验证义务。