SlideShare a Scribd company logo
Markus Völter
voelter@acm.org
www.voelter.de
@markusvoelter
Declarative
Smart
Contracts
Context
1
An actual
contract,
executed
automatically.
Any
Turing Complete
Program
running on
a Blockchain.
over time
SMART CONTRACT
An actual contract,
executed automatically.
Multiple Parties.
Decision | |
Agreement | |
Coordination.
(Legally) Binding &
Trusted.
Formal Language.
Checkable.
Understandable.
„Event Tracking“
Progress over time
Contract
Definition
Contract
Execution
Contract
Definition
Contract
Execution
Understand Behavior
Functional Correctness
Non-Repudiability
Verified Behavior
Non-Gameability
}BC
Blockchains
can provide certain
non-functional properties
to executable contracts.
Blockchains
are a suitable (partial)
implementation technology
iff these properties are needed.
Verification
Ensure that the program performs
correctly the things the program
text tells it to do.
Validation
Ensure that the program does
the correct things, wrt. to the
requirements.
Verification
Ensure that the program
performs correctly the things
the program text tells it to do.
Validation
Ensure that the program does
the correct things, wrt. to the
requirements.
Contract
Execution
Contract
Definition
Correct-by-Construction
The language/framework/
API/modeling tool doesn’t allow
a particular class of mistakes.
Analysis-and-Fix
You analyze the code/model after the
fact and try to find problems which
devs then fix.
Formal Language.
Checkable.
Understandable.
DSLDomain
Specific
Language
„
Well, people realize that
these contracts have to
run reliably, after all, the
programs deal with real
values now.
“
Some Blockchain Guy
Not the first community to realize ... J
Lots of History & Research
Computational Law
Obligation, Permission
Ordering, Causality, Time
Event, State
Lots of History & Research
Blockchains
Composing contracts: an adventure
in financial engineering
https://lexifi.com/files/resources/MLFiPaper.pdf
POETS Process-oriented event-driven
transaction systems
https://github.com/legalese/poets/blob/master/doc/
Henglein%20-%20POETS%20Process-oriented%20event-
driven%20transaction%20systems.pdf
https://github.com/legalese/poets/blob/master/
doc/hvitvedmaster.pdf
Domain-Specific Languages for
Enterprise Systems
https://bitbucket.org/jespera/poets/raw/c0ee7194ce57d2ad6ca8894c
8a44e88e546d5f4a/doc/poets-techreport/tr.pdf
Contracts in Programming and in
Enterprise Systems
Solution
2
Ethereum
VM/Network
Iulia
Hyperledger
Java
Executable Multi-Party Contract Language
DSL
Logistics
DSL
Finance
DSL
…
KernelF
MPS / Convecton
Distribution, Trust Correctness
Validation
Simulation
Collaboration
Expressiveness
SMTLIB
Z3
HTML
JavaScript
CSS
Interaction, Integration
An Architecture For Smart Contracts
Generate to verification tools to build more
confidence beyond type checking.
Deklarative Smart Contracts
Declarative Description
MultiPartyBooleanDecision
A declarative, configurable specification of
how a number of parties makes a (Boolean)
decision.
Execution and Test
A MPBD instance maintains the state of a
decision process as it evolves over time.
Here, we play with an instance in the
interactive REPL.
Combination with State Machines
More complex contracts are modeled as
state machines; events are the API.
Internally, the use BPBDs.
Combintation with State Machines II
Here, a transition action creates a new
AccessControl instance ...
The state of that instance is then used in
guard condition for the top level SM.
Preventing Game Theoretical Attacks
Only „valid“ senders can enter this state.
Events can only arrive at limited rate.
States must be entered turn-by-turn.
Ethereum
VM/Network
Iulia
Hyperledger
Java
Executable Multi-Party Contract Language
DSL
Logistics
DSL
Finance
DSL
…
KernelF
MPS / Convecton
Distribution, Trust Correctness
Validation
Simulation
Collaboration
Expressiveness
SMTLIB
Z3
HTML
JavaScript
CSS
Interaction, Integration
An Architecture For Smart Contracts
I D E A
Example: HyperCSL
Blockchains
Lisp (Clojure) based internal DSL for specifi-
cation of general commercial contracts.
Inspired by Simon Peyton Jones and Jean-Marc
Eber and the POETS group at CPHU and ITU in
Denmark.
Uses Ken Adams’
Categories of Contract
Language as fundametal semantic building
blocks. Interpreter and UI in prototype stage.
Example: HyperCSL
Blockchains
Example: HyperCSL
Blockchains
A UI to visualize the interactive
execution of CSL contracts.
Tooling
3
Ethereum
VM/Network
Iulia
Hyperledger
Java
Executable Multi-Party Contract Language
DSL
Logistics
DSL
Finance
DSL
…
KernelF
MPS / Convecton
Distribution, Trust Correctness
Validation
Simulation
Collaboration
Expressiveness
SMTLIB
Z3
HTML
JavaScript
CSS
Interaction, Integration
An Architecture For Smart Contracts
KernelF is an extensible functional
language used at the core of DSLs.
DSL Development
New Language
GPL Extension
Formalization
Reuse GPL incl. Expressions and TS
Add/Embed DS-extensions
Compatible notational style
Reduce to GPL
Analyze Domain to find Abstractions
Define suitable, new notations.
Rely on existing behavioral paradigm
Reuse standard expression language
Interpret/Generate to one or more GPLs
Use existing notation from domain
Clean up and formalize
Generate/Interpret
Often import existing „models“
KernelF
Functional Features
Functional, no state at its core.
Purity + Effect Tracking
The usual types, literals and op‘s
Various Conditionals
Functions and Blocks
No null, only opt<T>
Error Handling
Immutable Collections and higher-order functions
Enums, tuples, records, all immutable
Constraints on types and functions
Boxes (like Clojure‘s ref)
Transactional Memory
State Machines
Interactors
Stateful Features
Extensible/Embeddable through modular
language implementation and other means.
(Meta-) Tooling
Language Workbench
Open Source, by Jetbrains
Very Powerful
Used for years by itemis and others
Vast Experience
MPS: Language Toolkit
MPS: Notational Freedom
MPS: Language Composition
Verifying
Infrastructure
4
Ethereum
VM/Network
Iulia
Hyperledger
Java
Executable Multi-Party Contract Language
DSL
Logistics
DSL
Finance
DSL
…
KernelF
MPS / Convecton
Distribution, Trust Correctness
Validation
Simulation
Collaboration
Expressiveness
SMTLIB
Z3
HTML
JavaScript
CSS
Interaction, Integration
An Architecture For Smart Contracts
Ethereum
VM/Network
Iulia
Hyperledger
Java
Executable Multi-Party Contract Language
DSL
Logistics
DSL
Finance
DSL
…
KernelF
MPS / Convecton
Distribution, Trust Correctness
Validation
Simulation
Collaboration
Expressiveness
SMTLIB
Z3
HTML
JavaScript
CSS
Interaction, Integration
An Architecture For Smart Contracts
<x
TRUST?
Verifying Blockchain Infrastructure
Blockchains
Formal Semantics of the EVM in K
https://www.ideals.illinois.edu/bitstream/handle/2142/97207/hilden
brandt-saxena-zhu-rodrigues-guth-daian-rosu-2017-tr_0818.pdf
IELE: Register-Based VM for the Blockchain
https://runtimeverification.com/blog/new-technologies-for-the-blockchain-
iele-virtual-machine-and-k-universal-language-framework/
ERC20-K: Formal Executable
Spec of ERC20
https://github.com/runtimeverification/erc20-semantics
Formal Verification for Solidity Contracts
https://forum.ethereum.org/discussion/3779/formal-verification-for-solidity-contracts
Ethereum
VM/Network
Iulia
Hyperledger
Java
Executable Multi-Party Contract Language
DSL
Logistics
DSL
Finance
DSL
…
KernelF
Distribution, Trust Correctness
Validation
Simulation
Expressiveness
SMTLIB
Z3
HTML
JavaScript
CSS
Interaction, Integration
An Architecture For Smart Contracts
Did I program/specify the right behaviors?
Will the infrastructure execute the behaviors faithfully?
Ethereum
VM/Network
Iulia
Hyperledger
Java
Executable Multi-Party Contract Language
DSL
Logistics
DSL
Finance
DSL
…
KernelF
Distribution, Trust Correctness
Validation
Simulation
Expressiveness
SMTLIB
Z3
HTML
JavaScript
CSS
Interaction, Integration
An Architecture For Smart Contracts
Did I program/specify the right behaviors?
Will the infrastructure execute the behaviors faithfully?
Wrap Up
Further Reading
Blockchains
Mutable State in KernelF
https://medium.com/@markusvoelter/
dealing-with-mutable-state-in-kernelf-e0fdec8a489b
A Smart Contract Development Stack
https://languageengineering.io/
a-smart-contract-development-stack-54533a3a503a
A Smart Contract Development Stack, Pt. 2
https://languageengineering.io/a-smart-contract-development-
stack-part-ii-game-theoretical-aspects-ca7a9d2e548d
KernelF Reference
http://voelter.de/data/pub/kernelf-reference.pdf
DSLs in Safety-Critical Development
http://voelter.de/data/pub/MPS-in-Safety-1.0.pdf
We need better languages
Integration of verification tools
Simulation, Experimentation and Test
to describe contracts in a meaningful way
can be an important step to assure correctness
should be available in an interactive, local environment
Contracts must be functionally correct
in order for stakeholders to trust them.
Deployment to Blockchain is non-func,
it provides guarantees beyond functionality
Other deployments are useful,
that provide other trade-offs (secure , fast )

More Related Content

Similar to Deklarative Smart Contracts (20)

PDF
Security, Instrumentation, Resource Allocation and Monitoring of Smart Contra...
Vijayendra Bhamidipati Venkata Siva
 
PDF
[cb22] SMARTIAN: Enhancing Smart Contract Fuzzing with Static and Dynamic Da...
CODE BLUE
 
PDF
Blockchain-based Applications
Sadegh Dorri N.
 
PDF
Challenges in blockchain certification (Nov 19, 2018 for TPP2018)
Jun Furuse
 
PDF
Analysing Data from Blockchains - Keynote @ SOCCA 2020
Ingo Weber
 
PPTX
Multi-threading in the modern era: Vertx Akka and Quasar
Gal Marder
 
PPTX
Introduction to Solidity and Smart Contract Development (9).pptx
Gene Leybzon
 
PPTX
Intro to smart contract on blockchain en
Nicholas Lin
 
PPTX
Developing a Real-time Engine with Akka, Cassandra, and Spray
Jacob Park
 
PPTX
BlockchainConf.tech - Hyperledger overview
Pad Kankipati
 
PPTX
Blockchain architected
IBM Sverige
 
PDF
State Smart Contract Technologies
Federico Tenga
 
PDF
IBM Blockchain Platform Technical Introduction v1.1
Matt Lucas
 
PDF
Blockchain and Smart Contract Simulation
Jun Furuse
 
PPTX
Web3’s red pill: Smashing Web3 transaction simulations for fun and profit
Tal Be'ery
 
PDF
Wwc developing hyperledger applications v4
LennartF
 
PPTX
Smart Contract: QA Role for Decentralized Platform
Marco Andrade
 
PDF
All watched over machines of loving grace amsterdam
Andres Guadamuz
 
PDF
Deployablockchainwebappwithhyperledgerfabricpresentation 190820170703
Nevruz Mesut Sahin
 
PPTX
Deploy a blockchain web-app with Hyperledger Fabric 1.4 - Concepts & Code
Horea Porutiu
 
Security, Instrumentation, Resource Allocation and Monitoring of Smart Contra...
Vijayendra Bhamidipati Venkata Siva
 
[cb22] SMARTIAN: Enhancing Smart Contract Fuzzing with Static and Dynamic Da...
CODE BLUE
 
Blockchain-based Applications
Sadegh Dorri N.
 
Challenges in blockchain certification (Nov 19, 2018 for TPP2018)
Jun Furuse
 
Analysing Data from Blockchains - Keynote @ SOCCA 2020
Ingo Weber
 
Multi-threading in the modern era: Vertx Akka and Quasar
Gal Marder
 
Introduction to Solidity and Smart Contract Development (9).pptx
Gene Leybzon
 
Intro to smart contract on blockchain en
Nicholas Lin
 
Developing a Real-time Engine with Akka, Cassandra, and Spray
Jacob Park
 
BlockchainConf.tech - Hyperledger overview
Pad Kankipati
 
Blockchain architected
IBM Sverige
 
State Smart Contract Technologies
Federico Tenga
 
IBM Blockchain Platform Technical Introduction v1.1
Matt Lucas
 
Blockchain and Smart Contract Simulation
Jun Furuse
 
Web3’s red pill: Smashing Web3 transaction simulations for fun and profit
Tal Be'ery
 
Wwc developing hyperledger applications v4
LennartF
 
Smart Contract: QA Role for Decentralized Platform
Marco Andrade
 
All watched over machines of loving grace amsterdam
Andres Guadamuz
 
Deployablockchainwebappwithhyperledgerfabricpresentation 190820170703
Nevruz Mesut Sahin
 
Deploy a blockchain web-app with Hyperledger Fabric 1.4 - Concepts & Code
Horea Porutiu
 

More from Markus Voelter (20)

PPTX
Consulting
Markus Voelter
 
PDF
Build your own Language - Why and How?
Markus Voelter
 
PDF
Using language workbenches and domain-specific languages for safety-critical ...
Markus Voelter
 
PDF
What's Missing in Language Workbenches
Markus Voelter
 
PDF
How Domains Shape Languages
Markus Voelter
 
PDF
Why Modeling Suck Sucks
Markus Voelter
 
PDF
Fusing Modeling and Programming into Language-Oriented Programming
Markus Voelter
 
PDF
The future of DSLs - functions and formal methods
Markus Voelter
 
PDF
Lessons Learned from building mbeddr
Markus Voelter
 
PDF
The Design, Evolution and Use of KernelF
Markus Voelter
 
PDF
Envisioning the Future of Language Workbenches
Markus Voelter
 
PPTX
Architecting Domain-Specific Languages
Markus Voelter
 
PPTX
Generic Tools - Specific Languages (PhD Defense Slides)
Markus Voelter
 
PPTX
Language-Oriented Business Applications
Markus Voelter
 
PPTX
Generic Tools, Specific Laguages
Markus Voelter
 
PPTX
Domain Specific Language Design
Markus Voelter
 
PPTX
From Programming to Modeling And Back Again
Markus Voelter
 
PPTX
Faszination Segelfliegen
Markus Voelter
 
PPTX
Introduction To MDD
Markus Voelter
 
PPTX
Professional Podcasting Guide
Markus Voelter
 
Consulting
Markus Voelter
 
Build your own Language - Why and How?
Markus Voelter
 
Using language workbenches and domain-specific languages for safety-critical ...
Markus Voelter
 
What's Missing in Language Workbenches
Markus Voelter
 
How Domains Shape Languages
Markus Voelter
 
Why Modeling Suck Sucks
Markus Voelter
 
Fusing Modeling and Programming into Language-Oriented Programming
Markus Voelter
 
The future of DSLs - functions and formal methods
Markus Voelter
 
Lessons Learned from building mbeddr
Markus Voelter
 
The Design, Evolution and Use of KernelF
Markus Voelter
 
Envisioning the Future of Language Workbenches
Markus Voelter
 
Architecting Domain-Specific Languages
Markus Voelter
 
Generic Tools - Specific Languages (PhD Defense Slides)
Markus Voelter
 
Language-Oriented Business Applications
Markus Voelter
 
Generic Tools, Specific Laguages
Markus Voelter
 
Domain Specific Language Design
Markus Voelter
 
From Programming to Modeling And Back Again
Markus Voelter
 
Faszination Segelfliegen
Markus Voelter
 
Introduction To MDD
Markus Voelter
 
Professional Podcasting Guide
Markus Voelter
 
Ad

Recently uploaded (20)

PDF
AI Software Engineering based on Multi-view Modeling and Engineering Patterns
Hironori Washizaki
 
PDF
New Download FL Studio Crack Full Version [Latest 2025]
imang66g
 
PDF
Salesforce Implementation Services Provider.pdf
VALiNTRY360
 
PPTX
Explanation about Structures in C language.pptx
Veeral Rathod
 
PDF
Enhancing Security in VAST: Towards Static Vulnerability Scanning
ESUG
 
PDF
AWS_Agentic_AI_in_Indian_BFSI_A_Strategic_Blueprint_for_Customer.pdf
siddharthnetsavvies
 
PPT
Brief History of Python by Learning Python in three hours
adanechb21
 
PPTX
Contractor Management Platform and Software Solution for Compliance
SHEQ Network Limited
 
PDF
Why Are More Businesses Choosing Partners Over Freelancers for Salesforce.pdf
Cymetrix Software
 
PDF
On Software Engineers' Productivity - Beyond Misleading Metrics
Romén Rodríguez-Gil
 
PPTX
TexSender Pro 8.9.1 Crack Full Version Download
cracked shares
 
PDF
What companies do with Pharo (ESUG 2025)
ESUG
 
PPTX
ChessBase 18.02 Crack + Serial Key Free Download
cracked shares
 
PDF
Applitools Platform Pulse: What's New and What's Coming - July 2025
Applitools
 
PPTX
Employee salary prediction using Machine learning Project template.ppt
bhanuk27082004
 
PPTX
Role Of Python In Programing Language.pptx
jaykoshti048
 
PDF
How Agentic AI Networks are Revolutionizing Collaborative AI Ecosystems in 2025
ronakdubey419
 
PPTX
Cutting Optimization Pro 5.18.2 Crack With Free Download
cracked shares
 
PDF
Summary Of Odoo 18.1 to 18.4 : The Way For Odoo 19
CandidRoot Solutions Private Limited
 
PDF
Using licensed Data Loss Prevention (DLP) as a strategic proactive data secur...
Q-Advise
 
AI Software Engineering based on Multi-view Modeling and Engineering Patterns
Hironori Washizaki
 
New Download FL Studio Crack Full Version [Latest 2025]
imang66g
 
Salesforce Implementation Services Provider.pdf
VALiNTRY360
 
Explanation about Structures in C language.pptx
Veeral Rathod
 
Enhancing Security in VAST: Towards Static Vulnerability Scanning
ESUG
 
AWS_Agentic_AI_in_Indian_BFSI_A_Strategic_Blueprint_for_Customer.pdf
siddharthnetsavvies
 
Brief History of Python by Learning Python in three hours
adanechb21
 
Contractor Management Platform and Software Solution for Compliance
SHEQ Network Limited
 
Why Are More Businesses Choosing Partners Over Freelancers for Salesforce.pdf
Cymetrix Software
 
On Software Engineers' Productivity - Beyond Misleading Metrics
Romén Rodríguez-Gil
 
TexSender Pro 8.9.1 Crack Full Version Download
cracked shares
 
What companies do with Pharo (ESUG 2025)
ESUG
 
ChessBase 18.02 Crack + Serial Key Free Download
cracked shares
 
Applitools Platform Pulse: What's New and What's Coming - July 2025
Applitools
 
Employee salary prediction using Machine learning Project template.ppt
bhanuk27082004
 
Role Of Python In Programing Language.pptx
jaykoshti048
 
How Agentic AI Networks are Revolutionizing Collaborative AI Ecosystems in 2025
ronakdubey419
 
Cutting Optimization Pro 5.18.2 Crack With Free Download
cracked shares
 
Summary Of Odoo 18.1 to 18.4 : The Way For Odoo 19
CandidRoot Solutions Private Limited
 
Using licensed Data Loss Prevention (DLP) as a strategic proactive data secur...
Q-Advise
 
Ad

Deklarative Smart Contracts

  • 4. An actual contract, executed automatically. Multiple Parties. Decision | | Agreement | | Coordination. (Legally) Binding & Trusted. Formal Language. Checkable. Understandable. „Event Tracking“ Progress over time
  • 7. Blockchains can provide certain non-functional properties to executable contracts. Blockchains are a suitable (partial) implementation technology iff these properties are needed.
  • 8. Verification Ensure that the program performs correctly the things the program text tells it to do. Validation Ensure that the program does the correct things, wrt. to the requirements.
  • 9. Verification Ensure that the program performs correctly the things the program text tells it to do. Validation Ensure that the program does the correct things, wrt. to the requirements. Contract Execution Contract Definition
  • 10. Correct-by-Construction The language/framework/ API/modeling tool doesn’t allow a particular class of mistakes. Analysis-and-Fix You analyze the code/model after the fact and try to find problems which devs then fix.
  • 12. „ Well, people realize that these contracts have to run reliably, after all, the programs deal with real values now. “ Some Blockchain Guy
  • 13. Not the first community to realize ... J
  • 14. Lots of History & Research Computational Law Obligation, Permission Ordering, Causality, Time Event, State
  • 15. Lots of History & Research Blockchains Composing contracts: an adventure in financial engineering https://lexifi.com/files/resources/MLFiPaper.pdf POETS Process-oriented event-driven transaction systems https://github.com/legalese/poets/blob/master/doc/ Henglein%20-%20POETS%20Process-oriented%20event- driven%20transaction%20systems.pdf https://github.com/legalese/poets/blob/master/ doc/hvitvedmaster.pdf Domain-Specific Languages for Enterprise Systems https://bitbucket.org/jespera/poets/raw/c0ee7194ce57d2ad6ca8894c 8a44e88e546d5f4a/doc/poets-techreport/tr.pdf Contracts in Programming and in Enterprise Systems
  • 17. Ethereum VM/Network Iulia Hyperledger Java Executable Multi-Party Contract Language DSL Logistics DSL Finance DSL … KernelF MPS / Convecton Distribution, Trust Correctness Validation Simulation Collaboration Expressiveness SMTLIB Z3 HTML JavaScript CSS Interaction, Integration An Architecture For Smart Contracts Generate to verification tools to build more confidence beyond type checking.
  • 19. Declarative Description MultiPartyBooleanDecision A declarative, configurable specification of how a number of parties makes a (Boolean) decision.
  • 20. Execution and Test A MPBD instance maintains the state of a decision process as it evolves over time. Here, we play with an instance in the interactive REPL.
  • 21. Combination with State Machines More complex contracts are modeled as state machines; events are the API. Internally, the use BPBDs.
  • 22. Combintation with State Machines II Here, a transition action creates a new AccessControl instance ... The state of that instance is then used in guard condition for the top level SM.
  • 23. Preventing Game Theoretical Attacks Only „valid“ senders can enter this state. Events can only arrive at limited rate. States must be entered turn-by-turn.
  • 24. Ethereum VM/Network Iulia Hyperledger Java Executable Multi-Party Contract Language DSL Logistics DSL Finance DSL … KernelF MPS / Convecton Distribution, Trust Correctness Validation Simulation Collaboration Expressiveness SMTLIB Z3 HTML JavaScript CSS Interaction, Integration An Architecture For Smart Contracts I D E A
  • 25. Example: HyperCSL Blockchains Lisp (Clojure) based internal DSL for specifi- cation of general commercial contracts. Inspired by Simon Peyton Jones and Jean-Marc Eber and the POETS group at CPHU and ITU in Denmark. Uses Ken Adams’ Categories of Contract Language as fundametal semantic building blocks. Interpreter and UI in prototype stage.
  • 27. Example: HyperCSL Blockchains A UI to visualize the interactive execution of CSL contracts.
  • 29. Ethereum VM/Network Iulia Hyperledger Java Executable Multi-Party Contract Language DSL Logistics DSL Finance DSL … KernelF MPS / Convecton Distribution, Trust Correctness Validation Simulation Collaboration Expressiveness SMTLIB Z3 HTML JavaScript CSS Interaction, Integration An Architecture For Smart Contracts KernelF is an extensible functional language used at the core of DSLs.
  • 30. DSL Development New Language GPL Extension Formalization Reuse GPL incl. Expressions and TS Add/Embed DS-extensions Compatible notational style Reduce to GPL Analyze Domain to find Abstractions Define suitable, new notations. Rely on existing behavioral paradigm Reuse standard expression language Interpret/Generate to one or more GPLs Use existing notation from domain Clean up and formalize Generate/Interpret Often import existing „models“ KernelF
  • 31. Functional Features Functional, no state at its core. Purity + Effect Tracking The usual types, literals and op‘s Various Conditionals Functions and Blocks No null, only opt<T> Error Handling Immutable Collections and higher-order functions Enums, tuples, records, all immutable Constraints on types and functions Boxes (like Clojure‘s ref) Transactional Memory State Machines Interactors Stateful Features Extensible/Embeddable through modular language implementation and other means.
  • 32. (Meta-) Tooling Language Workbench Open Source, by Jetbrains Very Powerful Used for years by itemis and others Vast Experience
  • 37. Ethereum VM/Network Iulia Hyperledger Java Executable Multi-Party Contract Language DSL Logistics DSL Finance DSL … KernelF MPS / Convecton Distribution, Trust Correctness Validation Simulation Collaboration Expressiveness SMTLIB Z3 HTML JavaScript CSS Interaction, Integration An Architecture For Smart Contracts
  • 38. Ethereum VM/Network Iulia Hyperledger Java Executable Multi-Party Contract Language DSL Logistics DSL Finance DSL … KernelF MPS / Convecton Distribution, Trust Correctness Validation Simulation Collaboration Expressiveness SMTLIB Z3 HTML JavaScript CSS Interaction, Integration An Architecture For Smart Contracts <x TRUST?
  • 39. Verifying Blockchain Infrastructure Blockchains Formal Semantics of the EVM in K https://www.ideals.illinois.edu/bitstream/handle/2142/97207/hilden brandt-saxena-zhu-rodrigues-guth-daian-rosu-2017-tr_0818.pdf IELE: Register-Based VM for the Blockchain https://runtimeverification.com/blog/new-technologies-for-the-blockchain- iele-virtual-machine-and-k-universal-language-framework/ ERC20-K: Formal Executable Spec of ERC20 https://github.com/runtimeverification/erc20-semantics Formal Verification for Solidity Contracts https://forum.ethereum.org/discussion/3779/formal-verification-for-solidity-contracts
  • 40. Ethereum VM/Network Iulia Hyperledger Java Executable Multi-Party Contract Language DSL Logistics DSL Finance DSL … KernelF Distribution, Trust Correctness Validation Simulation Expressiveness SMTLIB Z3 HTML JavaScript CSS Interaction, Integration An Architecture For Smart Contracts Did I program/specify the right behaviors? Will the infrastructure execute the behaviors faithfully?
  • 41. Ethereum VM/Network Iulia Hyperledger Java Executable Multi-Party Contract Language DSL Logistics DSL Finance DSL … KernelF Distribution, Trust Correctness Validation Simulation Expressiveness SMTLIB Z3 HTML JavaScript CSS Interaction, Integration An Architecture For Smart Contracts Did I program/specify the right behaviors? Will the infrastructure execute the behaviors faithfully?
  • 43. Further Reading Blockchains Mutable State in KernelF https://medium.com/@markusvoelter/ dealing-with-mutable-state-in-kernelf-e0fdec8a489b A Smart Contract Development Stack https://languageengineering.io/ a-smart-contract-development-stack-54533a3a503a A Smart Contract Development Stack, Pt. 2 https://languageengineering.io/a-smart-contract-development- stack-part-ii-game-theoretical-aspects-ca7a9d2e548d KernelF Reference http://voelter.de/data/pub/kernelf-reference.pdf DSLs in Safety-Critical Development http://voelter.de/data/pub/MPS-in-Safety-1.0.pdf
  • 44. We need better languages Integration of verification tools Simulation, Experimentation and Test to describe contracts in a meaningful way can be an important step to assure correctness should be available in an interactive, local environment Contracts must be functionally correct in order for stakeholders to trust them. Deployment to Blockchain is non-func, it provides guarantees beyond functionality Other deployments are useful, that provide other trade-offs (secure , fast )