Aidin Rasti, Amal Ahmed Anda, Sofana Alfuhaid, Alireza Parvizimosaed, Daniel Amyot, Marco Roveri, Luigi Logrippo, John Mylopoulos
{"title":"Automated generation of smart contract code from legal contract specifications with Symboleo2SC","authors":"Aidin Rasti, Amal Ahmed Anda, Sofana Alfuhaid, Alireza Parvizimosaed, Daniel Amyot, Marco Roveri, Luigi Logrippo, John Mylopoulos","doi":"10.1007/s10270-024-01187-9","DOIUrl":null,"url":null,"abstract":"<p>Smart contracts (SCs) are software systems that monitor and partially control the execution of legal contracts to ensure compliance with the contracts’ terms and conditions, which essentially are sets of obligations and powers, triggered by events. Such systems often exploit Internet-of-Things technologies to support their monitoring functions and blockchain technology to ensure the integrity of their data. Enterprise-level blockchain platforms (such as Hyperledger Fabric) and public ones (such as Ethereum) are popular choices for SC development. However, usually, legal experts are not able to directly encode contract requirements into SCs. <span>Symboleo</span> is a formal specification language for legal contracts that was introduced to address this issue. <span>Symboleo</span> uses an ontology that defines legal concepts such as parties, obligations, powers, and assets, with semantics expressed with state machines. This paper proposes a tool that automatically translates <span>Symboleo</span> specifications into smart contract code for Hyperledger Fabric. Towards this end, we have extended the current <span>Symboleo</span> IDE, implemented the ontology and semantics by using the modelling language Umple, and created a reusable library. The resulting <span>Symboleo2SC</span> tool generates Hyperledger Fabric code exploiting this library. This code is a complete translation and does not require further development. <span>Symboleo2SC</span> was evaluated with five sample contracts. These were converted to SCs for contract monitoring and control purposes. <span>Symboleo2SC</span> helps simplify the SC development process, saves development effort, and helps reduce risks of coding errors.</p>","PeriodicalId":49507,"journal":{"name":"Software and Systems Modeling","volume":"59 1","pages":""},"PeriodicalIF":2.0000,"publicationDate":"2024-06-29","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Software and Systems Modeling","FirstCategoryId":"94","ListUrlMain":"https://doi.org/10.1007/s10270-024-01187-9","RegionNum":3,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q3","JCRName":"COMPUTER SCIENCE, SOFTWARE ENGINEERING","Score":null,"Total":0}
引用次数: 0
Abstract
Smart contracts (SCs) are software systems that monitor and partially control the execution of legal contracts to ensure compliance with the contracts’ terms and conditions, which essentially are sets of obligations and powers, triggered by events. Such systems often exploit Internet-of-Things technologies to support their monitoring functions and blockchain technology to ensure the integrity of their data. Enterprise-level blockchain platforms (such as Hyperledger Fabric) and public ones (such as Ethereum) are popular choices for SC development. However, usually, legal experts are not able to directly encode contract requirements into SCs. Symboleo is a formal specification language for legal contracts that was introduced to address this issue. Symboleo uses an ontology that defines legal concepts such as parties, obligations, powers, and assets, with semantics expressed with state machines. This paper proposes a tool that automatically translates Symboleo specifications into smart contract code for Hyperledger Fabric. Towards this end, we have extended the current Symboleo IDE, implemented the ontology and semantics by using the modelling language Umple, and created a reusable library. The resulting Symboleo2SC tool generates Hyperledger Fabric code exploiting this library. This code is a complete translation and does not require further development. Symboleo2SC was evaluated with five sample contracts. These were converted to SCs for contract monitoring and control purposes. Symboleo2SC helps simplify the SC development process, saves development effort, and helps reduce risks of coding errors.
期刊介绍:
We invite authors to submit papers that discuss and analyze research challenges and experiences pertaining to software and system modeling languages, techniques, tools, practices and other facets. The following are some of the topic areas that are of special interest, but the journal publishes on a wide range of software and systems modeling concerns:
Domain-specific models and modeling standards;
Model-based testing techniques;
Model-based simulation techniques;
Formal syntax and semantics of modeling languages such as the UML;
Rigorous model-based analysis;
Model composition, refinement and transformation;
Software Language Engineering;
Modeling Languages in Science and Engineering;
Language Adaptation and Composition;
Metamodeling techniques;
Measuring quality of models and languages;
Ontological approaches to model engineering;
Generating test and code artifacts from models;
Model synthesis;
Methodology;
Model development tool environments;
Modeling Cyberphysical Systems;
Data intensive modeling;
Derivation of explicit models from data;
Case studies and experience reports with significant modeling lessons learned;
Comparative analyses of modeling languages and techniques;
Scientific assessment of modeling practices