Download presentation
Presentation is loading. Please wait.
1
Reasons To Study Programming Languages
Increased capacity to express programming concepts Improved background for choosing appropriate languages Increased ability to learn new languages Understanding the significance of implementation
2
Programming Domains Scientific applications Business applications
Artificial intelligence Systems programming Scripting languages Special purpose languages
3
Language Evaluation Criteria: Readability
Considered to be the most important criteria Factors Overall simplicity Too many features is bad Multiplicity (more than one way to accomplish a particular operation) of features is bad
4
Language Evaluation Criteria: Readability
Factors: Orthogonality (Orthogonality refers to the ability of a certain language feature to function the same in different contexts) Makes the language easy to learn and read Meaning is context independent
5
Language Evaluation Criteria: Readability
Factors: Control statements remember goto’s? Data type and structures boolean as an int Syntax considerations Length of identifiers, reserved words
6
Language Evaluation Criteria: Writability
Factors: Simplicity and orthogonality Smaller and more context free is generally better Support for abstraction Ability to define your own data types and operations Expressivity
7
Language Evaluation Criteria: Reliability
Factors: Type checking Compile Time versus Run Time Exception handling Aliasing Can be dangerous Readability and writability
8
Language Evaluation Criteria: Cost
Categories: Programmer training Software creation Compilation Execution Compiler cost Poor reliability Maintenance
9
Language Evaluation Criteria: Other
Portability Generality Well-definedness
10
Von Neumann Architecture
Data and Instructions are stored in the RAM Instructions must be transferred from the RAM to the CPU Results of the computation must be moved back from the CPU to RAM Regardless of how fast CPU gets the speed of the program is very heavily influenced by the speed of the I/O system (system bus)
11
Primary Influences On Language Design
Computer architecture We use imperative languages, at least in part, because we use von Neumann machines Programming methodologies 1950s and early 1960s: Simple applications; worry about machine efficiency Late 1960s: People efficiency became important; readability, better control structures Late 1970s: Data abstraction Middle 1980s: Object-oriented programming
12
Language Categories Imperative
Relies on state changes to accomplish results Most common categories are procedural and object-oriented Functional Applying functions to the parameters Logic Uses set of rules to get the results
13
Language Design Trade-Offs
Reliability versus cost of execution Writability versus readability Flexibility versus safety
14
Implementation Methods
Compilation Translate high-level program to machine code Slow translation Fast execution Pure interpretation No translation Slow execution
15
Implementation Methods
Hybrid implementation systems Small translation cost Medium execution speed Ex. Java source code is being first compiled into the bytecode, which can be thought as a machine-independent assembly language. The JVM interprets the bytecode similarly to the way CPU interprets machine language instructions. Many techniques exist to optimize the execution of the bytecode including JIT and HotSpot
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.