首页|SDLSD:基于状态图的智能合约描述语言

SDLSD:基于状态图的智能合约描述语言

扫码查看
智能合约在区块链发展中扮演着重要角色,并广泛应用于各领域.然而,已有的智能合约语言均由专业的合约研发人员开发,使得相关应用领域的专家难以轻松地设计合约.为了便于领域专家进行智能合约设计,引入领域特定语言的概念,提出一种基于状态图的智能合约描述语言SDLSD.该语言使用状态图描述合约条款与行为之间的逻辑结构关系,并通过词法、语法及语义分析生成可执行的Solidity语言.SDLSD实时支持语法检查、合约库引用和合约模板使用,同时跨平台编译和运行.测试结果表明,该语言不仅具有自然语言的简单性与可读性,还展现出更高的抽象语义,相较于已有方法具有明显优势.
SDLSD:Smart Contract Description Language Based on State Diagram
Smart contracts play a significant role in the development of blockchain,and they are widely applied in various fields.However,existing smart contract languages have been developed by professional contract developers,making it difficult for experts in related fields to easily design contracts.To facilitate domain experts in designing smart contracts,the concept of Domain Specific Language(DSL)is intro-duced,and a State Diagram-based Smart Contract Description Language(SDLSD)is proposed.This language uses state diagrams to describe the logical structural relationships between contract terms and behaviors,and it generates executable Solidity code through lexical,syntactic,and semantic analysis.SDLSD provides real-time support for syntax checks,contract library references,and contract template usage,while enabling cross-platform compilation and execution.Test results demonstrate that this language not only possesses the simplicity and readability of natural language but also exhibits higher levels of abstract semantics,giving it a clear advantage over existing methods.

smart contractsstate diagramlexical analysisgrammatical analysissemantic analysiscode generation

张浩、吴胜、张人娄

展开 >

江苏师范大学 计算机科学与技术学院,江苏 徐州 221116

智能合约 状态图 词法分析 语法分析 语义分析 代码生成

江苏师范大学研究生科研与实践创新计划项目

2022XKT1541

2024

软件导刊
湖北省信息学会

软件导刊

影响因子:0.524
ISSN:1672-7800
年,卷(期):2024.23(4)
  • 25