作者投稿和查稿 主编审稿 专家审稿 编委审稿 远程编辑

计算机工程 ›› 2023, Vol. 49 ›› Issue (5): 12-21,28. doi: 10.19678/j.issn.1000-3428.0065584

• 热点与综述 • 上一篇    下一篇

RegLang监管合约规则冲突检测方法

高健博1,2, 张家硕1,2, 李青山3, 陈钟1,2   

  1. 1. 北京大学 计算机学院, 北京 100871;
    2. 高可信软件技术教育部重点实验室(北京大学), 北京 100871;
    3. 博雅正链(北京)科技有限公司, 北京 100037
  • 收稿日期:2022-08-25 修回日期:2022-12-06 发布日期:2023-01-12
  • 作者简介:高健博(1994-),男,助理研究员、博士,主研方向为区块链、面向领域的软件工程;张家硕,博士研究生;李青山,博士;陈钟,教授、博士。
  • 基金资助:
    国家重点研发计划(2020YFB1005404);国家自然科学基金(62172010);北京市自然科学基金(M21040)。

Detection Method for Rule Conflicts in RegLang Regulatory Contracts

GAO Jianbo1,2, ZHANG Jiashuo1,2, LI Qingshan3, CHEN Zhong1,2   

  1. 1. School of Computer Science, Peking University, Beijing 100871, China;
    2. Key Laboratory of High Confidence Software Technologies (Peking University), Ministry of Education, Beijing 100871, China;
    3. Boya RegChain Beijing Inc., Beijing 100037, China
  • Received:2022-08-25 Revised:2022-12-06 Published:2023-01-12

摘要: RegLang是一种面向监管规则设计的智能合约编程语言,旨在支撑监管规则数字化与合约化,已在金融等领域取得初步应用。然而,在实际应用中,金融监管领域的“适用冲突”“多轨规制”等规则冲突问题可能对区块链金融应用造成严重影响,在增加从业机构合规成本的同时,对监管合约的有效性带来挑战。针对上述问题,提出监管合约变量类型依赖分析方法与基于依赖图的变量类型传播分析方法,推断监管合约中所有变量的可能类型,并根据可满足性模理论求解器支持的符号类型实现监管合约中变量、语句和规则的符号化。基于符号分析的规则冲突检测方法,将监管规则冲突问题转换为可满足性问题,从而检测监管合约中规则的自冲突、完全冲突和局部冲突,并针对多个监管规则间完全冲突检测中的状态空间爆炸问题提出子集划分算法进行优化。实验结果表明,RegLang监管合约规则冲突检测方法可以有效检测各类监管规则冲突,在对代码行数为300行的监管规则进行冲突检测时,自冲突、完全冲突和局部冲突的平均检测耗时分别为1 234.9 ms、1 977.8 ms和2 364.5 ms,在实际应用中是可接受的,能够为实现监管规则数字化提供有效保障。

关键词: RegLang监管合约, 智能合约, 冲突检测, 符号分析, 区块链, 监管科技

Abstract: RegLang is a regulatory-oriented smart contract programming language for the digitization and contractualization of regulatory rules with preliminary applications in finance and other fields. However,in practice,the rule conflicts such as "scope conflict" and "multi-track regulation" in the financial field may have a serious impact on blockchain applications.While increasing the compliance cost,such conflicts also diminish the effectiveness of the regulatory contract. To address these problems,the variable type dependency and propagation analysis methods are proposed based on the dependency graph to infer the potential types of variables in regulatory contracts and realize the symbolization of variables,statements,and rules according to the symbol types supported by Satisfiability Module Theories(SMT) solvers.A rule conflict detection method is proposed based on symbol analysis,which transforms the regulatory rule conflict problems into satisfiability problems and detects the self-conflict,complete conflict,and partial conflict problems.Moreover,a subset partitioning method is proposed to optimize the state space explosion in detecting complete conflicts among multiple regulatory rules.The experimental results show that the proposed methods can effectively detect various regulatory rule conflicts.When the conflict detection is performed on the regulatory rules with 300 lines of code,the average time of detecting self-conflict,complete conflict,and partial conflict is 1 234.9 ms,1 977.8 ms,and 2 364.5 ms,respectively. The time consumption is acceptable in practical applications and can provide a validity guarantee for the digitalization of regulatory rules.

Key words: RegLang regulatory contract, smart contract, conflict detection, symbolic analysis, blockchain, regulatory technology

中图分类号: