K‐Go: An executable formal semantics of Go language in K framework

Can Zhao, Qin Liu, Zonghua Hu, Ze Yu,Dejun Wang,Bo Meng

IET Blockchain(2023)

引用 0|浏览5
暂无评分
摘要
Go is a relatively new programming language and has become one of the most important programming languages used widely in blockchain. A formal semantics plays an important role in program synthesis, analysis and verification. The existed formal semantics of Go are not executable and do not cover the core features, hence, this paper presents an executable formal semantics for Go, called K‐Go, using rewriting logic in K$\mathbb{K}$ framework to make sure the semantics is both executable and applicable. K‐Go includes syntax, configuration and rules and covers the declaration and definition of basic types, basic expression, concurrency, main statement data reading and writing based on channel. K‐Go is validated by test set with 100% semantic coverage based on the official test suite. The evaluation experiment shows that K‐Go is correct. Using formal semantics of Go language, building Go program synthesis, analysis and verification tools is easy for analyzing more characteristics of Go programs. Here, K‐Go, an executable formal semantics for Go1.18 in K framework is developed. The authors’ high‐level semantics is both executable, machine readable and extensible.
更多
查看译文
关键词
K framework,executable semantics,formal operational semantics,Go programming language,rewriting logic
AI 理解论文
溯源树
样例
生成溯源树,研究论文发展脉络
Chat Paper
正在生成论文摘要