IS 310 ch10
What's the difference between a front-end CASE tool and a back-end CASE tool?
A front-end CASE tool is used mainly for system model development. A back-end CASE tool is used to generate source and executable code from a system model.
What is a link editor? What is a compiler library? How and why are they useful in program development?
A link editor is a program that converts object code into executable code. It does this by searching object code for unresolved references to subroutines.A library is a stored set of previously defined subroutines. Each subroutine is stored as object code ready to be linked with other object code.They are useful in the program by linking and library subroutine is simplicity in program compilation and flexibility in the generation of executable code. This reduces the complexity of the compiler's translation effort.
What are the main differences between OOP languages and traditional programming languages?
A traditional (or procedural) programming language treats data as a static entity to be passed between dynamic procedures. An OOP language encapsulates data in methods andallows access to it only by passing messages to methods. Object-oriented languages also promote code reusability and portability.
What components are normally part of an IDE? In what ways does an IDE improve programmer productivity?
A typical IDE includes an intelligent program editor, a compiler (or interpreter or both), alink editor, a class or subroutine library, an interactive tool for prototyping and defining user interfaces, and a symbolic debugger. It improves programmer productivity by automating repetitive tasks and streamlining others and provides a high degree of coordination and integration in component tools
RQ1: Describe the relationships between application development methodologies, models and tools:
Application development methodologies state the users' needs in general terms and translate that into a detailed implementation plan and into CPU instructions. System requirements and design models detail the requirements for system software and provide blueprints of software component construction. Automated tools help complete the software development work.
What types of programming language statements are likely to be translated into machineinstructions by a compiler? What types are likely to be translated into library calls?
Assignment statements, control structures, and computation operations are most likely to be translateddirectly into machine instructions. I/O operations are usually translated into library calls.Chapter 10Systems ArchitectureSolutions ManualFourth Edition4510.
Compare the generations and types of programming languages:
First-Generation Languages Earliest programming languages: CALLED MACHINE LANGUAGES Required programmers to remember binary codes that represented each CPU instruction and to specify all operands as binary numbers Tedious to program; error-prone -Second-Generation Languages Commonly known as an assembly language Use mnemonics to represent variables CPU instructions and data items Variable: program instruction memory address Label: data item memory address Easier to manipulate than binary numbers Assembler translates program into binary CPU instructions Common in 1950s Third-Generation Languages use mnemonics to represent instructions, variables,and labels and has a degree of instruction explosion higher than 1:1. The first #GL was FORTRAN. Later 3GLs include COBOL, BASIC,(interprater) PL/1, Pascal, and C.(p. 372) Fourth-Generation Languages developed in the 1970s and 1980s to address 3GL limitations 4GL's have:- much higher instruction explosion than in 3GLs -instructions or prewritten functions to implement interactive GUIs or relational databases-main surviving 4G languages are VISUAL BASIC AND SQL (Structure Query Language) Fifth-Generation Languages-nonprocedural language suitable for developing software that mimics human intelligence. LISP and PROLOG are examples Object-Oriented Programming Languages
What is the instruction explosion? What types of programming languages have the most instruction explosion? What types of programming languages have the least instructionexplosion?
Programming languages beyond the second generation enable programmers to specify many CPU actions with a single program instruction or statement. The one-to many (1:N) relationship between later-generation programming statements andthe CPU actions implementing them is called the instruction explosion. For example, if 1000 machine instructions result from translating a 20-statement program, the degree of instruction explosion can be stated as 50:1 ratio Programming languages differ in the degree of instructions explosion, and even with a language, different types of language vary in the degree of instruction explosion. In general, statements describing mathematical computation have low instruction explosion (10:1 or less), and statements describing I/O operations have high instruction explosion (100:1 or more)
Compare static and dynamic linking.
Static linking uses CPU cycles efficiently but is less efficient with primary storage. Because the links between modules are predefined, no searching for library routines takes place (which saves CPU cycles). Static is less vulnerable because everything is set up prior. Dynamic does its library searches on the fly which leaves it open to tampering. However, linked library routines might be stored redundantly by multiple running programs. Dynamic linking stores only a single copy of each library routine but requires a search procedure to link these routines to running programs as they're needed.
What are the shortcomings of 3GLs in meeting the requirements of modern applications?
The main shortcomings are limited or no support for GUI and database interaction and larger, more resource-intensive translation tools (a result of 3GL program translation being more complex than 2GL program translation)
What does a compiler do when it encounters data declarations in a source code file? Data(manipulation) operations? Control structures?
When a data declaration is encountered the compiler allocates storage to it and records its name, type, length, and memory address in the symbol table. When data manipulation operations are encountered the compiler generates code to implement the manipulation and code to move data among memory locations and registers as required. Control structures are translated into combinations of condition evaluation and branching instructions.
What is a CASE tool? What's the relationship between a CASE tool and a system development methodology?
computer aided software engineering. A CASE tool is a collection of programs that assist in application development. Typically,they help in defining and refining system models (front-end CASE tools) and/or generating source code from these models (back-end CASE tools). A CASE tool incorporates a development methodology to the extent that it supports defining, refining, and using specific modeling constructs. CASE tools are typically designed to support some form of structured or object-oriented system development methodology.
What is the difference among source code, object code and executable code?
programmers create the source code. In compiling the source code file we create the object file. the object file is an intermediate file and it's not runable. To run the program we must create an executable file. we create the executable file from object files Object code is produced when an interpreter or a compiler translates source code into recognizable and executable machine code. Object code is a set of instruction codes that is understood by a computer at the lowest hardware level. Object code is usually produced by a compiler that reads some higher level computer language source instructions and translates them into equivalent machine language instructions. ((((((maintenance goes up because you have to compile the program for each class of file. (1 for unix, intel, etc...) everytime one system change you must adjust you program accordingly.)))) compiler translates source code into object code, which is stored in object files. Object files contain object code that includes instructions to be executed by the computer. It should be noted that object files may require some intermediate processing by the operating system (OS) before the instructions contained in them are actually executed by the hardware.
Compare and contrast the execution of compiled programs to interpreted programs in terms ofCPU and memory utilization.
A compiled (and linked) program consists exclusively of machine instructions. While executing, theprogram has control of the hardware and only the instructions within the program (or those executed asresult of operating system service requests) are actually executed. The contents of memory area arelimited to the executing program and whatever system software may be present.The execution of an interpreted program requires that the interpreter itself be present in memory.Statements of the program source code are read, translated, and executed in an iterative fashion. Thus theexecution of each program statement requires the execution of both its corresponding machineinstructions and the instructions necessary to translate it into those machine instructions. Thus, executingan interpreted program requires more CPU cycles than executing an equivalent compiled program. Inaddition, more memory is generally required during execution due to the presence (in memory) of theinterpreter and all or part of its run-time library.
Compare assemblers, compilers, and interpreters.
A compiled program consists exclusivelyof machine instructions. While executing, the program has control of the hardware and only the instructions within the actually executed. The contents of memory area are limited to the executing program and whatever system software may be present.The execution of an interpreted program requires that the interpreter itself be present in memory. Statements of the program source code are read, translated, and executed in an iterative fashion. Thus the execution of each program statement requires the execution of both its corresponding machine instructions and the instructions necessary to translate it into those machine instructions memory areas are limited to the executing program and whatever system software may be present
Compare error detection and correction capabilities in interpreters and compilers.
A compiler's error-detection capabilities are limited to errors that can be detected in source code during translation. Diagnosing runtime errors is difficult because errors are reported only in terms of the memory addresses of error-generating instructions and data items. The correspondence between these addresses and the original source code has beenlost during compilation.In contrast, an interpreter's error-detection capabilities are generally quite sophisticated. Because the symbol table and source code are always available to the interpreter at runtime, an error can be reported in terms of the most recent source code line translated. Memory addresses can also be converted to source code names by looking them up in thesymbol table. Therefore, finding the error's source and correcting it are easier.