Lavax language design objectives: 1. Cross-platform 2. High speed 3. Safety 4. Simply these goals are sometimes complementary, sometimes contradictory. When a contradiction occurs, the target is prioritized by the first target.
Cross-platform is the purpose of the Lavax language. If it is not possible to cross the platform, other objectives will lose its meaning. The cross-platform cross-platform here refers to the target code of the same program to run directly on different hardware platforms, which is not a matter of transplantation. It should be noted that cross-platform is not absolute, but relative. The absolute cross-platform language is either not existed or useless. For example: there is a Lavax program that requires 20kb memory to run, then this program is obviously not working properly on a platform with only 8KB memory. Then we can define all LAVAX programs to use 8KB of memory only on the platform of 8kb memory platforms. We cannot limit the ability of the language itself for absolute cross-platform capabilities. In order to move, it can also operate correctly under the worst hardware conditions, so that this program cannot play the advantages of hardware on high-performance hardware platforms, which is the practice of thinking. Remember, the Lavax language is first a practical language, not an absolutely ideal useless marine building. Lavax's cross-platform capabilities are guaranteed by the Lavax Virtual Machine (LVM). Obviously, if the compiler compiles the Lavax program directly to a machine code of a CPU. Because the cross-platform must first be able to cross the CPU. If the target code of a language program can only be run on a certain CPU, such a language is not symmetrical to a cross-platform language. The LAVAX compiler compiles the Lavax program as a virtual machine code. The virtual machine code can be identified and executed by the Lavax virtual machine. To different hardware platforms, their respective Lavax virtual machines ensure that the target code of the same LAVAX program can run on different hardware platforms, that is, cross-platform. The high speed is the most important goal of the Lavax language under the premise of ensuring cross-platform. Today, the computer speed is not fast to ignore the point of computer language efficiency. Therefore, you must be careful to pick a highly efficient language. Compilation is obviously not good, this language efficiency is very high, unfortunately there is no cross-platform capability. C is not good, compared to C, this language is low, and the demand for memory is also high, and it is not suitable for embedding mobile devices. So, I absorb some of the characteristics of the C language and created the Lavax language.
Safety First, prevent procedures from accessing memory, and the other is to prevent procedures from performing illegal or dangerous instructions. Lavax virtual machine guarantees these two points. Any memory access is performed by virtual machines, so the virtual machine itself can determine which addresses are illegal to prevent illegal access to memory. Any virtual machine code must also become a real machine to be identifiable instructions via a virtual machine, so the virtual machine can filter the dangerous instruction. Once people encountered me with the ability to run a compilation code for LAVAX (Similar to embedded assembly of C), this violates cross-platform principles, and I will increase the risk of language, so I will not accept this suggestion. of. Increased memory addresses and code checks for security, which will significantly affect the speed of the program. In order to balance the principles of these two contradictions, two virtual machines are designed, a virtual machine has inspection capabilities, called the Lavax authentication machine, and another virtual machine does not have inspection capabilities, but the running speed is fast. The procedure that is smooth through the certification machine in the Lavax certification machine can be safely running on a virtual machine that does not have inspection capabilities.
It is also very important to meet cross-platform, high speed and security. The more complex language, the more difficult to master, and it is more prone to problems with its writing procedures.