Chair of Software Engineering OOSC - Summer Semester 2005 1 Object-Oriented Software Construction Bertrand Meyer Lecture 5: Project and EiffelStudio Presentation.

Slides:



Advertisements
Similar presentations
Building Bug-Free O-O Software: An Introduction to Design By Contract A presentation about Design By Contract and the Eiffel software development tool.
Advertisements

Introduction to Visual Basic.NET Uploaded By: M.Sheraz anjum.
Chair of Software Engineering Concurrent Object-Oriented Programming Prof. Dr. Bertrand Meyer Exercise Session 1: Eiffel Introduction.
Chair of Software Engineering OOSC - Summer Semester Object-Oriented Software Construction Bertrand Meyer Lecture 3: Abstract Data Types.
Chair of Software Engineering OOSC - Summer Semester Object-Oriented Software Construction Bertrand Meyer.
The Web Warrior Guide to Web Design Technologies
Chair of Software Engineering Constants, once routines, and helper functions these slides contain advanced material and are optional.
1 Design by Contract Building Reliable Software. 2 Software Correctness Correctness is a relative notion  A program is correct with respect to its specification.
Design by Contract ™. 2 Design by Contract A discipline of analysis, design, implementation, management.
Software Engineering and Design Principles Chapter 1.
Lecture Roger Sutton CO331 Visual programming 15: Debugging 1.
Chair of Software Engineering OOSC - Summer Semester Object-Oriented Software Construction Bertrand Meyer.
1 Advanced Material The following slides contain advanced material and are optional.
Chair of Software Engineering OOSC - Summer Semester Object-Oriented Software Construction Bertrand Meyer Lecture 10: Project Presentation Ilinca.
Chair of Software Engineering ATOT - Lecture 12, 12 May Advanced Topics in Object Technology Bertrand Meyer.
Chair of Software Engineering Einführung in die Programmierung Introduction to Programming Prof. Dr. Bertrand Meyer Lecture 6: Object Creation.
Chair of Software Engineering Einführung in die Programmierung Introduction to Programming Prof. Dr. Bertrand Meyer Exercise Session 2.
Chair of Software Engineering 1 Introduction to Programming Bertrand Meyer Exercise Session 3 29 September 2008.
The IDE (Integrated Development Environment) provides a DEBUGGER for locating and correcting errors in program logic (logic errors not syntax errors) The.
Chair of Software Engineering Einführung in die Programmierung Introduction to Programming Prof. Dr. Bertrand Meyer Lecture 4: The Interface of a Class.
Fall 2007CS 2251 Programming Tools Eclipse JUnit Testing make and ant.
Chair of Software Engineering OOSC - Summer Semester Object-Oriented Software Construction Bertrand Meyer Lecture 12: Design by Contract™
Chair of Software Engineering OOSC - Summer Semester Object-Oriented Software Construction Bertrand Meyer.
1 Chapter 4 The Fundamentals of VBA, Macros, and Command Bars.
Chair of Software Engineering Einführung in die Programmierung Introduction to Programming Prof. Dr. Bertrand Meyer Lecture 4: The Interface of a Class.
Chair of Software Engineering OOSC - Summer Semester Object-Oriented Software Construction Bertrand Meyer.
Chair of Software Engineering Concurrent Object-Oriented Programming Prof. Dr. Bertrand Meyer Lecture 9: Contracts and Inheritance (based on work with.
Chair of Software Engineering OOSC - Summer Semester Object-Oriented Software Construction Bertrand Meyer Lecture 14: Presentation of EiffelStudio.
Chair of Software Engineering ATOT - Lecture 11, 7 May Advanced Topics in Object Technology Bertrand Meyer.
Chair of Software Engineering ATOT - Lecture 2, 2 April Advanced Topics in Object Technology Bertrand Meyer.
Chair of Software Engineering Einführung in die Programmierung Introduction to Programming Prof. Dr. Bertrand Meyer Lecture 6: Object Creation.
Chapter 1 Principles of Programming and Software Engineering.
Chair of Software Engineering Automatic Verification of Computer Programs.
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
Eiffel Language and Design by Contract Contract –An agreement between the client and the supplier Characteristics –Expects some benefits and is prepared.
Chapter 2: The Visual Studio.NET Development Environment Visual Basic.NET Programming: From Problem Analysis to Program Design.
© 2006 Pearson Addison-Wesley. All rights reserved2-1 Chapter 2 Principles of Programming & Software Engineering.
Chapter 9 Introduction to ActionScript 3.0. Chapter 9 Lessons 1.Understand ActionScript Work with instances of movie clip symbols 3.Use code snippets.
Python quick start guide
Ranga Rodrigo. Class is central to object oriented programming.
1 Chapter One A First Program Using C#. 2 Objectives Learn about programming tasks Learn object-oriented programming concepts Learn about the C# programming.
A First Program Using C#
Chapter 11: Introduction to the Visual Basic Environment Spreadsheet-Based Decision Support Systems Prof. Name Position (123) University.
Chair of Software Engineering Einführung in die Programmierung Introduction to Programming Prof. Dr. Bertrand Meyer Exercise Session 2.
Automating Database Processing Chapter 6. Chapter Introduction Design and implement user-friendly menu – Called navigation form Macros – Automate repetitive.
Tutorial 111 The Visual Studio.NET Environment The major differences between Visual Basic 6.0 and Visual Basic.NET are the latter’s support for true object-oriented.
Chapter One An Introduction to Visual Basic 2010 Programming with Microsoft Visual Basic th Edition.
3 Copyright © 2004, Oracle. All rights reserved. Working in the Forms Developer Environment.
© 2006 Pearson Addison-Wesley. All rights reserved2-1 Chapter 2 Principles of Programming & Software Engineering.
90-723: Data Structures and Algorithms for Information Processing Copyright © 1999, Carnegie Mellon. All Rights Reserved. 1 Lecture 1: Introduction Data.
© 2006 Pearson Addison-Wesley. All rights reserved 2-1 Chapter 2 Principles of Programming & Software Engineering.
INSERT BOOK COVER 1Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall. Exploring Getting Started with VBA for Microsoft Office 2010 by.
ANU COMP2110 Software Design in 2003 Lecture 10Slide 1 COMP2110 Software Design in 2004 Lecture 12 Documenting Detailed Design How to write down detailed.
1 Assertions. 2 A boolean expression or predicate that evaluates to true or false in every state In a program they express constraints on the state that.
Object-Oriented Application Development Using VB.NET 1 Chapter 2 The Visual Studio.NET Development Environment.
15 Copyright © 2004, Oracle. All rights reserved. Debugging Triggers.
DBC NOTES. Design By Contract l A contract carries mutual obligations and benefits. l The client should only call a routine when the routine’s pre-condition.
Object Design More Design Patterns Object Constraint Language Object Design Specifying Interfaces Review Exam 2 CEN 4010 Class 18 – 11/03.
© Bertrand Meyer and Yishai Feldman Notice Some of the material is taken from Object-Oriented Software Construction, 2nd edition, by Bertrand Meyer (Prentice.
Principles of Programming & Software Engineering
Working in the Forms Developer Environment
Design by Contract Jim Fawcett CSE784 – Software Studio
Design by Contract Jim Fawcett CSE784 – Software Studio
Topics: jGRASP editor ideosyncrasies assert debugger.
Principles of Programming and Software Engineering
Microsoft Access Illustrated
Important terms Black-box testing White-box testing Regression testing
Important terms Black-box testing White-box testing Regression testing
DEBUGGING JAVA PROGRAMS USING ECLIPSE DEBUGGER
Einführung in die Programmierung Introduction to Programming Prof. Dr
Presentation transcript:

Chair of Software Engineering OOSC - Summer Semester Object-Oriented Software Construction Bertrand Meyer Lecture 5: Project and EiffelStudio Presentation

Chair of Software Engineering OOSC - Summer Semester Agenda for today  Project presentation  EiffelStudio: The ISE Eiffel environment

Chair of Software Engineering OOSC - Summer Semester Agenda for today  Project presentation  EiffelStudio: The ISE Eiffel environment

Chair of Software Engineering OOSC - Summer Semester Organizational matters  Project deadline: 30 June 2005 (last day of the semester)  You will work on the project in groups of 2  Project specification available at: t/Project_Specification.pdf

Chair of Software Engineering OOSC - Summer Semester Overview  The project has 2 parts:  Object Spyglass  Testing framework  Testing framework is a client of the Spyglass  Spyglass must:  Expose its functionality through an interface  Remain independent of client implementation Object SpyglassTesting Framework

Chair of Software Engineering OOSC - Summer Semester Object Spyglass (1)  This snapshot will contain:  The Current object  The arguments of the routine whose execution was interrupted  Any objects reachable from these (through attributes)  Main task: display a snapshot of the state of a running Eiffel system at a particular point of its execution

Chair of Software Engineering OOSC - Summer Semester  Additional functionality:  Allow the user to navigate the object structure by expanding and collapsing object fields  Desirable features:  The ability to store user preferences about the layout of objects  Heuristics to apply these preferences to subsequent runs of the system Object Spyglass (2)

Chair of Software Engineering OOSC - Summer Semester Contracts in Eiffel  In the Eiffel method, contracts are:  Routine preconditions – properties that must hold whenever the routine is called  Routine postconditions – properties that the routine guarantees when it returns  Class invariants – properties that the instances of a class satisfy at all “stable” times  Loop variants and invariants – loop correctness constructs  check instructions – express the software writer’s conviction that a certain property will be satisfied at certain stages of the computation  Contracts are expressed with assertions (boolean expressions + old notation)

Chair of Software Engineering OOSC - Summer Semester  Relies on contract violations to signal bugs  The Spyglass helps the user understand the cause of the bug by displaying the system state when the execution of the routine (where the contract violation occurred) started Testing framework

Chair of Software Engineering OOSC - Summer Semester Testing framework - Functionality  Allows users to  Specify where the test code is located  Execute it  When an assertion violation occurs:  Displays the type of the assertion  Displays the routine where the violation occurred  Calls the Object Spyglass to display the state of the system when the execution of the routine started

Chair of Software Engineering OOSC - Summer Semester Example – System under test (1) class EMPLOYEE … feature -- Basic operation receive_salary (sum: INTEGER) is -- Deposit `sum' in the employee's account -- after deducing taxes from it. require sum_positive: sum > 0 do salary_account.deposit (sum - tax (sum)) end tax (sum: INTEGER): DOUBLE is -- Taxes that the employee pays for `sum'. require sum_positive: sum > 0 local pension, health_insurance: DOUBLE do pension := 0.1 * sum health_insurance := Health insurance premium is coded as a constant! Result := pension + health_insurance ensure tax_positive: Result >= 0 tax_less_than_sum: Result <= sum end … end A user wants to test this procedure

Chair of Software Engineering OOSC - Summer Semester Example – Test code class ROOT_CLASS create make feature {NONE} -- Initialization make is -- Creation procedure local an_account: ACCOUNT an_employee: EMPLOYEE do -- Test case 1 create an_account.make (0) create an_employee.make (an_account) an_employee.receive_salary (1000) -- Test case 2 create an_account.make (0) create an_employee.make (an_account) an_employee.receive_salary (100) end OK Postcondition of tax vilolated

Chair of Software Engineering OOSC - Summer Semester Example – What the system should do  Allow the user to:  Specify that the test code is located in procedure make of class ROOT_CLASS  Run it  When the postcondition violation occurs:  Stop execution  Inform the user about postcondition violation  Display the state of the system when the execution of routine tax started Testing frame- work Object Spyglass

Chair of Software Engineering OOSC - Summer Semester Required tasks  Develop:  Object Spyglass  Testing framework  You decide on:  How you display objects in Spyglass  What user preferences regarding the display you store  How you use these preferences

Chair of Software Engineering OOSC - Summer Semester What you must deliver  Project code  Requirements document  Documentation:  User guide - how to use the tool  Developer guide - description of the architecture, main classes, limitations, how to extend the tool

Chair of Software Engineering OOSC - Summer Semester Grading criteria 1.Correctness  Conformance to the specification provided by us  Conformance to the requirements document that you deliver 2.Design  Interfaces between modules  Extendibility  Use of design patterns (if applicable) 3.Quality of contracts 4.Quality of code  Easy to understand  Style guidelines 5.Testing (delivery of a test suite) 6.Documentation  Requirements document  User guide  Developer guide

Chair of Software Engineering OOSC - Summer Semester  Project presentation  EiffelStudio: The ISE Eiffel environment Agenda for today

Chair of Software Engineering OOSC - Summer Semester EiffelStudio  Introduction to the IDE  The Diagram Tool  Debugging  Demo

Chair of Software Engineering OOSC - Summer Semester Material available online  Guided tour: ion.pdf

Chair of Software Engineering OOSC - Summer Semester EiffelStudio  Introduction to the IDE  The Diagram Tool  Debugging  Demo

Chair of Software Engineering OOSC - Summer Semester Introduction to the IDE  One development window divided into four panels:  Editor  Context tool  Clusters pane  Features pane + Search and Favorites  Toolbar customization  Pick-and-drop mechanism

Chair of Software Engineering OOSC - Summer Semester The editor  Syntax highlighting  Syntax completion (CTRL+Space)  Class name completion (SHIFT+CTRL+Space)  Smart indenting  Block indent or exdent  Block commenting or uncommenting  Infinite level of Undo/Redo (reset after a save)  Quick search features (F3 and SHIFT+F3)

Chair of Software Engineering OOSC - Summer Semester The compiler  Uses incremental compilation  Supports.NET  Project Settings Tool

Chair of Software Engineering OOSC - Summer Semester EiffelStudio  Introduction to the IDE  The Diagram Tool  Debugging  Demo

Chair of Software Engineering OOSC - Summer Semester  Class types:  Cluster: A quick run through BON * DEFERRE D + EFFECTIV E ● PERSISTEN T ▲ INTERFACE D REUSED ROOT_CLASS ROOT_CLUSTER ▲ INTERFACED

Chair of Software Engineering OOSC - Summer Semester A quick run through BON (cont’d)  Inheritance link:  Client links: + EFFECTIV E * DEFERRE D ROOT_CLASS REUSED ROOT_CLASS REUSED f expanded_f

Chair of Software Engineering OOSC - Summer Semester The Diagram tool  Provides “Real time” roundtrip reverse engineering  Synchronized at each compilation  Allows for different views

Chair of Software Engineering OOSC - Summer Semester EiffelStudio  Introduction to the IDE  The Diagram Tool  Debugging  Demo

Chair of Software Engineering OOSC - Summer Semester Getting started with the debugger  The system must be melted/frozen (finalized systems cannot be debugged)  Use the Project Settings Tool to specify command line arguments  Click the launch button

Chair of Software Engineering OOSC - Summer Semester Setting breakpoints  Use the flat formats to add breakpoints  Tip: An efficient way of adding breakpoints consists in dropping a feature in the context tool  Click in the margin to enable/disable single breakpoints  Use the toolbar debug buttons to enable or disable all breakpoints globally

Chair of Software Engineering OOSC - Summer Semester Running the application  New display of the Development Window to include debugging information about:  The current object (Object Tool)  The arguments to the function being debugged (local variables)  Possibility to control the number of elements the debugger displays for special objects (Arrays, Strings)  Once on a breakpoint: possibility to step over / into / out next statement  Possibility to interrupt the application at anytime (Pause Application button or SHIFT+CTRL+F5)

Chair of Software Engineering OOSC - Summer Semester EiffelStudio  Introduction to the IDE  The Diagram Tool  Debugging  Demo

Chair of Software Engineering OOSC - Summer Semester End of lecture 5