Font Size: a A A

Study And Implemention Of Stack Based Virtual Language

Posted on:2013-09-25Degree:MasterType:Thesis
Country:ChinaCandidate:Q LiuFull Text:PDF
GTID:2298330467951753Subject:Computer application technology
Abstract/Summary:PDF Full Text Request
In the development of application software, the virtual machine concept for solving the core problems, such as software development, code maintainability, system robustness, is an important guiding role. Not only in the early computer hardware and software design, play a central role in the reality of software development, especially in embedded systems is still important guidance. At the same time due to the complexity of the virtual machine, analysis and realize virtual machine systems need documentation and design examples, not only a lack of integrity, but also lack of guidance in the corresponding links. This thesis focuses resolve this contradiction.The virtual machine is a effective solution to computer software, hardware, escalating and updating of application development and maintenance of increasingly complex.As the engineering application of the thesis, the compact core and complete stack virtual machine, virtual machine design algorithms and structures with concrete examples are given complete algorithm, providing a high-level language Csmart its compiler, which constitute a good reference of the complete virtual machine solution.For the implementation architecture choice of Virtual machine, there are two implementations, based on the stack structure and register-based structure. These two ways directly relates to the virtual instruction set design, the stack structure corresponding to the reduced instruction set, register-based way corresponds to the complex instruction set. Stack structure can easily realize the software functions of the general-purpose registers in the CPU, allowing applications on the virtual machines better portability. In this article, the introduced virtual machine is based on the stack structure of the virtual machine. Analysis and study of these two ways, especially, the stack structure of Java virtual machine to achieve a stack structure of the small but complete virtual machine SVM (the Stack-based virtual machine). SVM, the core design of the virtual run-time system and the command parser part of the data structures and algorithms, the complex simple, illustrated, coherent prominent designers of the virtual machine to provide a good academic and practical aspects of strong reference.At the same time, the virtual machine requires a high-level language and compiler system in order to effectively develop applications. High-level language virtual machine implemented in this article for Csmart, is a subset of the C language taken to define, easy to understand, simple and practical, not only enhances the SVM reference, but a complete and integrated description of high-level language compiler and code generation is given. Csmat the compiler is a recursive descent way. This way. innovation is the procedure Csmart scan analysis (morphology and syntax) and code generation in a single scan to complete, simple language structure Csmart compiled into machine code and compiler code less simple structure.Through a paper, a small but fully functional virtual machine is well introduced. providing a good reference value for virtual machine design and implementation, compiler theory, practice and research have.
Keywords/Search Tags:stack structure, the virtual machine, virtual instruction, Csmart language
PDF Full Text Request
Related items