Unlock instant, AI-driven research and patent intelligence for your innovation.

Solidity smart contract-based syntactic information extraction method, device and storage medium

A grammatical information and smart contract technology, applied in the field of blockchain, can solve the problems of prone to false positives, insufficient application of grammatical information, and inability to accurately perceive programs.

Pending Publication Date: 2020-08-14
HANGZHOU QULIAN TECH CO LTD
View PDF0 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Most security solutions for verifying smart contracts require grammatical analysis and auditing of the contract code, and often the completeness, accuracy and timeliness of grammatical information acquisition cannot be guaranteed
Existing solutions based on grammatical analysis can only judge whether there are risky grammatical elements in the system from the code level. Such a method cannot judge the actual execution logic and action results of the code, and there are the following problems: 1. .Developers need to judge whether a certain piece of code is risky based on actual experience and problems that have occurred during program operation, and only traverse the problematic part of the syntax tree according to the established rules, without fully applying the syntax information in the code; 2. Static inspection only matches and checks the syntax of the code, and cannot accurately perceive the context information in the program. The obtained syntax information is inaccurate and prone to false positives; for example, an int variable age is used to represent the user's age. Years later, the user's age + 1, the static test will only detect that there is an overflow risk in the addition operation, but in fact the user's age will not exceed 1000 years old at most, the method of traversing the syntax tree can only find that addition is used here, but not addition The operand is int type; 3. There is no correlation between the information between each syntax node, and the dynamic operation of the program is not considered. When traversing a syntax node, the syntax information declared by other syntax nodes cannot be considered.

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Solidity smart contract-based syntactic information extraction method, device and storage medium
  • Solidity smart contract-based syntactic information extraction method, device and storage medium
  • Solidity smart contract-based syntactic information extraction method, device and storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0031] The application will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain related inventions, rather than to limit the invention. It should also be noted that, for ease of description, only parts related to the invention are shown in the drawings.

[0032] It should be noted that, in the case of no conflict, the embodiments in the present application and the features in the embodiments can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and embodiments.

[0033] figure 1 It is a flowchart of a method for extracting grammatical information based on Solidity smart contracts provided by an embodiment of the present invention.

[0034] like figure 1 As shown, in this embodiment, the present invention provides a method for extracting grammatical infor...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention provides a Solidity smart contract-based syntactic information extraction method, a device and a storage medium. The method comprises the steps of: calling a first index algorithm to construct a first service class corresponding to a current syntax node, and meanwhile saving the index relation of syntactic information of the current syntax node; calling a syntactic filling algorithmto fill syntactic information of the current first service class; calling a next layer syntax node service class to fill the syntactic information corresponding to the next layer service class until all the service classes are filled; and sorting the inheritance sequence of contracts to obtain the inheritance line information of each contract so as to accurately realize tracing of each expressiontype in the contracts. According to the method, a tree-shaped data structure composed of the syntax node service classes is established in a recursion mode, so that each syntax node can fully acquirethe syntactic information of the syntax node, and the problem that syntactic information extraction of a syntactic information extraction method achieved based on syntax tree traversal is incomplete and inaccurate is solved.

Description

technical field [0001] This application relates to the technical field of blockchain, and in particular to a method, device and storage medium for extracting grammatical information based on Solidity smart contracts. Background technique [0002] As a set of commitments defined in digital form, smart contracts control digital assets and include the rights and obligations agreed by contract participants, which are automatically executed by computer systems. The combination of smart contracts and blockchain technology is an emerging product, and it is technically immature. There are various business processes or technical loopholes from application business to compiler to virtual machine to the bottom layer of blockchain. Many smart contract projects launched Frequently disclosed security issues. Because smart contracts are difficult to tamper with once they are deployed to the blockchain, how to fully ensure the security of smart contracts before deployment becomes a key ste...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
IPC IPC(8): G06F8/41G06F16/27
CPCG06F8/427G06F16/27
Inventor 李伟张帅蔡亮匡立中邱炜伟
Owner HANGZHOU QULIAN TECH CO LTD