Abstract syntax tree-based EOS intelligent contract language conversion method
An abstract syntax tree and smart contract technology, which is applied in the field of computer language code translation, can solve the problems of Ethereum smart contract AMR high-risk transactions and translation solutions without mature solutions, etc., to achieve strong adaptability, strong scalability, code Clearly Structured Effects
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0053] An abstract syntax tree-based EOS smart contract language conversion method, combining figure 1 , figure 2 , image 3 shown, including the following steps:
[0054] Step S1. Carry out lexical unit division on the EOS smart contract source program; the specific lexical unit division method includes the following steps:
[0055] Step S1.1. Define the regular expression R for morpheme recognition; the morpheme includes a specific morpheme type, and only the basic morpheme type that requires regular matching in morpheme matching;
[0056] Step S1.2. For a specific morpheme type, define a pattern-action matching structure in the lexical analyzer for morpheme matching and syntax analysis;
[0057] Step S1.3. Define the matching string S corresponding to the regular expression R. Based on the regular expression R and the corresponding string S, define the following matching rules:
[0058]
[0059] in is a regular expression that is common and can match multiple stri...
Embodiment 2
[0089] The present invention is based on the above-mentioned embodiment 1, in order to better realize the present invention, further, the matching rules are written based on the following matching order rules:
[0090] (1) Matching sequence rules: define the complete set of morpheme matching patterns as U R , if the string S n Not only can regular expressions can be matched by the regular expression R n match, then when the morpheme matches, the regular expression Rn is listed in the regular expression Before, make Sn match according to the regular expression Rn; the specific matching order satisfies the following algorithm:
[0091]
[0092] (2) Matching order modification rules: After the source code library of the EOS smart contract source code is updated, the updated newly encapsulated morpheme S is added p , delete the old lexeme S q , the matching order modification satisfies the following algorithm:
[0093]
[0094] Working principle: Due to the longest m...
Embodiment 3
[0097] On the basis of any one of the above-mentioned embodiments 1-2, in order to better realize the present invention, the present invention is further based on a formal verification interpreter; using a formal verification interpreter to formalize the translated code verify.
[0098] Working principle: Through the formal verification of the interpreter, it is possible to prove or verify mathematically whether the implementation scheme of the program has indeed realized the functions described in the program design, which makes the scheme of the present invention more reasonable and rigorous, and further ensures the safety of translation reliability.
[0099] Other parts of this embodiment are the same as those of any one of the foregoing embodiments 1-2, so details are not repeated here.
PUM

Abstract
Description
Claims
Application Information

- R&D
- Intellectual Property
- Life Sciences
- Materials
- Tech Scout
- Unparalleled Data Quality
- Higher Quality Content
- 60% Fewer Hallucinations
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2025 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com