Papers1 provider · 1 record
November 7, 2022· 2022 IEEE 1st Global Emerging Technology Blockchain Forum: Blockchain & Beyond (iGETblockchain)
conference-paper

Verifying Correctness of Smart Contracts with Conditionals

Authors:Fahad AlhabardiBogdan LazarAnton Setzer

Abstract

In this paper, we specify and verify the correctness of programs written in Bitcoin’s smart contract SCRIPT in the interactive theorem prover Agda. As in the previous article [1], we use weakest preconditions of Hoare logic to specify the security property of access control, and show how to develop human-readable specifications. In this article, we include conditionals into the language. For the operational semantics we use an additional stack, the ifstack, to deal with nested conditionals. This avoids the addition of extra jump instructions, which are usually used for the operational semantics of conditionals in Forth-style stack languages. The ifstack preserves the original nesting of conditionals, and we determine an ifthenselse-theorem which allows to derive verification conditions of conditionals by referring to conditions for the if- and else-case.

Community

0 comments
Use Connect Wallet in the navigation

No discussion yet

Be the first to share a question or observation.