Home

 

Getting Started with Elisa

Using EDS

Demo's

Tutorials

 

Language Description

1. Lexical Elements
2. Basic Data Types and Expressions
3. Definitions
4. Streams
5. Backtracking
6. Statements and Special Expressions
7. Arrays
8. Lists
9. Descriptors
10. Components
11. Collections
12. Generic Components
13. Terms
14. Categories
15. Types 

16. Built-in Definitions
17. Higher-order Definitions

18. External Interfaces

Index

Data Structures

1. Sequences
2. Examples involving Lists
3. Trees
4. Graphs
5. Searching State Spaces
6. Language Processing
7. Knowledge Representations          

 

Metaprogramming

1. Introduction
2. What are Domain Definitions?

3.  Sorts of Domain Definitions

4.  Manipulations of Domain Definitions

5.  Translating Domain Definitions

6.  Dialogue Sessions

7.  Example of Concentric Circles

8.  Example of Domain Substitution applied to Concentric Circles

9.  Example of an Order Processing Application

10.Example of an Airport Information System

11.Example of a Rental Boat Business

12.Benefits of Domain Definitions

   

Back Home Up Next


10.  Example of an Airport Information System

As another example of an application we define a simple airport information system. Discovering the key concepts of an airport is rather simple: the task of an airport is to manage incoming and outgoing flights. Consequently, the key concept is: flight. To characterize a flight we need a flight number, the origin and destination of a flight, the arrival and departure times, the gate number and possible delays. Not all information should be available at once. We know from experience that flight information may change every moment. To describe domain definitions for flights it is necessary that information can be changed. Therefore we will discuss update operations. However, first we need to define the domain definitions for flights (Figure 13).  


<< Airport Information System >>

 

Flight = Flightno + Origin + Destination + Arrivaltime + Departuretime + Delay + Gate;

 

Flightno             = text;

Origin                = Airport;

Destination        = Airport;

Arrivaltime        = Time;

Departuretime   = Time;

Delay                  = Time;

 

Airport              = text;

Time                  = Hour + Minutes;

Hour                  = integer;

Minutes             = integer;

Gate                   = text;

Flightlist            = collection (Flight);

 

text               = predefined;

integer         = predefined;


Figure 13: Domain definitions of an Airport Information System

These domain definitions will be input for the metaprocessor. The result is a skeleton file, called "Airport.txt". Based on this skeleton information it is now possible to specify a number of flights (Figure 14).


			     << Airport >>
include "Airport12.txt";

time(Hour, Minutes) -> Time;
time(H, M) = newTime(H, M);

FlightList = alist(Flight);

flight1 = newFlight ("KL 677","Amsterdam","Calgary", time(07, 40), time(10,50), time(0, 0), "Gate A" );
add(FlightList, flight1);
flight2 = newFlight ("AF345","Paris","Denver", time(08, 15), time(11, 10), time(0, 0), "Gate B" );
add(FlightList, flight2);

setDelay(flight2,time(2, 30));
setDeparturetime(flight2,time(13, 30));

FlightList?
{ Flight:[Flightno = "KL 677";
          Origin = "Amsterdam";
          Destination = "Calgary";
          Arrivaltime = Time:[Hour = 7;
                              Minutes = 40];
          Departuretime = Time:[Hour = 10;
                                Minutes = 50];
          Delay = Time:[Hour = 0;
                        Minutes = 0];
          Gate = "Gate A"], 
  Flight:[Flightno = "AF345";
          Origin = "Paris";
          Destination = "Denver";
          Arrivaltime = Time:[Hour = 8;
                              Minutes = 15];
          Departuretime = Time:[Hour = 13;
                                Minutes = 30];
          Delay = Time:[Hour = 2;
                        Minutes = 30];
          Gate = "Gate B"]}

Figure 14: Session of the Airport Information System

The session of the Airport Information System shows some new elements. After the include of the skeleton file, a time function is defined  to simplify time notations. Two flights are introduced. Both are added to the FlightList. It appears that the second flight is delayed. This will be expressed by the setDelay function as defined in the skeleton file. Accordingly, the time of departure is also updated. The effect of both operations is made visible by a query of FlightList?

Back Home Up Next

  Part 6: Metaprogramming   10. Example of an Airport Information System

            
Introduction

Home | Highlights of Elisa | Integrating Different Paradigms | Getting Started with Elisa | Demo's  | What is Domain Orientation | Bibliography | Copyright | News | Contact | Contents

Language Description:

Lexical Elements | Basic Data Types and Expressions | Definitions | Streams | Backtracking | Statements and Special Expressions | Arrays | Lists | Descriptors | Components | Collections | Generic Components | Terms | Categories | Types | Built-in Definitions | Higher-order Definitions | External Interfaces | Index 

Data Structures: Sequences | Examples involving Lists | Trees | Graphs | Searching State Spaces | Language Processing | Knowledge Representations
Domain Modeling:

Domain Modeling | Concepts | Domain Definitions | Domain Operations | Domain Implementations | Systems | Case study: an Order processing system | Case study: an Airport Support system | Domain Orientation versus Object Orientation

Design Patterns:

Introduction | Abstract Factory | Builder | Factory Method | Prototype | Singleton | Adapter | Bridge | Composite | Decorator | Facade | Flyweight | Proxy | Chain of Responsibility | Command | Interpreter | Iterator | Mediator | Memento | Observer | State | Strategy | Template Method | Visitor 

 

click tracking

This page was last modified on 19-05-2015 14:11:28   

free hit counter