Formally Verifying WebAssembly with KWasm Towards an Automated Prover for Wasm Smart Contracts
dc.contributor.author | Hjort, Rikard | |
dc.contributor.department | Chalmers tekniska högskola / Institutionen för data och informationsteknik | sv |
dc.contributor.examiner | Ahrendt, Wolfgang | |
dc.contributor.supervisor | Sewell, Thomas | |
dc.date.accessioned | 2020-04-15T13:54:43Z | |
dc.date.available | 2020-04-15T13:54:43Z | |
dc.date.issued | 2020 | sv |
dc.date.submitted | 2019 | |
dc.description.abstract | A smart contract is immutable, public bytecode which handles valuable assets. This makes it a prime target for formal methods. WebAssembly (Wasm) is emerging as bytecode format for smart contracts. KWasm is a prototype mechanization of Wasm in the K framework which can be used for formal verification. The current project aims to verify a single Wasm smart contract, a simple token contract. First, we complete the KWasm semantics to be able to deal with modules and test the semantics against the official conformance tests. This reveals several shortcomings of the conformance tests. Second, we create an Ethereum embedding by creating a separate Ethereum client semantics and combining it with the KWasm semantics through a thin, synchronizing interface. This embedding is then unit tested, including conformance tests for two variants of the WRC20 contracts. Thirdly, we use the KWasm semantics to prove properties of incrementally more complex Wasm programs, with an emphasis on heap reasoning, culminating in the verification of a helper function that reverses the bytes of a 64-bit integer. In the process we add 25 axioms that get upstreamed into K, and several more that are useful for general Wasm verification. | sv |
dc.identifier.uri | https://hdl.handle.net/20.500.12380/300761 | |
dc.language.iso | eng | sv |
dc.setspec.uppsok | Technology | |
dc.subject | K | sv |
dc.subject | K framework | sv |
dc.subject | WebAssembly | sv |
dc.subject | Wasm | sv |
dc.subject | Ethereum | sv |
dc.subject | Ewasm | sv |
dc.subject | formal methods | sv |
dc.subject | formal verification | sv |
dc.subject | semantics | sv |
dc.subject | specification | sv |
dc.title | Formally Verifying WebAssembly with KWasm Towards an Automated Prover for Wasm Smart Contracts | sv |
dc.type.degree | Examensarbete för masterexamen | sv |
dc.type.uppsok | H | |
local.programme | Computer systems and networks (MPCSN), MSc |