A Coq-Based Formal Method of C++ Compiler Variable Scope
A formal method and scope technology, which is applied in the formalization field of C++ compiler variable scope based on Coq, can solve problems such as unexplainable
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0081] A Coq-based C++ compiler variable scope formalization method, using the record mathematical model to formalize the table structure, using the Inductive inductive definition to formalize the stack structure, using match matching to formalize the operation logic that causes branches in the code, and using the Fixpoint recursive function Formalize the logic of repeated behavior operations.
[0082] Such as figure 1 As shown, the present invention is based on the FSPVM formal verification system, applied to the Coq interpreter therein, and aims to solve the problem that the Coq interpreter cannot correctly interpret the code containing the variable scope characteristic as a virtual memory instruction sequence. The Coq interpreter cannot correctly interpret code with variable scope features, that is, the Coq interpreter cannot correctly interpret variable operation methods with scope restrictions.
[0083] In order to solve this problem, the present invention abstracts the ...
Embodiment 2
[0087] A Coq-based C++ compiler variable scope formalization method, based on the FSPVM formal verification engine, aims to solve the problem that the Coq interpreter cannot correctly interpret codes with variable scope characteristics as virtual memory instruction sequences. It mainly includes the following steps:
[0088] 1. Formal method of global variable scope table and local variable scope table stack structure:
[0089] S1. The table value structure is formalized, using the Inductive structure to define the table value, the dmt_init induction sub-indicates the initialization table value, and the dmt_unit induction sub-internal storage: virtual memory address, variable scope identifier.
[0090] Inductive domain_map_table_v : Type :=
[0091] | dmt_init : domain_map_table_v
[0092] | dmt_unit : high_address -> address -> dmt_sign -> domain_map_table_v.
[0093] S2. Formalize the table structure, use the Record mathematical model to simulate the table structure, and u...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com