Home / which of the following is not a step in the process of translating a program? Which of the following is not a step in the process of translating a program? 29/03/2021 The Programming Process Computers execute not understand also huguy languages. In reality, at the lowest level, computers just understand also sequences of numbers that reexisting operational codes (op codes for short). On the various other hand, it would be incredibly tough for humans to create programs in regards to op codes. As such, programming langueras were designed to make it simpler for people to create computer system programs. Programming languages are for human beings to read and understand also. The regimen (source code) have to be analyzed into machine language so that the computer system can execute the program (as the computer just understands machine language). The means that this translation occurs relies on whether the programming language is a compiled language or an understood language. Compiled languperiods (e.g. C, C++) The complying with illustrates the programming procedure for a compiled programming language. A compiler takes the program code (resource code) and converts the resource code to a machine language module (referred to as an object file). Another specialized regime, referred to as a linker, combines this object file through other previously compiled object documents (in specific run-time modules) to produce an executable file. This process is diagrammed listed below. Click Initial build to view an animation of how the executable is developed. Click Run executable to simulate the running of an already created executable file. Click Rebuild to simulate restructure of the executable file. You watching: Which of the following is not a step in the process of translating a program? image/svg+xml executable file Initial build Run executable Rebuild So, for a compiled language the convariation from resource code to machine executable code takes place before the regimen is run. This is a very different process from what takes area for an taken programming language. This is somewhat simplified as many type of modern-day programs that are produced utilizing compiled languages makes use of dynamic connected libraries or mutual libraries. Thus, the executable file may need these dynamic linked libraries (Windows) or mutual libraries (Linux, Unix) to run. Interpreted programming languperiods (e.g. Python, Perl) The process is different for an understood language. Instead of translating the resource code right into machine language prior to the executable file is developed, an interpreter converts the source code into machine language at the exact same time the regimen runs. This is depicted below: Interpreted languages use a one-of-a-kind program referred to as an interpreter that converts the source code, combines via runtime libraries, and also executes the resulting machine instructions all throughout runtime. Unfavor a compiled language, tbelow is no precompiled program to run. The conversion process and combination via runtime libraries takes location eincredibly time an taken language regimen is run. This is why programs written in compiled langueras tend to run faster than similar programs composed in interpreted languages. Click Start to run the simulation of an understood program. Click Restart if you want to run the simulation aacquire. See more: _____ Are Normally Expressed In The Form Of Rules., Chapter 2 Review Flashcards image/svg+xml Start Restart Each time an interpreted program is run, the interpreter have to transform source code into machine code and additionally pull in the runtime libraries. This convariation procedure makes the routine run slower than a similar program written in a compiled language. Because an interpreter performs the conversion from source to machine language during the running of the regime, taken languages commonly result in programs that execute even more gradually than compiled programs. But what is often gained in rerevolve is that understood langueras are regularly platcreate independent because a various interpreter deserve to be used for each different operating device. And now for somepoint various ... Java The Java programming language does not fit right into either the compiled language or interpreted language models. This is depicted in the figure below. The Java compiler (javac) converts the resource code into bytecode. Bytecode is a kind of average machine language. This bytecode file (.course file) deserve to be run on any type of operating mechanism by making use of the Java interpreter (java) for that platform. The interpreter is referred to as a Virtual Machine. Thus, Java is an instance of a Virtual Machine programming language. Virtual machine languperiods were created to be a damage between compiled and taken langueras. Under right problems, online machine language programs run closer in rate to compiled language programs however have actually the platform indepency of interpreted language programs. Virtual machine languages makes usage of both a compiler and also an interpreter. The compiler converts the source code into a kind of average machine language. In Java, this average machine language is called bytecode. In Visual Studio.NET languages, this average machine language is dubbed MSIL (Microsoft Intermediate Language). (To store the discussion on this web page easier, this compiled code will be described generically as bytecode from this point on.) The interpreter for virtual machine languperiods is a one-of-a-kind routine that offers the runtime libraries for the given operating mechanism. That means that tbelow is a different digital machine interpreter for every one of the sustained operating devices. The way that online machine programming languages obtain some of the speed of compiled langueras is that the resource code is run via the compiler to create the bytecode. That convariation takes location prior to the routine is ever run. The method that digital machine languperiods acquire their portcapability (platform independence) is by having actually a different interpreter for each sustained operating mechanism. This interpreter ties in the correct runtime libraries for each various operating mechanism. The compiled bytecode is an average machine language that will certainly work without changes with any type of of the online machine interpreters for that language. This procedure is portrayed next. We have actually a compiler that converts the source code into bytecode. This deserve to be simulated by clicking on the Compile button. Once the bytecode has actually been produced, that exact same bytecode deserve to be supplied without any kind of alters on any kind of operating device that has actually a digital machine interpreter for the programming language. Keep in mind that each of the virtual machine interpreters have different runtime library code, bereason each operating device has different runtime libraries. This is exactly how the online machine language gets roughly platdevelop dependency problems. Click Run Windows, Run Mac OSX or Run Linux to simulate running the regime on any of those operating units. See more: Changing Attitudes By Changing Behavior image/svg+xml Compile Run Windows Run Mac OSX Run Linux Once again, note that the bytecode does not need to be recompicaused run on any type of of the various operating units. The just reason to recompile a routine is if you changed the resource code. Hopetotally, you deserve to see exactly how online machine language programs will have actually better performance than construed language programs. The virtual machine languperiods convert the resource code to an average machine code before the regime is ever run. Virtual machine languperiods do not rather complement the performance of compiled languages bereason the bytecode still hregarding be loaded by the digital machine before running. Details of the Java programming process The source code for a Java routine is a text file that ends in ".java". Suppose you typed out the complying with file, "Hello.java". course Hello public static void main(String<> args) System.out.println("Hello"); To compile this routine, you would kind the following at the command also line: javac Hello.java The Java compiler is named javac. The javac regimen is distinctive in that it does not develop actual machine code. Instead it produces something called bytecode. Unfavor machine code, bytecode is not platdevelop specific. The bytecode produced on a Windows machine is the same bytecode that is developed on a Linux machine. This suggests that the bytecode deserve to be run (without recompiling) on any platdevelop that has actually a Java interpreter. If the compilation into bytecode is effective, the bytecode will be had in a paper dubbed "Hello.class" is developed. To run this bytecode, the Java interpreter is invoked in the following way. java Hello Keep in mind the name of the Java interpreter is java. Also note that you do not encompass the .class at the end of the filename when invoking the interpreter. By default, the .course file is produced in the very same magazine as the magazine you are running the compiler from. Programming tip At this point, one of the finest means to make progress in Java programming is to take a routine that functions and intentionally introduce errors in the resource code. This will certainly help you to start recognizing how the compiler reports the various kinds of errors. For instance, try the following: Remove the semicolon at the finish of a statement. Remove the right curly brace at the end of a block. Add an extra left curly brace just before the start of a block. Misspell the word primary. The primary approach marks the starting suggest of the program. When the error is reported, take note of the area of the error that the compiler reports. As you will see, the line that the compiler points to as having actually the error may not be the actual line the error occurs on.