Abstract

AbstractGo 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 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.

Full Text
Paper version not known

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call