Font Size: a A A

Design And Implementation Of Domain Specific Language Based On Smart Contract

Posted on:2021-03-24Degree:MasterType:Thesis
Country:ChinaCandidate:C Y MaFull Text:PDF
GTID:2428330647957213Subject:Computer software and theory
Abstract/Summary:PDF Full Text Request
Smart contracts are protocols developed on the basis of blockchain and cryptocurrency technologies to manage digital assets and execute transaction logic in a trusted environment.Smart contracts are an interdisciplinary concept.Creating smart contracts requires compiling the results negotiated by the participants into computer executable code.In this process,code logic security issues,and smart contract language expression capabilities need to be considered.Therefore,designing a contract language with strong expressiveness and high level of abstraction for smart contracts,and building a universal system execution model can better promote smart contracts.At present,in the process of writing smart contracts,experts in various fields reach consensus on contracts.No universal solution has been formed.This subject has carried out an analysis of the execution process of smart contracts from modeling,design,implementation to application,and introduced domain-specific languages(Domain-Specific Language/DSL)to optimize various areas.Through DSL,the mapping relationship between contract layer protocol language and execution layer machine language in the smart contract operation process is solved.Finally,by designing a prototype system,the programmability,executable,trusted operating environment of the smart contract described by the domain-specific language DSL are demonstrated.First,this topic analyzes the execution logic,programming language,and calling method of smart contracts,execution process of smart contract systems,and demonstrates the feasibility analysis of using DSL to define and write smart contracts.Secondly,this topic puts forward the DSL design idea,which makes the DSL have better readability and higher abstraction level through the definition of constraints.And using antlr tool to complete the implementation of the domain-specific language DSL interpreter,to achieve the purpose of DSL programmable in the smart contract model.Finally,the subject used Fabric as the underlying blockchain operating environment for the smart contract.The mapping between the contract text described by the DSL and the fabric chain code function was completed through experiments,and the executableness of the designed domain-specific language DSL was verified.
Keywords/Search Tags:smart contract, DSL, blockchain, Fabric, Antlr
PDF Full Text Request
Related items