object-oriented software construction

27
OOSC - Summer Semester 2005 1 Chair of Software Engineering Object-Oriented Software Construction Bertrand Meyer Lecture 14: Presentation of EiffelStudio and Ace Files Ilinca Ciupa

Upload: belicia-romero

Post on 01-Jan-2016

17 views

Category:

Documents


0 download

DESCRIPTION

Object-Oriented Software Construction. Lecture 14: Presentation of EiffelStudio and Ace Files. Bertrand Meyer. Ilinca Ciupa. Agenda for today. EiffelStudio: The ISE Eiffel environment Ace files: Control files for Eiffel projects. Agenda for today. EiffelStudio: The ISE Eiffel environment - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Object-Oriented Software Construction

OOSC - Summer Semester 2005

1

Chair of Software Engineering

Object-Oriented Software Construction

Bertrand Meyer

Lecture 14: Presentation of EiffelStudio and Ace Files

Ilinca Ciupa

Page 2: Object-Oriented Software Construction

OOSC - Summer Semester 2005

2

Chair of Software Engineering

Agenda for today

EiffelStudio: The ISE Eiffel environment Ace files: Control files for Eiffel projects

Page 3: Object-Oriented Software Construction

OOSC - Summer Semester 2005

3

Chair of Software Engineering

Agenda for today

EiffelStudio: The ISE Eiffel environment Ace files: Control files for Eiffel projects

Page 4: Object-Oriented Software Construction

OOSC - Summer Semester 2005

4

Chair of Software Engineering

EiffelStudio

Introduction to the IDE The Diagram Tool Debugging

Page 5: Object-Oriented Software Construction

OOSC - Summer Semester 2005

5

Chair of Software Engineering

Material available online

Guided tour:

http://se.inf.ethz.ch/teaching/ss2005/0250/readings/eiffel_studio_presentation.pdf

Page 6: Object-Oriented Software Construction

OOSC - Summer Semester 2005

6

Chair of Software Engineering

EiffelStudio

Introduction to the IDE The Diagram Tool Debugging

Page 7: Object-Oriented Software Construction

OOSC - Summer Semester 2005

7

Chair of Software Engineering

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

Page 8: Object-Oriented Software Construction

OOSC - Summer Semester 2005

8

Chair of Software Engineering

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)

Page 9: Object-Oriented Software Construction

OOSC - Summer Semester 2005

9

Chair of Software Engineering

The compiler

Uses incremental compilation Supports .NET Project Settings Tool

Page 10: Object-Oriented Software Construction

OOSC - Summer Semester 2005

10

Chair of Software Engineering

EiffelStudio

Introduction to the IDE The Diagram Tool Debugging

Page 11: Object-Oriented Software Construction

OOSC - Summer Semester 2005

11

Chair of Software Engineering

Class types:

Cluster:

A quick run through BON

*DEFERRE

D

+EFFECTIV

E

●PERSISTEN

T

▲INTERFACE

D REUSED ROOT_CLASS

ROOT_CLUSTER

▲INTERFACED

Page 12: Object-Oriented Software Construction

OOSC - Summer Semester 2005

12

Chair of Software Engineering

A quick run through BON (cont’d)

Inheritance link:

Client links:

+EFFECTIV

E

*DEFERRE

D

ROOT_CLASS REUSED

ROOT_CLASS REUSED

f

expanded_f

Page 13: Object-Oriented Software Construction

OOSC - Summer Semester 2005

13

Chair of Software Engineering

The Diagram tool

Provides “Real time” roundtrip reverse engineering Synchronized at each compilation Allows for different views

Page 14: Object-Oriented Software Construction

OOSC - Summer Semester 2005

14

Chair of Software Engineering

EiffelStudio

Introduction to the IDE The Diagram Tool Debugging

Page 15: Object-Oriented Software Construction

OOSC - Summer Semester 2005

15

Chair of Software Engineering

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

Page 16: Object-Oriented Software Construction

OOSC - Summer Semester 2005

16

Chair of Software Engineering

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

Page 17: Object-Oriented Software Construction

OOSC - Summer Semester 2005

17

Chair of Software Engineering

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)

Page 18: Object-Oriented Software Construction

OOSC - Summer Semester 2005

18

Chair of Software Engineering

Agenda for today

EiffelStudio: The ISE Eiffel environment Ace files: Control files for Eiffel projects

Page 19: Object-Oriented Software Construction

OOSC - Summer Semester 2005

19

Chair of Software Engineering

Why do we need ace files?

Ace – Assembly of Classes in Eiffel Lace – Language for Assembling Classes in Eiffel Lace is the language for writing ace files

Ace files necessary for specifying: The root class of the system The files that contain the classes of the system

(grouped in clusters)

Page 20: Object-Oriented Software Construction

OOSC - Summer Semester 2005

20

Chair of Software Engineering

Generation and editing

Generation: Automatically done by EiffelStudio when

creating a new projectOr By hand

Editing Through the “Project Settings” dialogOr By hand

Page 21: Object-Oriented Software Construction

OOSC - Summer Semester 2005

21

Chair of Software Engineering

Example ace filesystem

sample

root ROOT_CLASS: "make"

default assertion (require) debug ("DEBUG_TAG")

cluster root_cluster: "."

optionassertion (all): ROOT_CLASS

enda_subcluster (root_cluster): "$/a_subcluster"all base: "$ISE_EIFFEL\library\base"

exclude "desc";"table_eiffel3"

endall vision2: "${ISE_EIFFEL}/library/vision2"

external include_path: "$(ISE_EIFFEL)\library\wel\spec\windows\include" object: "$(ISE_EIFFEL)\library\wel\spec\$(ISE_C_COMPILER)\lib\wel.lib"

end

Page 22: Object-Oriented Software Construction

OOSC - Summer Semester 2005

22

Chair of Software Engineering

“system” clause

Gives the name of the system Executable file produced will have same name

system

sample

Page 23: Object-Oriented Software Construction

OOSC - Summer Semester 2005

23

Chair of Software Engineering

“root” clause

Specifies the root class and its creation procedure that will be called to start execution of the system

root

ROOT_CLASS: "make"

Page 24: Object-Oriented Software Construction

OOSC - Summer Semester 2005

24

Chair of Software Engineering

“default” clause

Contains the compilation options of the project (for more options than illustrated here see EiffelStudio Help)

“assertion” option Which types of assertions are checked Possible values: no, require (default), ensure, invariant,

loop, check, all “debug” option

Activate code written inside debug blocksdebug (“DEBUG_TAG")

-- Debug code is here. end

default

assertion (require)

debug ("DEBUG_TAG")

Page 25: Object-Oriented Software Construction

OOSC - Summer Semester 2005

25

Chair of Software Engineering

“cluster” clause

cluster root_cluster: "."

optionassertion (all): ROOT_CLASS

enda_subcluster (root_cluster): "$/a_subcluster"all base: "$ISE_EIFFEL\library\base"

exclude "desc";"table_eiffel3"

endall vision2: "${ISE_EIFFEL}/library/vision2"

Locates the files that contain the classes of the system (files with the .e extension)

Possibility to override the assertion checking level of the whole system for individual classes

Use keyword all before cluster name to recursively explore subdirectories of specified directory

Page 26: Object-Oriented Software Construction

OOSC - Summer Semester 2005

26

Chair of Software Engineering

Additional info on ace files

EiffelStudio Help (“Lace syntax”) “Object-Oriented Software Construction”, 2nd

edition, Bertrand Meyer Chapter 7: “The static structure: classes”,

subsection “Assembling a system” (pp. 198 - 200)

Chapter 11: “Design by Contract: building reliable software”, subsection “Monitoring assertions at run time” (pp. 392 - 394)

Page 27: Object-Oriented Software Construction

OOSC - Summer Semester 2005

27

Chair of Software Engineering

End of lecture 14