Working with Compilers can come with its learning curves. To truly get acclimated and to make sure that you are translating languages accurately and with little uncertainty, we’ve compiled (pun very much intended) a list of must-know vocabulary to get you started on the right foot!
Some key terms
- Compiler - Well, this may seem derivative, but this definition is for those unfamiliar with the space! Compilers are programs that take code in one language and translate that code into another language. Typically, compilers will take a high level coding language and translate that into a lower level, so that it is more workable in the long term.
- Compiled Code - Compiled code, or a compiled language in this case, is a language that's purpose or input is from compilers, not interpretation software.
- Implicit Compilation - This is something that the code does for you in the background, meaning it’s not something you have to worry about when working on a change.
- Minimal Compilation - This refers to steps the compiler must perform to compile time. Specific actions of this can be found here.
Types of compilers (source-to-source, etc.)
- JIT compilation - As described by freecodecamp.org, “Just-in-time compilation is a method for improving the performance of interpreted programs. During execution, the program may be compiled into native code to improve its performance. It is also known as dynamic compilation.”
- AOT compilation - Ahead-of-Time Compilation is used with angular applications. Largely made up of components and HTML templates, they must go through a compilation process before properly running in a browser.
- VM (like in JVM - JavaVirtual Machine) - The JVM program is specifically trained to execute other programs. Available to run on any device/ operating system, the JVM optimizes the memory of a program. Infoworld gives a great explanation of JVM’s technical and everyday definition: “Technical definition: The JVM is the specification for a software program that executes code and provides the runtime environment for that code. Everyday definition: The JVM is how we run our Java programs. We configure the JVM's settings and then rely on it to manage program resources during execution.”
CFG (context free grammar)
- Lexemes -
Techopedia states lexemes are “a sequence of alphanumeric characters in a token. The term is used in both the study of language and in the lexical analysis of computer program compilation. In the context of computer programming, lexemes are part of the input stream from which tokens are identified.”
- Tokens - I tried to compile my own definition of tokens, but this one did it perfect justice: “[Tokens are] a sequence of characters that can be treated as a single logical entity. Typical tokens are: Identifiers, Keywords, Operators, Special symbols Constants.
- FSM (Finite StateMachine) - An FSM is a computational model. It can be used with both software and hardware, in order to replicate sequential logic, as well as other types of computer programs. There are many use cases for an FSM, including: linguistics, AI, mathematics and more.
- Parsing - As explained by techopedia, “[parsing occurs] where a string of commands – usually a program – is separated into more easily processed components, which are analyzed for correct syntax and then attached to tags that define each component. The computer can then process each program chunk and transform it into machine language.”
- Literal Object - This refers to something with a fixed value in the source code. They are comma-separated lists of name-value pairs inside curly braces. More information about Literal Objects can be found here.
- Compile Time - This can mean a few things. The 3 main categories this can fall under are: the operations performed by a compiler, programming language requirements that must be met by source code for it to be successfully compiled, or properties of the program that can be reasoned about during compilation.
- Interpreter - As it sounds, the interpreter acts as a translator for code, turning it into machine code. A CPU executes every instruction given from the interpreter, as the interpreter proceeds to translate the next instruction.
- ByteCode - ByteCode is compiled from the source code, turning it into a lower-level language; this way, the language can be understood by a software interpreter. As stated by techterms, “It may be executed by a virtual machine (such as a JVM) or further compiled into machine code, which is recognized by the processor.”
- Run-Time Environment - These put in place portions of a particular execution model.
- Run Time Compiler - An implicit compilation or function compiler.
You may be asking, while this list is nice, what’s in it for me? Why should I even care about compilers and compiler terminology? Compilers are a key aspect to development, and at some point during a developer’s career, a compiler will most certainly be required. Useful not only as high-brow text translators, but also as a method of breaking down large, complex problems into smaller, less “ad-hoc” based solutions.
Here are some sources for even more robust compiler knowledge: