Fundamentals of Programming Languages. PL quality factors Lecture 01 sl. dr. ing. Ciprian-Bogdan Chirila

Similar documents
Fundamentals of Programming Languages. Data Types Lecture 07 sl. dr. ing. Ciprian-Bogdan Chirila

CS112 Lecture: Primitive Types, Operators, Strings

Programming Languages, Summary CSC419; Odelia Schwartz

Lecture 13: Object orientation. Object oriented programming. Introduction. Object oriented programming. OO and ADT:s. Introduction

Introduction to Syntax Analysis. Compiler Design Syntax Analysis s.l. dr. ing. Ciprian-Bogdan Chirila

Grade Weights. Language Design and Overview of COOL. CS143 Lecture 2. Programming Language Economics 101. Lecture Outline

Programming Paradigms

Sub- PPL Unit-I Class-SE Comp

What is Software Architecture

Lecture 06 Tabu Search

CPS122 Lecture: From Python to Java last revised January 4, Objectives:

CS508-Modern Programming Solved MCQ(S) From Midterm Papers (1 TO 22 Lectures) BY Arslan

Chapter 5 Names, Binding, Type Checking and Scopes

Chapter 11. Categories of languages that support OOP: 1. OOP support is added to an existing language

Programming Languages

The architecture of Eiffel software 3.1 OVERVIEW classes clusters systems

Question No: 1 ( Marks: 1 ) - Please choose one One difference LISP and PROLOG is. AI Puzzle Game All f the given

Compiler Construction

Draw a diagram of an empty circular queue and describe it to the reader.

Programming Languages Third Edition. Chapter 7 Basic Semantics

NOTE: Answer ANY FOUR of the following 6 sections:

Compiler Construction

UNIT 3

8/27/17. CS-3304 Introduction. What will you learn? Semester Outline. Websites INTRODUCTION TO PROGRAMMING LANGUAGES

Operational Semantics. One-Slide Summary. Lecture Outline

! Those values must be stored somewhere! Therefore, variables must somehow be bound. ! How?

PC204. Lecture 5 Programming Methodologies. Copyright 2000 by Conrad Huang and the Regents of the University of California. All rights reserved.

A Fast Review of C Essentials Part I

Software Architecture Bertrand Meyer. Lecture 3: Language constructs for modularity and information hiding

CSC 533: Organization of Programming Languages. Spring 2005

Software Development. Modular Design and Algorithm Analysis

ITC213: STRUCTURED PROGRAMMING. Bhaskar Shrestha National College of Computer Studies Tribhuvan University

Features of C. Portable Procedural / Modular Structured Language Statically typed Middle level language

Compiler Construction

Programming in C++ 6. Floating point data types

Concepts of Programming Languages

Real-Time and Embedded Systems (M) Lecture 19

Lecturer: Sebastian Coope Ashton Building, Room G.18

Topic I. Introduction and motivation References: Chapter 1 of Concepts in programming languages by J. C. Mitchell. CUP, 2003.

Introduction. A. Bellaachia Page: 1

Chapter 2 Basic Elements of C++

Lecture Outline. COOL operational semantics. Operational Semantics of Cool. Motivation. Lecture 13. Notation. The rules. Evaluation Rules So Far

OBJECT ORIENTED PROGRAMMING USING C++ CSCI Object Oriented Analysis and Design By Manali Torpe

Types. What is a type?

COMP-421 Compiler Design. Presented by Dr Ioanna Dionysiou

Slide 1 Welcome to Fundamentals of Health Workflow Process Analysis and Redesign: Process Mapping: Entity-Relationship Diagrams. This is Lecture e.

Fundamentals of Programming

Principles of Programming Languages. Lecture Outline

PRINCIPLES OF COMPILER DESIGN UNIT I INTRODUCTION TO COMPILERS

Imperative Programming

0. Overview of this standard Design entities and configurations... 5

Course "Softwaretechnik" Book Chapter 2 Modeling with UML

9/7/17. Outline. Name, Scope and Binding. Names. Introduction. Names (continued) Names (continued) In Text: Chapter 5

MIT Semantic Analysis. Martin Rinard Laboratory for Computer Science Massachusetts Institute of Technology

Introduction to Programming Languages and Compilers. CS164 11:00-12:30 TT 10 Evans. UPRM ICOM 4029 (Adapted from: Prof. Necula UCB CS 164)

VHDL Basics. Mehdi Modarressi. Department of Electrical and Computer Engineering, University of Tehran. ECE381(CAD), Lecture 4:

Exception Handling Interfaces, Implementations, and Evaluation

Floating Point. CSE 351 Autumn Instructor: Justin Hsia

Compiler Construction

Compiler Construction

Using SCADE to Develop Mission-critical High-quality Radar Application Software

Concept as a Generalization of Class and Principles of the Concept-Oriented Programming

Managing Change and Complexity

Anatomy of a Compiler. Overview of Semantic Analysis. The Compiler So Far. Why a Separate Semantic Analysis?

2/12/17. Goals of this Lecture. Historical context Princeton University Computer Science 217: Introduction to Programming Systems

Chapter 5. Names, Bindings, and Scopes

Chapter 5 Names, Bindings, Type Checking, and Scopes

Sardar Vallabhbhai Patel Institute of Technology (SVIT), Vasad M.C.A. Department COSMOS LECTURE SERIES ( ) (ODD) Code Optimization

08/05/2013. Surfing Ada for ESP. C. Montangero Dipartimento d Informatica Corso di ESperienze di Programmazione a.a. 2012/13

Towards Programs Logic Based Representation Driven by Grammar and Conforming to a Metamodel

IPCoreL. Phillip Duane Douglas, Jr. 11/3/2010

Floating Point. CSE 351 Autumn Instructor: Justin Hsia

Programming. Dr Ben Dudson University of York

Towards Reengineering: An Approach Based on Reverse Inheritance. Application to Java

CSE 452: Programming Languages. Outline of Today s Lecture. Expressions. Expressions and Control Flow

Programming Fundamentals (CS 302 ) Dr. Ihsan Ullah. Lecturer Department of Computer Science & IT University of Balochistan

CPS122 Lecture: From Python to Java

OBJECT ORIENTED PROGRAMMING. Abstract Class And Interface

Extending SystemVerilog Data Types to Nets

Object-Oriented Software Engineering Practical Software Development using UML and Java

CSI33 Data Structures

Princeton University Computer Science 217: Introduction to Programming Systems The C Programming Language Part 1

CPS 506 Comparative Programming Languages. Programming Language

Compiler Construction

Object Orientated Analysis and Design. Benjamin Kenwright

Weiss Chapter 1 terminology (parenthesized numbers are page numbers)

Language Fundamentals

Domain-Driven Development with Ontologies and Aspects

Contents. Slide Set 1. About these slides. Outline of Slide Set 1. Typographical conventions: Italics. Typographical conventions. About these slides

Programmiersprachen (Programming Languages)

Chapter 2 Working with Data Types and Operators

Learning Objectives. C++ For Artists 2003 Rick Miller All Rights Reserved xli

The Analysis and Design of the Object-oriented System Li Xin 1, a

Object-Oriented Languages and Object-Oriented Design. Ghezzi&Jazayeri: OO Languages 1

Organization of Programming Languages (CSE452) Why are there so many programming languages? What makes a language successful?

Lecture 13: Introduction to inheritance and genericity

CO212 Lecture 10: Arithmetic & Logical Unit

Facet Folders: Flexible Filter Hierarchies with Faceted Metadata

Design issues for objectoriented. languages. Objects-only "pure" language vs mixed. Are subclasses subtypes of the superclass?

COS 320. Compiling Techniques

Transcription:

Fundamentals of Programming Languages PL quality factors Lecture 01 sl. dr. ing. Ciprian-Bogdan Chirila

Lecture and lab Ciprian-Bogdan Chirila PhD Senior lecturer PhD UPT + Univ. Nice Sophia Antipolis, Univ Jyvaskyla, Finland + Univ. Bonn, Germany Reverse inheritance in Eiffel chirila@cs.upt.ro http://www.cs.upt.ro/~chirila Lab Mirella Mioc mmioc@cs.upt.ro

Lecture outline (1) Programming languages Definition and implementation of programming languages Program entity attributes Parameter transmission Generic subprograms

Lecture outline (2) Data types Abstract data types Object-oriented programming languages Control structures

Programming Language Programming language (PL) formal notation specifying several operations to be executed (by a computer) Many programming languages exist today Few are used on a large scale in writing nowadays programs

The place of the PL in the software development process A complex software product is developed usually in 5 steps or phases: Requirements analysis and specification Software design and specifications Implementation Validation Maintenance

Phase 1: Requirements analysis and specification During the analysis the user needs are concentrated in a series of requests The result of this phase is a document describing WHAT the system must do There nothing said about HOW it will be done The final evaluation of the software product will refer the requirements set in this phase

Phase 2: Software design and specifications Using the requests the software system will be designed accordingly In this phase we do The project specification Module definitions Interface definitions

Phase 3: Implementation Is done according to the specification The PL is chosen to be the most suitable for the system context Several criteria are taken into account How much the programmer knows the PL How much the PL features are suitable to the requirements What features offer the IDE (Integrated Development Environment) for coding and testing What execution speed performances are reached by the compiled system in the selected PL

Phase 4: Validation Is done in each phase of the development process It means checking whether the system respects the requirements Intense testing process Using multiple data sets Reaching all program branches Creating extreme conditions

Phase 5: Maintenance After deployment errors may occur Fixing is needed Possible causes Undiscovered errors in the validation phase Extending the program with new features Optimizing parts of the programs leading to better performance Hardware or software platform changes

The place of the PL Where is its impact? Directly in phase 3 in the implementation phase Interacts with all other development tools Is involved in all the other phases

The place of the PL Some PL properties may affect validation maintenance design E.g Information hiding as design method and language facility in describing abstract data Information hiding involves: Decomposing the system in modules Modules must have interfaces (sets of functions) The access to the modules is made only through the interfaces Modules internal structure is not visible from the outside Programing languages supporting these facilities are object oriented programing languages (OOPLs)

Criteria for evaluating a PL the PL is not an end in itself the PL must allow creating in an efficient way quality software In order to define a good PL we must define a good software system The three basic quality factors we consider are: reliability maintainability efficiency

The three quality factors Reliability Correct functioning of the system even in the presence of software and hardware incidents Maintainability The capability of including new features or upgrading the existing ones Efficiency It means offering optimal services in the context of existing resources

Other factors Design methods IDE (Integrated Development Environment) tools Algorithms Human factors and last but not least. the PL!!!

PL qualities Consistency with the usual notation Readability Exception handling Automatic formal checking and error detection Orthogonality Uniformity The facility of creating large programs Portability Efficiency

Consistency with the usual notation The notation used in programming must be close to the usual notation Scientific Technical Economical etc. The programmer can focus on program semantics for solving the problem and not on notation issues Less errors Greater productivity

Readability The program must be read easily Its logic must be deducible from the context Important when programmers modify the code of other programmers For increased readability the PL must have Identifiers Expressive keywords Software decomposition facilities

Exception handling Important for creating reliable programs Program sequences can be specified which will be activated when exceptional phenomena occur arithmetic overflow, underflow etc Thus, program behavior becomes predictable

Automatic formal checking and error detection PL definition must allow detecting errors at compile time as much as possible Useful redundancy imposed by the majority of modern PLs The same information (implicit or explicit) is specified in multiple places of the program is verified at compile time

Compile time checking An entity must be first declared and then referred or used Type correspondences between Operands Operands and operators Left hand side and right hand side of an assignment, etc Type correspondence between actual and formal parameters Respecting visibility rules: Domain rules Import and export rules of entities between modules Abstract types Objects

Compile type checking can not detect program logic or semantic mistakes can not guarantee that a fully compiled program function according to imposed specifications

Formal checking of programs There are methods of checking the program logic in an automated manner Formal description of specifications PL semantic definition according to a formalism compatible with the formal checking method Building the semantic of the checked program based on the PL semantic Tools implementation for checking the matching between the specification and the semantics of the program

Orthogonality The language must be defined on basic facilities Facilities must be able to be freely combined With predictable effects With no restrictions e.g. lack of orthogonality in Pascal functions can not be members in a structured type

Uniformity Similar constructions have similar semantics e.g. lack of uniformity in C for the static keyword Used in a function static refers to memory allocation (opposed to automatic) Used outside a function influences visibility

The facility of creating large programs Program modularization Component hierarchy Main facilities Abstract types Modules Separate compiling objects

Portability Moving a program from a computer to another without modifications with small modifications The goal of machine independence is impossible to achieve Some PLs allow a close approach Problems: Different lengths for the computer word Different floating point representation conventions Different input-output operations

Efficiency From the point of view of compilation The PL must be defined as such in order to facilitate the creation of fast compilers object program Declaring variables and their types Expression type inference at compile time Strong typing like in Pascal