Sunteți pe pagina 1din 2

1 UPEI CS262 Winter 2019 Cezar Câmpeanu 2 UPEI CS262 Winter 2019 Cezar Câmpeanu

Language Evaluation Criteria

• Readability
1. Overall Simplicity
Language Evaluation 2. Orthogonality
3. Control Statements
Outline and Reading 4. Data types and Structures
• Chapter 1 (§1.3 –§1.8) 5. Syntax considerations
• Writability
1. Simplicity and Orthogonality
2. Support for abstraction
3. Expressivity

Language Evaluation Language Evaluation

3 UPEI CS262 Winter 2019 Cezar Câmpeanu 4 UPEI CS262 Winter 2019 Cezar Câmpeanu

Language Evaluation
Language Evaluation
• Reliability
• Readability = the easy with which programs can be read and 1. Type Checking
understood. 2. Exception Handling
• Orthogonality = relatively small set of primitive constructs can be 3. Aliasing
combined in a relatively small number of ways to build the control and 4. Readability and Writability
data structures of the language. The lack of orthogonality leads to
exceptions to the rules of the language. • Reliability = it performs to its specifications under all conditions.

• Writability = measure of how easily a language can be used to create • Type checking = testing for type errors in a given program
programs for a chosen problem domain. • Exception handling = The ability of a program to intercept runtime
• Abstraction = ability to define and then use complicated structures or errors, take corrective measures and than continue.
operations in ways that allow many of the details to be ignored. • Aliasing = Having two or more distinct referencing methods or names
for the same memory cell.

Language Evaluation Language Evaluation


5 UPEI CS262 Winter 2019 Cezar Câmpeanu 6 UPEI CS262 Winter 2019 Cezar Câmpeanu

✬ ✩
Language Evaluation

✬ ✩
Fortran C++ LISP
Compiler Compiler Interpreter

✬ ✩
Operating
• Costs System
C Operating

✗✔
Compiler System
1. Costs of training programmers Macroinstruction
Interpreter
Command
Interpreter
Ada
2. Costs of writing programs Compiler Bare

✖✕
Machine Assembler

3. Costs of compiling programs


4. Costs of executing programs ✫ ✪
5. Costs of implementation ✫ ✪
...
6. Costs of poor reliability
7. Costs of maintaining programs. ✫ ✪

Language Evaluation Language Evaluation

7 UPEI CS262 Winter 2019 Cezar Câmpeanu 8 UPEI CS262 Winter 2019 Cezar Câmpeanu

✓ ✏
Compilation vs Interpretation

✒ ✑
Source
program

• Compiled programs are faster (10 to 100 times faster).



Lexical
• Interpreted programs are easily implemented, but they require more Analizer

space. Lexical Units



Syntax
Analyzer
• Interpreters allow easy implementation of many source-level debugging
Parse Trees
operations. ❄ ❄ ❄
Symbol
Table
Intermediate
Code generator
✲ Optimization


Intermediate Code

Stages for a program:
✲ Code
Generator

Machine Language

• source code ❄ Input Data


Computer

• binary code (relative addresses)

Results

• executable code

Language Evaluation Language Evaluation

S-ar putea să vă placă și