MedTiny Code Generation for Enhancing RegLang Smart Contract Reliability

Xiaokun Luan, Yihao Zhang, Meng Sun

Published: 31 Mar 2025, Last Modified: 04 Nov 2025CrossrefEveryoneRevisionsCC BY-SA 4.0
Abstract: This paper presents the translation of regulatory smart contracts written in RegLang into MedTiny, a component-based modeling language tailored for the development and verification of reliable systems. RegLang, a domain-specific language for embedding regulatory requirements in smart contracts, is limited by its users' expertise in smart contract development and formal verification. To address this, we propose an automated code generation method that translates RegLang contracts into MedTiny, enabling domain experts to utilize MedTiny's verification capabilities and modular system architecture. By leveraging MedTiny's toolchain and SMT solvers, we detect redundancies and conflicts in regulations early in the development cycle, helping domain experts avoid introducing unintended behaviors. This approach not only preserves the original specifications of RegLang contracts but also improves overall system reliability by integrating comprehensive verification capabilities. A case study illustrates the practical benefits of this translation, supporting complex rule-based contract management and mitigating the risks associated with regulatory changes.
Loading