Professional Documents
Culture Documents
IIT.SRC 2005
Student Research Conference
Mária Bieliková (Ed.)
IIT.SRC 2005:
Student Research Conference
Slovak University
of Technology
Bratislava
Proceedings in
Informatics and Information Technologies
IIT.SRC 2005
Student Research Conference
Editor
Mária Bieliková
Faculty of Informatics and Information Technologies
Slovak University of Technology in Bratislava
Ilkovičova 3
842 16 Bratislava, Slovakia
Published by:
Vydavateľstvo STU
Vazovova 5, Bratislava, Slovakia
Preface
Research has been one of the main priorities of the university education since its very
beginning. It is the case also for our university – the Slovak University of Technology
in Bratislava and its youngest faculty – the Faculty of Informatics and Information
Technologies. What is relatively new is a closer connection of research and education.
It is fully in the line of Bologna Declaration and the intention of European Commission
to increase the role of universities in the future society development and building a new
society – the knowledge society.
A closer connection of research and education leads very naturally to a
participation of students in research. Not only the students of post gradual – doctoral
study, where research is a substantial part of their study and one of their principal
activities. A participation of students in research is “going down” to students of
gradual, even pre gradual study.
Universities of technology have a long tradition of students participating in a
skilled labour where they have to apply their theoretical knowledge. The best of these
results were usually presented at various students’ competitions or exhibitions. There
were also combined with student research works. Our university has a long tradition in
such competition named ŠVOČ (abbreviation of the Student Scientific and Technical
Activity). In this academic year our faculty, FIIT STU, decided to transform former
ŠVOČ into the Student Research Conference covering topics of Informatics and
Information Technologies (IIT.SRC). It is completely in the line of Bologna
Declaration and also similar conferences organized by some other universities abroad.
Participants are students of all three levels of the study – bachelor (Bc.), master (Ing.)
or doctoral (PhD.) study.
IIT.SRC 2005 attracted 38 students (10 bachelor, 11 master and 17 doctoral). It
was organized in four sections:
• Artificial Intelligence and Computer Science,
• Security, Computer Systems and Networks,
• Software Engineering,
• Web Technologies and Information Systems.
Besides the 38 papers presented at the conference and included in these Proceedings,
the RoboCup Exhibition was organised as a part of IIT.SRC 2005. RoboCup is an
attractive project with free participation, designed to support education and research in
artificial intelligence, robotics and information technologies. Through several years,
our students achieved interesting results, which were presented during this Conference.
We decided to hold such exhibition as a part of the IIT.SRC and present both the way
v
vi Preface
the RoboCup simulated league is played and also the progress of current students
research in this field.
IIT.SRC 2005 was the result of considerable effort by a number of people. It is
our pleasure to express our thanks to:
• the IIT.SRC 2005 Programme Committee who devoted effort to reviewing
papers and helped with transforming former ŠVOČ to the Student Research
Conference,
• the IIT.SRC 2005 Organising Committee for a smooth preparation of the
Conference,
• the students – authors of the papers, for contributing good papers reporting
their research and their supervisors for bringing the students to the research
community.
Special thanks go to:
• Jiří Pospíchal, Michal Bielik and Ján Žiak, who did an excellent job in the
completion of the proceedings,
• Branislav Steinmüller for providing a submission and review system that
worked perfectly thus allowing reviewing in a very short period, and
• Valéria Šimáková for very effective support of all activities and in making the
Conference happen.
The papers of these Proceedings reflect an orientation of the faculty research, an
implementation of the Bologna Declaration at our faculty, but first of all the results of
student research.
General Chair
Ľudovít Molnár (dean, Faculty of Informatics and Information Technologies,
Slovak University of Technology in Bratislava)
Programme Chair
Mária Bieliková
Programme Committee
Pavel Čičák Vladimír Kvasnička
Norbert Frištacký Jana Minárová
Pavol Horváth Pavol Návrat
Ladislav Hudec Jiří Pospíchal
Milan Kolesár Martin Šperka
Margaréta Kotočová Vladimír Vojtek
Tibor Krajčovič
Organising Committee
Alexandra Bieleková Valéria Šimáková (secretary)
Michal Bielik Jiří Pospíchal
Pavel Čičák (chair) Ján Žiak
Mária Hricová
all from FIIT STU in Bratislava, Slovakia
Sponsoring Institutions
HP Invent
Informatics Development Foundation at FIIT STU
vii
Table of Contents
ix
x Table of Contents
Software Engineering
Master Degree Program Students
Specialization of Object-Oriented Programs Written in Java Language ............ 127
Igor DYSKO
Object-Oriented Specialization Using Aspect Programming ............................. 133
Adrián SLAVKOVSKÝ
Exploring the Commonality in Feature Modeling Notations.............................. 139
Miloslav ŠÍPKA
Automatic Backup in Oracle Database ............................................................... 145
Miloš SÝKORA
PhD Degree Program Students
Modeling Systems Using Design Patterns.......................................................... 151
Jaroslav JAKUBÍK
On the Composability of Concurrent Systems.................................................... 159
Matej KOŠÍK
Extensional and Intensional Semantics of pUML Objects ................................. 167
Miroslav LÍŠKA
IIT.SRC 2005: Student Research Conference xi
ACCOMPANYING EVENTS
RoboCup Exhibition at IIT-SRC 2005 ............................................................... 261
Pavol NÁVRAT, Ivan KAPUSTÍK
Index ................................................................................................................... 263
Artificial Intelligence
and
Computer Science
N-Gram Based Statistics Aimed
at Language Identification
Tomáš ÖLVECKÝ∗
Slovak University of Technology
Faculty of Informatics and Information Technologies
Ilkovičova 3, 842 16 Bratislava, Slovak Republic
olvecky@stonline.sk
1 Introduction
Various subjects from e-mail users to intelligence services around the globe demand
advanced text recognition. However, the mass growth of digital documents on the web
is the main reason why we are concerned with this topic. Search engines try to
categorize crawled pages by various topics, e.g. language, subject, etc., but this
categorization is still unreliable. A superior method must be fault resistant and quick.
On the other hand, it must be able to process a great amount of input in (preferably)
constant time.
The purpose of this work is to present information on automated language
identification methods as well as to show our experiments based on one of these
methods. First we will give a note on why we think it is important to focus on this
field, then we describe the basic ideas used by language detection software and finally
∗
Supervisor: doc. Ing. Mária Bieliková, PhD., Institute of Informatics and Software
Engineering, Faculty of Informatics and Information Technologies STU in Bratislava
show how one of those methods (n-gram approach) can be set up to perform better in
recognition tests. Other research, aimed at recognition of various subjects of the same
language is also mentioned.
Another common approach is based on the idea that many languages use unique letters
or rare combinations of characters.
Although the score counting could be the same as in previous method, we do not
need to collect large dictionarys to be succesful. Unique tokens are contained not only
in common words, but in the whole vocabulary. Even if we have an input with mixed
content, e.g. with some foregin words, this approach can distinguish between the main
and minor language with a lower error-rate than by using previous method. Unique
tokens perform very fast, but their precision is still beneath our expectations. It can
determine charset of unknown text and limit number of languages for future scanning,
but it is unreliable to use this method separately.
N-grams are substrings generated from larger text [1]. The input is divided into small
parts with maximum length of n, and for every n-gram, the frequency of occurrence is
counted.
N-Gram Based Statistics Aimed at Language Identification 3
After all n-grams are counted, the least frequent are discarded and the rest is
written to a profile. The profile of unknown text is then compared to every category
(language) listed.
Note that the number of n-grams stored might not be the same for input and
language profiles. Usually it is a good idea to put more n-grams in language profile.
Various approaches use different ways of getting n-grams, like inserting blanks
before each word, skipping some characters, etc. We focus on some of these
parameters to improve precision of this method.
For every experiment, little different conditions were used. We used manually sorted
ca. 600 HTML pages from three languages (Czech, Slovak, and Polish) to get a base
for each experiment. Those languages were used, because they are a part of our
problem field and their similarity makes the task of identification uneasy.
Each page was stripped of HTML content and then assigned to one of two levels
for corresponding language. Level 1 was used for pages, which were easy to identify
and rather longer than 2 KB. Level 2 was assigned to pages with non-windows
encoding and for those, which were difficult to identify.
Minimal length accepted was 1KB, maximum was 60KB. Later we will show that
it is possible to trim longer input and not increase inaccuracy of the process (see 4.3).
First, we discuss how quality and quantity of the training data affects the process of
recognition. We might assume that the longer training data is, the more data will be
available and the profile could be closer to the actual language profile. On the other
hand, N-grams are able to distinguish between various topics of the same language and
a long training data from one area can exclude input of the same language but other
areas (see section 5).
In the first experiment, we used two training files, both of Czech language, and
measured how their length affects the identification process. We used following
parameters (300:80,3) and tested on a set of 100 Czech pages (level 1) of size 1-4 KB.
35 35
percent occurrence
percent occurrence
30 30
25 25
20 20
15 15
10 10
5 5
0 0
0 10 20 30 40 0 10 20 30 40
training data trimmed to [kb] training data trimmed to [kb]
Both charts show increase of identified pages as the training data grows.
However, at certain point, the quality of profile begins to fall off. This might be caused
by small size of pages tested on. We might notice the differences between both charts:
while programming articles involve many technicalities, news articles can be
decomposed to common phrases. Therefore, a longer set of programming articles
N-Gram Based Statistics Aimed at Language Identification 5
results in very small amount of identified pages. On the other hand, even if the profile
czech.news.18 gets almost 35% of all pages, profiles made from longer input provide
still satisfying results.
80
70
60
time [s]
50
40
30
20
10
0
0 5 10 15 20 25 30 35 40
training data size [KB]
Conclusion: Results show that using common language articles of length 18-30
KB provides good results at low computing costs.
In previous experiment, we showed that the longer training data is, the longer it takes
to compute the n-grams. Because the process of getting n-grams out of unknown text is
virtually the same, we might be concerned with the time it takes to identify texts with
longer size. That is why it is important to focus on how trimming of unknown text
would change the performance of overall process.
In this experiment, we measured how success rate depends on length of text to be
identified. We used both levels for each language and parameters of (300:120,3).
6 Tomáš Ölvecký
The last important parameter to mention is the number of n-grams in both language and
input profile. Usually it is better to manage a longer language profile, because we
would match also rare n-grams from input profile without penalty. Another reason for
unequal profile lengths is the computing time. While language profile can be more
time-consuming, it is a one-time process and it is not usually done during time system
responds to the environment.
Circumstances of this experiment: (?:?,3), 100 czech (level 1) pages of size 2-4
KB.
Conclusion: Even if the language profile length does not influence the results, we
recommend using rather longer profiles (300-400). On the contrary, the length of input
profile does have a big impact on how many pages are identified correctly. Although
the average score decreases, the recognition power of the method clearly increases.
Therefore, we advise not to use profile length smaller than 100 items.
N-Gram Based Statistics Aimed at Language Identification 7
4 Conclusions
In this paper, we analyzed methods used in language identification with a special aim
at n-gram method. We focused on how n-grams could be tuned to perform better. With
some modifications, it is possible to gain accuracy of this method by almost 10%. This
work showed basic ideas of future research aimed at web categorisation by language
and content.
References
1. Cavnar, W. B. and J. M. Trenkle: N-Gram-Based Text Categorization. In:
Proceedings of Third Annual Symposium on Document Analysis and Information
Retrieval, Las Vegas, NV, UNLV Publications/Reprographics (1994), 161-175.
2. Dunning, T.: Statistical Identification of Language. In: Technical report CRL
MCCS-94--273, Computing Research Lab, New Mexico State University (1994).
A Framework for Simulation
of Dynamic Systems
Marek TOMŠA, Richard VESELÝ, Oto VOZÁR∗
Slovak University of Technology
Faculty of Informatics and Information Technologies
Ilkovičova 3, 842 16 Bratislava, Slovak Republic
1 Introduction
The lack of simple and unified modeling environment that would simplify the process
of development of the evolutionary algorithms and system dynamics caused us to aim
our focus on envisioning and designing such a platform. The purpose of our project
was to make implementation of those, usually quite cumbersome problems easier and
to fill the gap by creating and offering a framework that would meet the
aforementioned criteria.
∗
Supervisor: doc. Ing. Mária Bieliková, PhD., Institute of Informatics and Software
Engineering, Faculty of Informatics and Information Technologies STU Bratislava
2 Framework overview
Overview of the frameworks fundamental building blocks:
• Core - contains main classes used to simulate dynamic processes. Provides
the class World, which encapsulates the simulation loop, WorldSystem acting
as a junction between simulated system and the interface. Core namespace
also contains many base classes utilizable in the process of dynamic system
modeling.
• Core.Genetics – provides classes for genetics and genetic process modeling.
DNA class provides mechanism for information inheritance as well as
methods for their actual recombination. AllelePair class is an abstraction
forming the basic means of genetic feature bearing.
• Core.FuzzyLogic – contains the implementation of the fuzzy sets, which can
be used for simulation purposes or one might extend them to suit needs of the
specific application based on the framework.
• Core.Compilation – contains classes providing runtime compilation of the
.NET assemblies and dynamic activation of types contained within, used
primarily during runtime for behavior phenotype generation. Potential uses
include runtime entity generation.
3 Genetics
Genetics (from the Greek genno γεννώ - give birth) is the science of genes, heredity,
and the variation of organisms. The word genetics was first applied to describe the
study of inheritance and the science of variation by English scientist William Bateson
in a letter to Adam Sedgewick, dated April 18, 1905.
Virtual simulation of complex genetic processes, which was previously impossible,
quickly became viable as we entered age of computers more than one century later.
• DNA class – implements operator that provides the ability to recombine two
different DNAs of parents to form the resulting offspring DNA.
• AllelePair class – class encapsulating two Allele instances, forming pair
containing genetic information, also a mechanism to choose prevailing allele
which determines phenotype is provided.
• Allele class – abstract class able to hold any type of information (making it
inheritable)
10 M.Tomša, R.Veselý et al.
4 Evolutionary algorithms
5 System dynamics
System dynamics is one approach to modeling the dynamics of population, ecological
and economic systems, which usually interact strongly with each other.
Population dynamics is the study of marginal and long-term changes in the numbers,
individual weights and age composition of individuals in one or several populations,
and biological and environmental processes influencing those changes.
Population dynamics is also one of the possible applications of the
VirtualWorld framework. Framework enables one to simulate various effects
A Framework for Simulation of Dynamic Systems 11
Framework allows to model complex behavior of individual entities that is later, during
the cross-breeding process, inherited along other genetic features. These steps have to
be followed, in order to model behavior:
RabbitBehavior class, representing behavioral phenotype is designed first,
closely followed by the design of an abstract RabbitPattern class, representing
genotype template of the behavior model.
matingBehavior : BehaviorAllele
method : MethodImplementation
[MatingBehavior]
public override void Mate(Rabbit e, Entity partner)
{
Rabbit matingPartner = partner as Rabbit;
e.Copullate(matingPartner);
}
{Recessive, Dominant}
AllelePair has to be created for each method that represents modeled behavior, which
enables every behavioral element to be inherited independently. Resulting AllelePairs
are inserted into DNA from which the individuals of the initial population are
constructed. During entity instantiation (rabbit, in this case) behavior phenotype
construction occurs. Behavior class is a phenotype abstraction, serving in our case as
a base for the derived RabbitBehavior class.
RabbitBehavior class constructor takes DNA class instance as a parameter, which
is used in the process of AllelePair abstraction, with each containing Alleles
responsible for the behavior itself that are used to generate resulting class source code
from. This class represents the behavior of the new individual. Source code is
dynamically compiled afterwards, using the methods contained within the
EntityFactory class. Resulting RabbitBehavior class instance is then assigned to the
A Framework for Simulation of Dynamic Systems 13
instantiated individual in form of an attribute and its methods are called during the
Refresh method cycle.
This mechanism provides behavior inheritance while retaining clear object-
oriented style. It solves the runtime binding of method calls responsible for the
behavior of the modeled entity.
Individual BehaviorAlleles, as well as other AllelePairs in the DNA are
recombined in the process of cross-breeding and during the instantiation of the new
entity the process of the behavior phenotype initialization is repeated, as described
earlier. Alleles may, naturally, remain in the heterozygous form, which results in
dominant behavior component manifestation and an individual carrying
complementary recessive component.
7 Conclusions
We have modeled simple system which we used to monitor basic population dynamics
principles and verified the framework functionality. We have shown unique framework
features and presented elementary example to demonstrate principle of the behavior
inheritance model functioning.
Related works
G – System - both a framework for simulation as well as a virtual reality itself which
tries to simulate world in which evolution of life takes place. Project is still in its early
phase. http://www.g-system.at
Simile - a software tool for computer simulation of complex dynamic systems in the
earth, environmental and life sciences. Simile uses logic-based declarative modeling
technology to represent the interactions in these systems in a structured way. In Simile,
models are developed diagrammatically, while our framework uses different approach
- C# programming language is used for modeling of objects as well as their behavior.
http://www.simulistics.com/documents/Simile.pdf
References
1. Wikipedia contributors: Evolutionary algorithm. Wikipedia: The Free
Encyclopedia, http://en.wikipedia.org/wiki/Evolutionary_algorithm, 2005.
2. Wikipedia contributors: Genetics. Wikipedia: The Free Encyclopedia,
http://en.wikipedia.org/wiki/Genetics, 2005.
Automatic Grass-Cutter Developed by
Genetic Programming
Peter SÝKORA∗
Slovak University of Technology
Faculty of Informatics and Information Technologies
Ilkovičova 3, 842 16 Bratislava, Slovakia
psykora@gmail.com
1 Introduction
Genetic programming is one of the methods for developing computer programs. It
reduces time of development and expenses. Specifically, genetic programming
iteratively transforms a population of computer programs into a new generation of
programs by applying analogs of naturally occurring genetic operations. The genetic
operations include crossover (sexual recombination), mutation, reproduction, gene
duplication, and gene deletion.
The goal is, that the next generation of programs should each time obtain better
results at solving given problem than the previous generation and that is why the
selection of suitable individuals for genetic operations is so important. This is provided
by fitness function and selection procedures.
2 Methods
The overall goal is to evolve a successful control program for automatic grass-cutter by
means of genetic programming (GP). The environment of grass-cutter is a toroidal grid
∗
Supervisor: doc. RNDr. Jiří Pospíchal, DrSc., Department of Applied Informatics, Faculty of
Informatics and Information Technologies STU in Bratislava
with randomly placed obstacles. This environment was used to simulate each cutter's
control program to obtain fitness measurement.
2.1 Environment
Cutter starts in the left corner of 32x32 square toroidal grid surface. That means, that
every square has the same number of neighbors (four). Each square can be in one of
three states: empty (already visited), grass or obstacle. Grass-cutter can only move to
square with grass, or grass cut.
Cutter executes n-times it's control program or it is executing this program until all
grass is cut. Each move increments numMoves variable. Rotating cutter left, or right
costs nothing. Cutter sees one field ahead in it's direction and can take action, if there is
grass or obstacle.
Programs are represented as trees, with internal nodes from the function set and
the leaves chosen from the terminal set. Functions may execute one or more sub-
branches depending on the specific function and state of the simulation.
Table 1 presents the tableau for the Automatic Cutter Problem, and lists the
function and terminal sets. Table 2 explains the terminals, and Table 3 describes the set
of functions.
Table 2: Terminals
TURNL: Turns the cutter left (changes the direction)
TRUNR: Turns the cutter right
MOVE: Move the cutter one square ahead in its direction, if there is no obstacle on
that field. If there is grass, it is automatically collected
16 Peter Sýkora
Table 3: Functions
IFGRASS: Has 2 parameters. Evaluates first parameter, if there is grass one
field ahead or second parameter, if there's no grass
IFOBSTACLE: Has 2 parameters. Evaluates first parameter, if there is obstacle one
field ahead or second parameter, if there's no obstacle
PROGN2: Has 2 parameters. Evaluates all 2 arguments in sequence
PROGN3: Has 3 parameters. Evaluates all 3 arguments in sequence
There are two areas of focus in calculating the fitness function. One is the number of
uncollected grass(UG) and other is the number redundant moves(RM). Raw fitness
value is calculated as UG + c*RM. The selection of suitable constant c is important. It
follows from this fitness function , that 1/c redundant moves decrease the fitness value,
as one uncut field. For example, when c=0.2 (1/c = 5), cutting one more grass field is
5-times more important as reducing the number of redundant moves.
Raw Fitness = UG + c*RM
Standardized Fitness = same as Raw Fitness, because low raw fitness value is
desired
1 1
AdjustedFitness = =
1 + StandarizedFitness 1 + UG + c × RM
Values of UG and RM are obtained by running controlling program n times on the
given map, or until all grass fields are cut. Test runs shows, that 4096 as n value is
sufficient.
Roulette Selection Method and Tournament Selection Method are used for selecting
suitable individuals for creating next generation
Reproduction
Asexual method. Reproduction is, when individual is copied into the new population. It
has same effect as if individual survived to the next generation. Copied individuals do
not need to be evaluated again, because their fitness was measured in previous
population.
Crossover
Crossover needs two individuals and produces two individuals into the new population.
There are selected random nodes, of each of both individuals and subtrees starting with
these nodes are exchanged. The tree depth of created individuals must not exceed
maximum tree depth.
Mutation
Mutation is asexual operation. Individual is selected, with a selection method. Then
random node is selected and some type mutation is applied. In Swap Mutation the node
is replaced with the same argument number node. In Standard Koza's Mutation the
subtree of selecting node is removed and is replaced with newly generated tree.
Program for test runs described in this paper was written in C++ using STL (standard
template library). The runs were executed on a PC with a Pentium 4 – 2 GHz
processor. One run takes about ten minutes.
3 Results
In the first experience with this problem, I have tried small populations, shallow trees
and many generations. Each run other parameter values were tried. Increasing number
18 Peter Sýkora
3.2 Sample
The test problem and results for the two tested selection methods are shown
in Figs. 1 and 2. Best individual on this map was found in 101st generation using
20 Peter Sýkora
tournament selection. This individual collects 1014 of 1014 fields of grass with only
1022 moves.
4 Conclusions
This paper demonstrated that genetic programming is useful for complicated graph
searching problems, to which large maps belong. Two selection methods were tested,
but our result did not show, that one of these methods is significantly preferable. In the
test problem, published in this paper, very good results were obtained by both of these
methods. While the tournament selection provided slightly better results, further
statistical analysis will be needed to prove its superiority.
References
1. Koza, J.R.: Genetic Programming: On the Programming of Computers by Means
of Natural Selection. Cambridge, MA: The MIT Press, 1992.
2. Zhang B., Kim J.: Comparison of Selection Methods for Evolutionary
Optimization. Evolutionary Optimization, Vol. 2, No. 1 (2000), 55-70.
Deterministic Finite State Machine
Vladislav ZÁLEŠÁK*
Slovak University of Technology
Faculty of Informatics and Information Technologies
Ilkovičova 3, 842 16 Bratislava, Slovakia
aic@ynet.sk
*
Supervisor: Ing. Anna Považanová, Institute of Informatics and Software Engineering,
Faculty of Informatics and Information Technologies STU in Bratislava
1 Introduction
Simulated soccer is a client-server multi-agent distributed system, in which the agents
have limited methods of communication. The server handles the simulation of a virtual
soccer field. 24 clients (2 teams), consisting of 10 players, a goalie and an online coach
each, connect to the server to play a simulated soccer game. Each type of client has its
own limitations. The limitations of players include a sight channel limitation.
The player has a field of view (FOV), which never covers the whole playfield
(thus partially observable environment). The server sends to the player only visual
information about object in his FOV at a frequency depending on the quality and width
of the FOV. Thus the player has usually too little information about his surroundings,
which makes it difficult for him to determine a position for him, where he would be
most beneficial to the team. Also, the sight channel is affected by noise generated by
the server, which distorts the positional information about object in the players’ FOV.
∗
Supervisor: Ing. Marián Lekavý, Institute of Informatics and Software Engineering, Faculty
of Informatics and Information Technologies STU in Bratislava
Various attempts have been made to reduce this limitation using the
communication channel to send information about the surrounding objects and players
to team members. However the communication channel is limited by a message length
of 10 characters. Also the number of messages a player can receive per play cycle,
which are 1 message from his teammates and 1 message from the opponent team, is
limited.
The purpose of the method proposed in this paper is to reduce the effects of the
players’ sight and communication channel limitations by using one of the main online
coach advantages: his sight channel covers the entire playfield, and it is not affected by
noise.
2 The method
The coach receives visual information about the entire playfield each play cycle. The
positional information about the enemy team is collected. After a period of time the
gathered information is being evaluated and an optimal formation is composed and sent
to the team. The formation is assembled from sub-formations. For each part of the sub-
formation a different criteria of determining the most appropriate sub-formation is
used.
3 The modules
There are two modules, which cooperate on the task of determining the optimal
formation. The analyzer module named CoachAnalyzer and the Formation module.
3.1 CoachAnalyzer
The CoachAnalyzer has its own interpretation of the playfield. It divides the playfield
into sectors of 2x2 meters (the playfield dimensions are 105x68 meters, the remaining
1 meter is added to the last column of sectors), making a sector map of 52x34 sectors.
This map of the playfield contains for each sector the number of cycles the coach has
observed an enemy player in the given sector.
Each play cycle the coach passes visual information gathered in the cycle to the
CoachAnalyzer. The CoachAnalyzer analyses this information and increments the
values of each sector containing an enemy player by 1 per enemy. The result after a
period of time is a map containing relative amounts of time the enemy spent in each
sector. After a period of time the CoachAnalyzer uses the data in the map to compute
an optimal sub-formation for the defense and offence part of the sub-formation.
The goal of the algorithm for finding the optimal attack formation is to find
corridors from the centerline to the enemy goal line, which are least occupied by the
enemy. For each possible sub-formation consisting of 3 to 6 players the algorithm sums
the sector values of corridors with a width of 5 sectors (10 meters). The goal is to find
the sub-formation with a minimal value of the sum (minimal resistance). After finding
such sub-formation, this is then proposed to the coach.
24 Jaroslav Zajac
3.2 Formations
The formation module is a result of cooperation with Jaroslav Belluš. It is based on the
work of Ján Pidych [5], to which modifications have been made to better suit the
dynamic formation generation and changes. In the previous version there have been
some factors limiting the composition of formations from available sub-formations.
Also the set of available sub-formations was inadequately implemented.
The offset mentioned in the previous section has been added to the module. The
hard coded formations have been removed and a sub-formation loading routine
implemented to easily change the sub-formations available for composition via a
configuration file generated by the UnitCreator. The mechanism of assigning roles to
players in a formation, defining the style of play, needed to be rewritten to better suit
the new features the formation module. The coverage of players in each sub-formation
has been implemented. These changes were necessary for the CoachAnalyzer module
to find an optimal formation composed of a defensive, center and offensive sub-
formation.
Adaptation of Formation According to Opponent Analysis 25
4 Conclusions
The method has been implemented on top of the team Stjupit Dox 2004 [3]. The
method has been tested in a number of matches against the teams Stjupit Dox 2004,
Leaky Cleats [1, 4] (Deravá Kopačka in Slovak), Glass [2] (Sklo in Slovak). The
impact on the scoring is controversial. The results were varying from a 2:0 victory to a
1:3 loss. By closely examining the development of the matches a better understanding
of the effects of this method can be seen. The reasons of a lack of a definite
improvement in the scoring of the team can be found in the lower layers of the player,
on top of which this method has been implemented. The main reasons are the inability
of defensemen to get in possession of the ball even from a closely covered enemy
player and the overall kick inaccuracy of the team, for which the reasons have not been
found and are not the subject of this paper.
The best observable results produced by this method are excellent coverage of
enemy attackers by the defensive sub-formation, basically producing an
implementation of personal defense, in which usually each defenseman is always near
an enemy attacker. In the offensive part of the formation the method successfully
chooses sub-formations exploiting weaknesses in the enemy defense. The best results
are in situations, where the enemy team has the defense formed in front of the goal,
while the wings are uncovered. The method correctly chooses a wide sub-formation, in
which the wings are uncovered most of the time.
A disadvantage of the current implementation of the algorithm recommending the
optimal offense sub-formation doesn’t take into account the distribution of players
along the x axis of the playfield, thus all sub-formations with identical player counts
and y coordinates of its players yield the same fitness, resulting in choosing the first
found sub-formation, which usually is a line formation composed of n players. By
refining this method, for example by dividing the formations into aggressive,
defensive, neutral a more appropriate selection of sub-formations can be achieved.
However the question has to be answered, which sub-formations can be categorized as
aggressive. Those with the middle players in front of wingmen or the other way
around? The same question has to be answered for neutral and defensive types.
The devised method was fully implemented and tests showed that it improved the
quality of players’ displacement policy. Because of the lower player logic, we were not
able to achieve substantial score improvement, however the new formation algorithm
was able to improve the game style and adapt to the opponent formation.
References
1. Dirga, P. et al.: Deravá Kopačka – Softvér. Bratislava, FEI STU, 2003, Team
project.
2. Gorbatchev, S., et al.: RoboCup – Simulácia robotického futbalu. 2004, Team
project.
26 Jaroslav Zajac
3. Horváth, M., et al.: Robocup – Vyššie schopnosti hráča. Bratislava, FEI STU,
2003, Team project.
4. Lekavý, M., et al.: Multiagent coordination in the domain of robotic soccer. In:
ZNALOSTI 2005, Poster proceedings, 2005, pp. 65-68.
5. Pidych, J.: Diplomový projekt. Bratislava, FEI STU, 2002.
6. Zajac, J., et al.: Simulácia robotického futbalu. Bratislava, FIIT STU, 2005, Team
project.
Time Series Prediction Using RSOM
and Local Models
Peter ANGELOVIČ∗
Slovak University of Technology
Faculty of Informatics and Information Technologies
Ilkovičova 3, 842 16 Bratislava, Slovakia
angelovic@fiit.stuba.sk
Abstract. The article gives a short survey in the area of time series
prediction, its definition and certain solutions. The main emphasis of
this article is put on prediction with the use of local models and
artificial neural networks. Detailed analysis of SOM and RSOM
neural networks and its usage in temporal quantization is given. The
article is also concerned about verification of prediction skills of the
system with RSOM and MLP neural networks in real time series.
1 Introduction
The main motivation for analysis and research of time series is the desire to predict the
future and understand fundamental features and processes in systems, which are used
in every sector of human life. Time series prediction concentrates on building models,
which describes process using available knowledge and information. These models can
be used to simulate the future events in the process.
Time series is formed from measurements or observations natural, technical or
economical processes, which are made sequential in time. In general, consecutive
samples of time series have an important feature that value or sample depends on
sequence of consecutive samples, which have been located just before. Because of this
dependency, it is possible to perform estimation or prediction of future values in time
series. This fact can be expressed by equation:
x (t + 1) = f ( x (t ), x (t − 1),..., x (t − N + 1) ) (1)
∗
Supervisor: prof. Ing. Vladimír Vojtek, PhD., Institute of Applied Informatics, Faculty of
Informatics and Information Technologies STU in Bratislava
where x(t) is sample or state of the system in time step t, f is dependency between
sample in time step t+1 and previous samples, N is number of the previous samples,
which are relevant for computing the new state of the system. There is no reason for
big number of previous samples in the real applications. Usually certain interval of
consecutive samples is used. This interval is called time window and computation of
the sample x(t+1) is called prediction.
In science, technology and economy there exists many processes and phenomena,
whose prediction is important due to their usefulness and financial profit. These
include different industrial processes that can be modeled, predicted and controlled
based on some sensory data. Many phenomena of nature, such as daily rainfall or
probability of an earthquake would also be useful to predict. Medical applications
include for example modeling biological signals such as EEG or ECG to understand
better the patients state. In economy stock market prices are an example of a possibly
very profitable prediction tasks.
2 Prediction models
Nowadays, there are various approaches used in time series prediction. The oldest and
frequently used methods are statistical regression linear models [3], because the theory
of these models is well known, and many algorithms for model building are available.
They include linear autoregressive models (AR), moving average models (MA), mixed
models (ARMA) and mixed integrated models (ARIMA).
In practice almost all measured processes are nonlinear to some extent and hence
linear modeling methods turn out to be in some cases inadequate. On the other side,
nonlinear methods are time-consuming, that’s why they were unusable in real time
applications a few years ago. With the growth of computer processing and data storage,
the usage of various nonlinear methods has expanded. Artificial neural networks
became very popular in this sector [4]. They are motivated from biological knowledge
about structure and functionality of human brain. Neural networks consist of huge
amount of simple computational units – neurons, which are connected in some manner.
The way of connection and computation that they perform depends on the type of the
task. Learning or adaptation is the typical feature of neural networks. Optimization of
all the model parameters is carried out at the same time with the learning algorithm.
Many types of neural networks for prediction have been formed. First neural
network used in prediction tasks was multilayer perceptron (MLP), which became very
popular during 1980s. Temporal and contextual information in internal structure of
network is implemented in Time Delay Neural Network. Input of this network is
created from the samples of the time window, which is presented into the network at
the same time. This is first implementation of memory in neural network. Another
network, which is often used in prediction tasks and includes memory in the internal
structure, is FIR MLP (Finite Impulse Response MLP). Memory is implemented in the
structure of connections between neurons. Recurrent neural networks such as Jordan or
Elman networks are also used for temporal processing. The newest networks used in
time series prediction are Echo State Networks, which gives promising results.
Time Series Prediction Using RSOM and Local Models 29
All prediction models can be divided into global and local prediction models. Models
mentioned above were the global models. In this approach only one model is used to
characterize measured process. Global models give best results with stationary time
series. But, when the series is nonstationary, identifying proper global model becomes
more difficult. Local models often overcome some of the problems of the global
models such as computing complexity and accuracy in prediction (see Fig. 1). They are
based on dividing the data set to smaller sets of data, each being modeled with simple
local model.
Fig. 1. On the left picture approximation of time series with one global model
GM is shown. The same time series is modeled with three local
models LM1, LM2 and LM3 on the right.
The base method, which uses local models for prediction, is called k nearest
neighbors [6]. Local models require a data set with many examples of both the
observed variables and the process output. The model can be constructed then and used
to estimate the process output for a new input, which is not part of data set. Local
model output is calculated using three consecutive stages. The first stage finds first
k closest vectors, or nearest neighbors of observed variables in the data set. The second
stage constructs a simple model using only k chosen samples. The third stage evaluates
the model to estimate the process output.
Next method known from machine learning is algorithm M5‘, which builds
models tree during the learning phase [7]. Each internal node of the tree denotes a test
on an attribute or value of input vector, each branch represents an outcome of the test,
and leaf nodes represent linear regression models. Branching in internal nodes leads to
dividing input space of attributes into disjunctive regions. Dependency between inputs
and target values in these regions can be expressed by linear model.
Division of the input space of attributes can be performed by many clustering
methods or self organizing maps (SOM). SOM is able to divide input set of samples
into subsets with similar properties. But losing of contextual information during
division process is a big disadvantage, because it is important property in process of
30 Peter Angelovič
time series prediction. For example, if there are two samples with the same value both,
but different context, the SOM assigns them into same cluster, and then local model
predicts the same results. This problem can be overcome by injecting the memory
structure into the clustering process and making what we call temporal quantization. In
[2] is detailed survey of SOM models with memory mechanism. Next section is
concerned about time series prediction using SOM with contextual mechanism.
SOM is a vector quantization method with topology preservation, when the dimension
of the map matches the true dimension of the input space. Topology preservation
means that input patterns which are near in the input space are mapped into the
neighbour units in the SOM lattice, where the units are organized into a regular N-
dimensional grid. Topology preservation is achieved with the introduction of
topological neighborhood that connects the units of the SOM with a neighborhood
function.
The training algorithm of the SOM is based on unsupervised learning, where one
sample, the input vector x(n) from the input space VI, is selected randomly and
compared against the weight vector wi of the unit i the map space VM . The best
matching unit b to given input pattern x(n) is selected using metric based criterion:
x ( n ) − wb ( n) = min { x ( n ) − wi ( n ) } (2)
i∈VM
where the parallel vertical bars denote Euclidean vector norm. Initially all weight
vectors are set with the random selected sample from the training set. During the
Time Series Prediction Using RSOM and Local Models 31
learning phase the weights in the map are updated towards the given input pattern x(n)
according to:
w i ( n + 1) = wi ( n ) + γ ( n) hib ( n )( x ( n ) − wi ( n ) ) (3)
where i∈VM and γ(n) is a scalar valued adaptation gain. The neighborhood function
hib(n) gives the excitation of unit i when the best matching unit is b. If the map is
trained properly, weight vectors specify centers of clusters satisfying the vector
quantization criterion, where we seek to minimize the sum squared distance between
input patterns and weight vectors of the best matching units.
Recurrent SOM differs from the SOM only in its outputs. The outputs of the normal
SOM are reseted to zero after presenting each input pattern and selecting best matching
unit with the typical winner takes all strategy. Hence the map is sensitive only to the
last input pattern. In the RSOM the sharp outputs are replaced with leaky integrator
outputs, which once activated gradually lose their activity.
The modeling of the outputs in RSOM is close to the behavior of natural neurons,
which retain an electrical potential on their membranes with decay. In the RSOM this
decay is modeled with the difference equation:
yi ( n ) = (1 − α ) yi ( n − 1) + α ( x ( n ) − wi ( n ) ) (4)
where 0 < α ≤ 1 is a leaking coefficient, y(n) is a leaked difference vector, wi(n) is the
reference or weight vector in the unit i and x(n) is the input pattern. Fig. 2 shows
design of the output node in RSOM network.
like a normal SOM (α = 1), while in the other extreme all units tend to the mean of the
input data.
Since feedback in RSOM contains vector, it also captures the direction of the
error, which can be exploited in weight update when the map is trained. The best
matching unit b at step n is searched by the equation:
yb = min{ yi ( n) } (5)
i
Then the map is trained with modified Hebbian training rule given in Eq. (3),
where the difference vector (x(n) - wi(n)) is replaced with yi .
4 Experiments
Prediction skills of system based on RSOM and local models were validated on time
series of energy consumption. The results were compared to the other prediction
systems based on global models such as MLP and FIR MLP.
Time series include 1179 training samples (days) and 7 test samples. The input
vector was formed from 28 values as follows: 24 hourly values of energy consumption
one day before, 3 values represented the code of the predicted day and the last value
Time Series Prediction Using RSOM and Local Models 33
was effective temperature1. The output vector included 24 values of hourly energy
consumption of predicted day.
Measuring and comparing prediction results were made using methods for
evaluating errors such as: Mean Square Error (MSE), Maximal Absolute Deviation
(MAD) and Mean Absolute Percentage Error (MAPE).
Influence of leaking coefficient (LC) and number of local models (NLM) were
observed during experiments. The best results are shown in Table 1. Whole
composition and sequence of experiments are in [1].
The above table shows that the best result was reached using 4 local models and
0,95 as a value of leaking coefficient. The final prediction of testing data is on Fig. 3.
Fig. 3. Comparison of predicted and real values of tested samples. The grey line
represents the real values and black line represents the predicted values.
All values are transformed into the <0, 1> interval.
Experiments using other prediction methods were made at the same time as
experiments with RSOM and local models. The main motivation for comparing these
models was showing the fact that local models are more accurately for modeling such
nonlinear time series. Results of this comparison are shown in Table 2.
1
Concept of forming the code of the day and computation of effective temperature is shown in
[1] and [8].
34 Peter Angelovič
5 Conclusions
Prediction system based on RSOM and local models was used for prediction of energy
consumption. Best results were achieved with 4 local models. This result captures the
fact mentioned in [8], that samples (days) of energy consumption time series can be
divided into 4 different groups, according to the type of the day (working day, holiday,
day before or after the holiday). In global, the results of the system are better or
comparable with other prediction methods.
Usage of prediction system based on RSOM has several advantages. First of all, it
is small computing complexity opposite to the global models. Next property is the
unsupervised learning of the context from the data. It allows building models from the
data with only a little a priori knowledge. An important property of RSOM is its
visualization ability. It is possible to visualize the local models, and give
comprehensible information to the user of the system to understand the time series.
References
1. Angelovič, P.: Využitie neurónových sietí s nekontrolovaným učením pri predikcii
časových radov. Diplomová práca, Košice: FEI TU, 2003.
2. Barreto, G., Araujo, A.: Time in self-organizing maps: an overview of models.
International Journal of Computer Research, Vol. 10, No. 2 (2001), 139-179.
3. Box, G., Jenkins, G., Reinsel G.: Time Series Analysis: Forecasting and Control.
Prentice Hall, Englewood Cliffs, New Jersey, 1994.
4. Kvasnička, V., Beňušková, Ľ., Pospíchal, J., Farkaš, I., Tiňo, P., Kráľ, A.: Úvod do
teórie neurónových sietí. Bratislava: Iris, 1997. ISBN 80-88778-30-1.
5. Koskela, T., Varsta, M., Heikkonen, J., Kaski, K.: Temporal sequence processing
using recurrent SOM. Helsinki University of Technology, 1998.
6. McNames, J.: Innovations in local modelling for time series prediction.
Dissertation, Stanford University, 1999.
7. Paralič, J.: Objavovanie znalostí v databázach. Košice: Elfa, 2002. ISBN 80-
89066-60-7.
8. Szathmáry P., Kolcun, M.: Predikcia denných diagramov zaťaženia ES s využitím
umelých neurónových sietí. Košice: Elfa, 2001. ISBN 80-88964-80-6.
Analysis of Massive Networks
György FRIVOLT∗
Slovak University of Technology
Faculty of Informatics and Information Technologies
Ilkovičova 3, 842 16 Bratislava, Slovakia
frivolt@fiit.stuba.sk
1 Introduction
Those networks which are interesting for research usually perform huge number of
vertices and edges. The huge amount of data forces us to think about how to tackle
special and computational complexity. Often the data does not fit the system memory.
Just for a glance: the crawls of a search engine has to process around 200 million web
pages and 2 billion hyperlinks [Newman2003, page 10], the number of
communications in a phone network can scale as 50 million for a month.
There are some ongoing project dealing with massive network analysis and
visualization (Pajek, JUNG, InFlow, DyNet, Cyram NetMiner, etc.). There are
functionalities which are usually aimed by these products.
• Scalability - the range of network size the software can cope with
• Analysis of functionalities - ranking vertices according to their importance,
centrality measurements, clustering
∗
Supervisor doc. Ing. Bieliková, PhD., Institute of Informatics and Software Engineering,
Faculty of Informatics and Information Technologies STU in Bratislava
2 Operations on graphs
2.1 Representations
2.2 Manipulations
Performing graph manipulation can involve two different type of processing of the
graph:
• Generate-mode - A new graph is produced, which is completely independent
of the originally processed one. Generation of a graph from the source graph
causes computational effort when it is executed, but every operation is
performed on the produced graph afterwards.
• Wrap-mode - The graph manipulation decorates the graph under processing
and does not create physically any graph. The produced graph is a kind of a
view of the processed graph. This mode causes small effort when it is
executed, but less computation when the produced graph is being processed.
Also the spatial demands of this operation should be much smaller, as no
graph is generated.
2.3 Operations
Graph operations should serve a basis for making decisions for the user or should
present a list of results which helps navigation in the network. The following
operations were chosen as probably the most relevant for these purposes.
• Clustering – Identification of clusters/community structures in the network.
The input of the clustering operation is a graph and generates a list of clusters,
with vertices they contain, and a hierarchy of clusters.
• Shrinking – Shrinking sets of vertices to one vertex, for instance shrinking
identified clusters to vertices.
• Filtering – Operations for filtering out edges and vertices with given criteria.
• Co-citation network – Operation over the adjacency matrix: E T E
• Ranking – Implementation of vertex/edge importance ranking, such as
centrality measurements [1], PageRank [6] or HITS [2]
Shrinking, clustering and generation of cluster hierarchy are operations of global
decomposition. Local decompositions are cutting out a part of the graph (for instance
vertices of a component) or shrinking all but one cluster produces a context of the left
alone cluster. Fig. 1 shows an illustration of the decompositions.
Local cluster cutting operation produces a subgraph of the input graph, which is
exploited based on an initial seed of vertices.
38 György Frivolt
Changing the graph database representation to matrix or vector representation may not
be always straightforward. The intention of storing the graph in database is keep
possibly the all graph on an external storage. For the most of the graphs the network
stored externally does not fit the memory, therefore approach for cutting out a portion
of the whole data set needs to be proposed.
Our approach is a modified breath-first search algorithm. Whereas the BFS search
prioritizes the vertices based on the distance from the seed vertices, we propose to
consider priorities also as the rate of the number of neighbors already cut-out to the
total number of adjacent vertices.
Analysis of Massive Networks 39
messages also send messages among each other. The average number of “SMS
neighbors”, the average degree of the graph was found to be 6. The computation took 6
hours, 37 minutes. This time will have to be reduced in the future by processing the
data set in the memory.
4 Conclusions
We presented a short description of functionalities required by tool for massive graph
analysis. An algorithm for cutting out a part of the graph was proposed. This algorithm
is necessary for finding a portion of the graph based on the given initial seed, which
can be further processed in the system memory. Finally some first results of the graph
were presented.
The proposed algorithm for graph cutting has to be tested on real data set. There
are also other properties of the graph which are worth of measuring: degree
distribution, degree-correlation [3]. Our main goal is to identify the network clusters
and rank the importance of network vertices and edges.
References
1. Brandes U.: A Faster Algorithm for Betweenness Centrality. Journal of
Mathematical Sociology, Vol. 25 (2001), 163-177.
2. Kleinberg J.M.: Authoritative Sources in a Hyperlinked Environment. Journal of
the ACM, Vol. 46 (1999), 604-632,
3. Newman, M.E.J.: Assortative mixing in networks. Int. Physical Review Letters,
Vol. 89, No. 20 (2002), cond-mat/208701
4. Newman, M.E.J.: The structure and function of complex networks. Int. Physical
Review Letters (2003), cond-mat/0303516
5. Watts, D.J., Strogatz, S.H.: Collective dynamics of small-world networks. Int.
Nature, Vol. 393, (1998), 440-442.
6. Page L., Brin S., Motwani, R., Winograd T.: The PageRank Citation Ranking:
Bringing Order to the Web, Standford Digital Libraries, Technologies Project
(1998), unpublished
An Emergence of Game Strategy
in Multiagent Systems
Peter LACKO∗
Slovak University of Technology
Faculty of Informatics and Information Technologies
Ilkovičova 3, 842 16 Bratislava, Slovakia
lacko@fiit.stuba.sk
1 Introduction
Applications of TD(λ) reinforcement learning [2, 3] to computational studies of
emergence of game strategies were initiated by Gerald Tesauro [4, 5] in 1992. He let a
machine-learning program endowed with feed-forward neural network to play against
itself a backgammon game. Tesauro has observed that a neural network emerged,
which is able to play backgammon on a supreme champion level.
The purpose of this paper is to use TD(λ) reinforcement learning method and
evolutionary optimization for adaptation of feed-forward neural networks that are used
as evaluators of next possible positions created from a given position by permitted
moves. Neural network evaluates each position by a score – number from an open
∗
Supervisor: prof. Ing. Vladimír Kvasnička, DrSc., Institute of Applied Informatics, Faculty of
Informatics and Information Technologies STU in Bratislava
interval (0,1). A position with the largest score is selected as the forthcoming position,
while other moves are ignored. The method is tested on a simplified game of checkers,
where that player wins, whose piece first reaches any of the squares on the opposite
end of the game board. Three different experiments are done. The first experiment uses
only one neural network playing a game against a player simulated by a MinMax
backtrack algorithm with the search depth 3. The second experiment corresponds to a
population of neural networks, which are repeatedly playing a megatournament (each
network against all others). After each game both neural networks are adapted by
TD(λ) according to the result of the game. Finally, the third experiment uses
evolutionary adaptation of neural networks, i.e. reinforcement learning was substituted
by random mutations and natural selection. In all three experiments, the emerged
neural networks won about 60% of games of simplified checkers against MinMax
algorithm with the search depth 3.
In this section, we shall deal with a formalization of the game of checkers, which can
be applied to all symmetric two player games (chess, go, backgammon, etc.). Let the
current position of the game be described by a variable P, this position can be changed
by permitted actions – moves constituting a set A(P). Using a move a′∈A(P), the
a′
position P shall be transformed into a new position P′, P ⎯⎯ → P ′ . An inverse
position P is obtainable from a position P by switching the color of all black pieces to
white and of all white pieces to black. We shall use a multiagent approach, and we
shall presume, that the game is played by two agents G1 and G2, which are endowed
with cognitive devices, by which they are able to evaluate next positions.
Algorithm
1. step. The game is started by the first player, G←G1, from a starting position,
P←Pini.
An Emergence of Game Strategy in Multiagent Systems 43
2. step. The player G generates from the position P a set of the next permitted
positions A ( P ) = { P1 , P2 ,..., Pn } . Each such position Pi from the set of
these positions is evaluated by a coefficient 0<zi<1. The player selects as
his next position such P´∈A(P), which is evaluated by the maximum
coefficient, P←P´. If the position P satisfies condition for victory, then the
player G wins and the game continues with the step 4.
3. step. The other player takes turn in the game, G ← G2 , the position P is
generated from the inverse of the current position, P ← P , the game
continues with the step 2.
4. step. End of the game.
The key role in the algorithm plays the calculation of coefficients z=z(P′) for
positions P′∈A(P). These calculations can be done either by methods of classical
artificial intelligence, based on a combination of depth first search and various
heuristics, or by soft computing methods. We shall use the second approach, where we
shall turn our attention to modern approach of multiagent systems. It is based on a
presumption, that the behavior of an agent in his/her environment and/or certain
actions he/she performs are fully determined by his/her cognitive device, which
demonstrates a certain plasticity (i.e. it is capable of learning).
z(P)
output neuron (1)
information flow
The used neural network has the architecture of a „feed-forward network“ with one
layer of hidden neurons. The activities of input neurons are determined by a numerical
representation x(P) of the given position P, the output activity evaluates the position
x(P) (see fig. 1). The number of parameters of the neural network is 34p+1, where p is
the number of hidden neurons
m
∂z t
∆ w = α ∑ ( z reward − z t ) (6)
t =1 ∂w
where zt=G(Pi,w) is an evaluation of tth position Pt by neural network working as
a cognitive device. Our goal will be, that all the positions from the sequence (2) would
be evaluated by the same number zreward, which specifies, if outcome of the game
consisting from the sequence (2) was a win, draw, or loss for the given player. This
approach can be generalized to a formula, which creates the basis of the TD(λ) class of
learning methods [2]
m
∆ w = ∑ ∆ wt (7)
t =1
t
∂z k
∆ wt = α (z t +1 − z t )∑ λ t − k (8)
k =1 ∂w
where the parameter 0≤λ≤1.
Formulas (7) and (8) enable a recurrent calculation of the increment ∆w. We
shall introduce a new symbol et(λ), which can be easily calculated recurrently
t
∂z ∂z
e t (λ ) = ∑ λ t − k k ⇒ e t +1 (λ ) = λe t (λ ) + t +1 (9)
k =1 ∂w ∂w
where e1 (λ ) = ∂ z1 ∂ w . Then the single „partial” increments ∆wt are determined
as follows
∆ wt = α (z t +1 − z t )e t (λ ) (10)
5 Results
For measurement of game strategy emergency success we used MinMax algorith [1].In
our implementation, we used the following heuristic function:
l m
evaluation = ∑ yn [i ] −∑ ( 8 − ys [i ]) (11)
i =1 i =1
If we denote the number of our pieces on a game board l and the number of
opponent’s pieces m, then we can denote by yn[i] the position of our ith piece along the
y axis (the axis towards the opponent’s starting part of game board). By ys[i] we can
denote equivalent value of the opponent’s pieces.
This evaluation ensures that the MinMax will try to get its pieces toward the
opponent’s part of the game board and it will try to prevent the opponent’s progress.
The play of our player is quite offensive.
Fig. 2. The progress of learning of neural network playing against the MinMax
algorithm with the search depth 3.
In the second, more complicated case, we consider a multiagent system. Its agents
repeatedly play against each other a megatournament, while after each game the neural
networks of both agents are adapted by a reinforcement learning method. For this trial,
we used 20 neural networks. These networks played a megatournament against each
other, and their level of development was measured by a tournament against MinMax
with search depth 3. The learning curve is shown on the fig. 3. The figure shows, that
even though the neural networks were not taught by TD(λ) learning against the
MinMax algorithm, they did learn to play checkers. It means that we did not need an
expert with a good knowledge to teach the networks how to play.
we used the MinMax with search depth 3. The figure 5 shows a learning curve as an
average result of the agents from the population against MinMax with search depth 3.
The population consisted of 55 agents, from which in each epoch a subpopulation of 10
individuals was created. The subpopulation was generated by a quasirandom selection
of agents from the population, which were mutated with a probability 0.5. The
mutation added to each weight of neural network with a 0.001 probability a random
number from a logistic distribution with a parameter 0.1. This subpopulation then
replaced the weak individuals in the population. The figure 4 shows, that even in this
approach a strategy of the game emerged, and resulting neural networks were able to
play at the same level as the MinMax algorithm with a depth-search 3.
6 Conclusions
The purpose of this paper is a computational study of game-strategy emergence for a
simplified game of checkers. It was studied at three different levels. At the first
simplest level we have studied a simple 1-agent system, where an agent (represented
by a neural network) plays against another agent, which is simulated by MinMax
backtrack method with a specified search depth of 3. At the second level, we used a
genuine multiagent system, where agents play repeatedly a megatournament, each
agent against all other agents. After finishing each single game, both participating
agents modify their neural networks by TD(λ) reinforcement learning. At the third
level, a Darwinian evolution is used for all agents from a population (multiagent
systems). In a similar way as at the previous second level, agents play also a
megatournament; its results are used for fitness evaluation of agents. The fitness values
are used in the evolutionary approach for a reproduction process of agents, when fitter
agents are reproduced with a higher probability than weaker agents. In the reproduction
process the weight coefficient are softly randomly modified – mutated, where natural
selection ensures that only better neural networks survive. At all three levels we
observed an emergence of checker game strategy, where at the second and third level
we did not use any user defined agents that are endowed with an ability to predict a
correct strategy and are therefore able to play the game perfectly. This is a very
important moment in our computer simulations; in the used multiagent systems, an
emergence of game strategy is spontaneous and not biased by predefined opponents
that are able to play the game perfectly. Neural networks are able to learn a strategy,
which gives rise to agents with capabilities to play checkers at a very good level.
References
1. Russell, S.J., Norvig, P.: Artificial Intelligence: Modern Approach. Upper Saddle
River, HJ: Prentice Hall, 1995.
2. Sutton, R.S.: Learning to predict by the method of temporal differences. Machine
Learning, Vol. 3 (1988), 9-44.
3. Sutton, R.S., Barto, A.G.: Reinforcement Learning: An Introduction. Cambridge,
MA: MIT Press, 1998.
4. Tesauro, G.J.: Practical issues in temporal difference learning. Machine Learning,
Vol. 8 (1992), 257-277.
5. Tesauro, G.J.: TD-gammon, a self-teaching backgammon program, achieves
master-level play. Neural Computation, Vol. 6, No. 2 (1994), 215-219.
Optimising Multi-Agent Cooperation
Using Evolutionary Algorithm
Marián LEKAVÝ∗
Slovak University of Technology
Faculty of Informatics and Information Technologies
Ilkovičova 3, 842 16 Bratislava, Slovakia
lekavy@fiit.stuba.sk
1 Introduction
In year 1995 the idea of RoboCup was born [1]. The main goal of the RoboCup
initiative is to create a team of fully autonomous robots, which would be able to win
the soccer world championship (with human opponents) by the year 2050. In order to
accomplish this task, many new improvements have to be made, especially in robotics
and artificial intelligence. At the same time, soccer is one of the most (if not the most)
popular sports all over the world, making RoboCup interesting for the wide public.
And this is the ultimate goal of RoboCup: to foster the research, to wake up interest in
robotics and artificial intelligence in scientists and non-scientists.
The players act in a real environment, which means that the information provided
by their sensors is both inaccurate and incomplete, so the players often need to make
their decisions without all the necessary information. At the same time, actions carried
out by the players are subject to random noise, so the result of an action is only partly
∗
Supervisor: prof. Ing. Pavol Návrat, PhD., Institute of Informatics and Software Engineering,
Faculty of Informatics and Information Technologies STU in Bratislava
predictable. The predictability of the environment gets even lower, as there are 11
opponent players trying to achieve an opposite goal. Other important constrain is the
need to act in real-time, making it hard to use several techniques like deliberation
methods or state-space search (especially when the state-space becomes as vast as to be
practically infinite).
Many players in the RoboCup simulation league (but also in other leagues)
consist, more or less, of three basic control layers: basic skills, tactics and strategy.
Basic skills are responsible for simple tasks like running to a place or kicking the ball.
These basic skills form the action primitives in the simulation league. In not-simulated
leagues, the basic skills can be further broken-down into more primitive actions, like
powering-up and -down physical engines. The basic skills are used by the player’s
tactical layer. The tactics decides what sequence of basic actions has to be executed in
order to fulfil a given task. These tasks are usually defined in terms of a specific
domain. In the domain of robotic soccer, these are tasks like “gain the ball”, “defend
opponent player” or “move to home position”. While tactic layer decides, how to fulfil
a given task, the strategic layer decides, what tasks have to be fulfilled in order to fulfil
a given goal. Primitives for player’s strategy are tactic tasks.
The strategic control of a player can range from simple decision tree providing
reactive control to complex deliberative methods. A commonly used strategic method
is space decomposition by formation or other positioning policy. Other interesting
method is central planning done by team coach at run-time, making it possible to create
a plan for the whole team few times during the game. This is however limited by low
communication bandwidth of the coach. Next possibility is to use a Locker-Room
Agreement or similar approaches, making the players execute specific sequences of
actions at a specific situation [2, 3].
In Locker-Room Agreement, the most important issue is how to find appropriate
strategies for reacting to a standard situation. These standard situations are called set-
plays and have an important role in a soccer game. There are several standard
situations, like kick-off, free-kick or corner-kick. One possibility is to use hand-made
strategies, which contain domain knowledge of their creators. However creating them
by hand means great amount of human work. We explored the possibilities of
automated creation of these strategies. This paper describes our experiments with using
of evolutionary and co-evolutionary algorithm to optimise players’ actions in a
standard set-play. The experiments were carried out using the Leaky Cleats (in original
Deravá Kopačka) simulated soccer player [6].
The experiments use our own approach based on evolution, which enables
automated learning of strategies for set-plays. The learned strategies can be then used
during the game to improve players’ performance. The approach is not fully tested yet
and still under development. It yielded, however, good results and seems to be a good
start for further development. Therefore, this paper can be seen as a progress report.
Optimising Multi-Agent Cooperation Using Evolutionary Algorithm 51
2 Used approach
As the base for the used approach, a “standard” evolutionary algorithm scheme was
used [4]. It consists of the following steps:
1. Generate initial population;
2. Generate offspring;
3. Evaluate fitness;
4. Choose next generation from the population and offspring;
5. Repeat steps 2 to 4 while the termination condition is not fulfilled.
In the following text, individual parts of the evolutionary algorithm will be
described, as we applied it to the domain of set-plays in simulated soccer.
2.1 Chromosomes
The first gene in figure 1, for example, says that for the first 5 cycles of the set-
play, the player tries to pass to player number 3. The pass doesn’t go directly towards
the player 3, but is shifted (has an offset) 2 metres forward and 50 centimetres left. For
the next 14 cycles, the second gene is active, which means that the player will pass 4
metres in front of the player 7.
Only the passes were controlled by the chromosomes. When the player was able
to kick the ball, he passed according to the currently active gene in his chromosome.
Whenever the player was not in possession of the ball, he carried out actions
determined by players default logic, like holding formation, intercepting ball or
defending an opponent.
52 Marián Lekavý
2.2 Population
individual
...
... ... ... ... ...
population
a b
Fig. 2. Place of chromosomes in the population. In the evolutionary approach (a), 11
chromosomes (one for each player) build-up an individual and all such individuals
belong to the same population. In the co-evolutionary approach, 1 chromosome
equals to 1 individual. All chromosomes for the same player build-up
one population, yielding 11 different populations.
Optimising Multi-Agent Cooperation Using Evolutionary Algorithm 53
The fitness function has to be created carefully in order to make the evolution converge
to a good solution. In the domain of simulated soccer, the players have to be able to
score a goal. This means, that the fitness function should include the distance of the
ball and opponent goal. Another important metrics of success is loss of the ball. When
the opponent gets the ball, the strategy can be seen as unsuccessful. Therefore, the
fitness function should also include number of cycles for which the team controlled the
ball.
54 Marián Lekavý
3 Results
Both approaches, “classical” evolutionary and co-evolutionary, worked and succeeded
in converging to a solution that fulfils the objectives of the used fitness function. As
only a limited amount of experiments was carried out, it was possible to compare these
two approaches in means of success in finding a working set-play strategy. The co-
evolutionary approach is expected to provide slower convergence, paid back in lower
chance to converge to a local extreme and higher robustness of the found solution.
For finding an appropriate solution, a good fitness function is very important. The
following example shows how fitness function can influence the result of the
evolution: When only ball distance to goal was used as fitness function, a simple
strategy evolved: passing the ball far into opponent territory. This is, of course, a very
poor strategy, as the opponent will gain the ball. It, however, fulfils the fitness
function. After adding number of cycles until loosing the ball, the strategy changed –
the player passed into a free space in opponent territory. It lasted for a long time to an
opponent to get to the ball and the ball was far in opponent half, thus maximising the
fitness function, but not fulfilling the objectives. Another strategy evolved when only
the time until the ball lost was used: players passed deep into own half, into places
where no opponents were placed. These examples show that great care should be given
to fitness function selection as it is of vital importance for good results.
Finally, the following example shows, that even quite complex and working
strategies can evolve using the described approach. Figure 3 shows the sequence of
evolved solutions to the kick-off sequence during one algorithm run. The kick-off
situation implies that all players are on their own halves of the field and our player
makes the kick-off in the centre of the field. At first, random passes were performed, as
the population was randomly initiated. The first strategy found was to pass to the
teammate at the side (figure 3.a). The pass was many times successful, however it was
often intercepted by an opponent. The next solution was passing back and to the side
(figure 3.b). This pass was sometimes intercepted by an opponent, but it was more
reliable. Next improvement found was a pass with negative offset (figure 3.c). The
teammate ran back few metres to get the ball and the opponent had no chance to get the
ball as he had to run a longer way. In the next phase, a pass to own defender and
subsequent pass to the attacker evolved (figure 3.d). It was a progress in getting the
ball to opponent half, but the far passes were few times unsuccessful. The pass–to–side
solution (figure 3.c) was then re-incarnated and improved with a pass forward (figure
Optimising Multi-Agent Cooperation Using Evolutionary Algorithm 55
3.e). This pass was, however, sometimes intercepted, because the attacker running
forward had to run back again and sometimes, he didn’t see the pass while running and
looking forward. Finally, the solution was improved by adding a “loop” of pass back
and forward, that was needed to make the opponents move to places where they didn’t
intercept further passes (figure 3.f). This strategy remained in the population for the
remaining time of the experiment, with minimal modifications. It fulfilled the fitness
objectives – not to loose the ball and to bring the ball forward into opponent half.
a b c
d e f
Fig. 3. Example sequence of evolved solutions for kick-off. Strategies evolve from
simple ones (a) to more complex and better ones. Ball movement is displayed
with thick arrow, thin arrow represents teammates’ movement and dashed
arrow represents opponent players' movement. Only player movement
important for the example is displayed.
4 Conclusions
The approaches seem to work in most cases and deliver usable strategies for set-plays
against one team. It was able to overcome non-determinism of the environment.
Successful strategy evolved in a partially observable environment with random noise.
Experiments with learning strategies against more teams were not carried out and
there could be some difficulties with generalising this approach for more opponents. If
two opponent teams use similar strategies, the solution found for one team could be
used as population initialisation for learning with other team, yielding similar strategy,
but optimised also for the latter team. This, however, can be used only if the two teams
use similar strategies. Other possibility would be to learn more strategies for one
situation and select the appropriate according to an opponent model made during a
56 Marián Lekavý
game. Appropriate strategy could be also selected during a match by simply trying out
different approaches and subsequently using the ones that worked.
The approach is not fully tested yet and still under development. It yielded,
however, good results and seems to be a good start for further development.
Acknowledgement: This work has been partially supported by the Grant Agency of
Slovak Republic grant No. VG1/ 0162/03.
References
1. Kitano, H., Asada, M., Kuniyoshi, Y., Noda, I., Osawa, E.: Robocup: The robot
world cup initiative. In: Proceedings of the IJCAI-95 Workshop on Entertainment
and AI/ALife (1995)
2. Stone, P., Veloso, M.: Task decomposition, dynamic role assignment, and low-
bandwidth communication for real-time strategic teamwork. In: Artificial
Intelligence, Vol. 110, No. 2 (1999), 241-273.
3. Kalyviotis N., Hu H.: A Neural Network decision module for the Adaptive
Strategic Planning Framework in RoboCup. In: Proceedings of International
Symposium on Robotics and Automation, Toluca, Mexico (2002)
4. Kvasnička, V., Pospíchal, J., Tiňo, P.: Evolučné algoritmy. STU, Bratislava, 2000.
5. Potter, M. A.: The Design and Analysis of a Computational Model of Cooperative
Coevolution. PhD thesis, George Mason University, 1997.
6. Lekavý, M., Návrat, P., Kapusta, R., Ulický, M., Košťál, M., Košík, M.:
Multiagent coordination in the domain of robotic soccer. In: ZNALOSTI 2005,
Poster proceedings (2005), 65-68.
Recurrent Neural Network Training
with the Extended Kalman Filter
Peter TREBATICKÝ∗
Slovak University of Technology
Faculty of Informatics and Information Technologies
Ilkovičova 3, 842 16 Bratislava, Slovakia
trebaticky@fiit.stuba.sk
1 Introduction
Recurrent neural networks, in contrast to the classical feedforward networks, better
handle inputs that have space-time structure. They can be used to process word
sequences of languages generated by grammars or sequences with chaotic character,
which is very useful for controlling robotic systems or analysing and predicting of
variations in mechanical equipments. Recurrent neural network learning is a very
difficult numerical problem, which approaches very poorly and slowly to satisfactory
results when being solved with the classic gradient optimisation methods on longer
input sequences. That is the reason for searching for the more effective methods of
recurrent network learning.
∗
Supervisor: doc. RNDr. Jiří Pospíchal, DrSc., Institute of Applied Informatics, Faculty of
Informatics and Information Technologies STU in Bratislava
This paper presents the principles of various methods based on Kalman filtration
that serve as a better alternative to classic gradient methods. First of all we briefly
introduce the reader into Kalman filtration by describing the original Kalman filter
(section 2). Then we describe the extension of introduced Kalman filter to cope also
with the nonlinear systems. So called the Extended Kalman Filter (EKF) (section 3)
can then be used for the task of neural network training. Furthermore, we describe
relatively new filters: Unscented Kalman Filter (UKF), nprKF, as well as their joint
versions UKFj and nprKFj (sections 4, 5 and 6 respectively). These new filters can be
easily implemented and moreover they provide superior performance, which is
demonstrated by two experiments with next-symbol prediction (section 7). The
interested reader can find the detailed description and formulas of these filters in [6].
2 Kalman Filter
Kalman filter, which is the set of mathematical equations, is considered as one of the
important discoveries in the control theory principles. E. Kalman’s article was
published in the year 1960. Its most immediate applications were in control of complex
dynamic systems, such as manufacturing processes, aircrafts, ships or spaceships (it
was part of the Apollo onboard guidance system). It was and still is frequently used not
only in automation, but also in the graphical and economical applications, etc.
However, the Extended Kalman Filter started to appear in the neural network training
applications only relatively recently, which was caused by the progress of computer
systems development.
System's state vector x k (or simply state) is defined as a minimal set of data that
uniquely describes dynamic system's behaviour, where k denotes discrete time. Simply
put, system's state is a vector containing all the relevant variables of the system [2].
1. Process equation x k = Fk ,k −1 x k −1 + q k −1 , where Fk ,k −1 is the transition
matrix taking the state x k from time k − 1 to time k. The process noise q k
is assumed to be additive, white and Gaussian with zero mean and covariance
matrix Q k .
Pk +1 = Pk − K k H k Pk + Q k
where x̂ k is a vector of all the weights, h(.) is a function returning a vector of actual
outputs, y is a vector of desired outputs, K is the so called Kalman gain matrix, P is the
error covariance matrix of the state and H is the measurement matrix (Jacobian).
Matrix H contains partial derivatives of i's output with respect to j's weight. Its
computation is realised either using the Back-propagation algorithm in forward neural
network; or using either Back-propagation Through Time, Truncated Back-propagation
Through Time, or Real-time Recurrent Learning in recurrent network.
60 Peter Trebatický
5 Filter nprKF
The other method, or the other Kalman filter modification is the filter named after its
authors the nprKF [5]. As with the UKF, also with this filter it is not necessary to
calculate derivatives, since the Taylor expansion is in this case replaced by the
Stirling's formula for nonlinear function approximation at the interval, where the
function f is approximated by the second-order terms [4]. This formula may be
interpreted as a Taylor approximation with the derivatives replaced by central divided
differences. The authors worked directly with the Cholesky factors of covariance
matrices in order to achieve numerical stability.
Even though the nprKF authors do not explicitly mention the sigma points, they
in fact also use them and even the same number of them. The analysis in [4] confirms
this, since the state estimate is identical in both filters. But they differ in the covariance
estimation. The nprKF provides slightly better estimate - the differences in covariance
Recurrent Neural Network Training with the Extended Kalman Filter 61
update in comparison with the UKF are in the fourth- and greater-order of the Taylor
expansion. Covariance estimate with the UKF is therefore slightly less accurate and
may sometimes even lead to the non-positive definite estimate [4].
7 Experiments
The main goal of our experiments was to compare the performance of all the
mentioned filters, namely EKF, UKF, nprKF, UKFj and nprKFj, in recurrent neural
network training. In order to linearise a nonlinear system (neural network) in the EKF,
it is necessary to compute the matrix of derivatives of outputs with respect to each
weight. We used the Truncated Backpropagation Through Time (BPTT(h)) for this
purpose according to recommendation in [5].
The next symbol prediction procedure is the following: we present in every time
step the first symbol in order, and the desired network's output is the next symbol in
sequence order. We chose the Elman's network architecture - i.e. the network with one
hidden layer, which is recurrent. The predictive performance was evaluated by the
means of a Normalised Negative Log-likelihood (NNL), calculated over symbolic
sequence from time step t = 1 to T [1]:
T
1
NNL = −
T
∑ log
t =1
| A| p (t ) (s (t ) )
where the base of the logarithm |A| is the number of symbols in the alphabet A
and p ( t ) ( s ( t ) ) is the probability of predicting symbol s (t ) in the time step t. If
NNL = 0, then the network predicts next symbol with 100%, while NNL ≥ 1
corresponds to a very inaccurate prediction (random guessing).
62 Peter Trebatický
0,4
b)
BPTT(h)
0,38
a)
S nprKFj
EKF
X 0,37
T S UKF
B X B nprKF
P 0,36
P V UKFj
T V 0,35
Ideal
Ideal
0,34
0,33
1000
3000
5000
7000
9000
13000
15000
17000
19000
21000
23000
25000
27000
29000
31000
33000
35000
37000
39000
41000
43000
45000
47000
49000
11000
Fig. 1. The NNL dependence of the next symbol prediction (b) in sequence generated
by Reber automaton (a) on the number of symbols for various recurrent neural network
training methods. The ideal value of NNL for this experiment is also displayed.
The training sequence in this experiment was generated by the Reber automaton (Fig.
1a), where the next symbol was chosen with 50% probability from two candidate
symbols, with the exception of cases when the next symbol was B. The Reber's
grammar contains 6 symbols, which we encode using the one-hot encoding and we
present them to the network as its input. This encoding means that a single input is
reserved for each symbol, which we set to 1 and others to 0. The network output is
similarly one-hot encoded.
The prediction of symbols generated by the Reber automaton is a relatively
simple task, since we are able to tell in which state we are solely from the last two
symbols. The problem therefore lies mostly in the “lucky” prediction of one out of two
possibilities, i.e. the neural network after training ought to be able to predict with
which probability each symbol follows. This also results in the fact, that we should not
expect the NNL to be close to zero.
The recurrent neural network with three hidden neurons was trained with each
method. The weight update was performed in every time step. The NNL was computed
for every 1000 symbols. We present the comparison of all the filters by this indicator in
Figure 1b. The graph also contains the curve representing the “ideal” NNL. We obtain
it when we predict the next symbol with the probability precisely 0.5, except for the
cases, when the symbol B follows with the probability 1.
We can clearly see the performance of each method (in the sense of convergence
and final result). The weakest method has shown to be the BPTT(h). The Extended
Kalman Filter converges more quickly and the final result is better by approximately
0.01 in comparison with the BPTT(h). The dominance of the filters UKF, UKFj, nprKF
and nprKFj is evident. The convergence of all these four filters is rapid as opposed to
Recurrent Neural Network Training with the Extended Kalman Filter 63
the BPTT(h), and very quick when compared with the EKF. However, the most
interesting is their final result. The differences are minimal - it is impossible to choose
the “winner”; they all achieved the NNL which is better then “ideal”. We see the
possible explanation of this phenomenon in the fact, that these filters helped the
network to partially learn the system for generating the pseudo-random number applied
during the word creation from Reber language.
0,6 0,6
8 hidden neurons 16 hidden neurons
0,3 0,3
EKF
0,2 0,2
EKF
nprKF
nprKF
0,1 0,1
1 2 3 4 5 6 7 8 9 10 11 90 91 92 93 94 95 96 97 98 99100 1 2 3 4 5 6 7 8 9 10 11 90 91 92 93 94 95 96 97 98 99100
Fig. 2. The NNL dependence on the training cycles for various recurrent neural
network training methods for the next symbol prediction in the “laser” sequence.
The predicted sequence is based on real data obtained by quantising activity changes of
laser in chaotic regime [1]. The bounds were chosen for positive small and big activity
change and for negative small and big activity change. One symbol is assigned for each
of these categories. The sequence therefore contains four distinct symbols, where
relatively predictable subsequences are followed by much less predictable events. The
sequence length is 10000 symbols; we can therefore predict 9999 symbols. The aim of
this experiment is the performance comparison of various recurrent neural network
training methods. Since the nprKF is comparable or better than other divided
difference filters (also confirmed in other experiments), we compared it only with the
EKF and BPTT(h).
We have used the training and testing procedure for the next symbol prediction
from this sequence from [1]. We do not update the weights for the first 50 steps in
order to lessen the impact of initial recurrent neurons output values. The training then
takes place during next 7949 symbols. The remaining 2000 symbols forms the test data
set, through which we compute the NNL. That terminates one cycle. Ten cycles are
sufficient for the filters, 100 for the BPTT(h). We have used one-hot encoding for
inputs as well as for outputs.
The results for 8 and 16 hidden recurrent neurons are showed in Figure 2. The
figure shows that the Extended Kalman Filter is again significantly better than the
64 Peter Trebatický
BPTT(h). Similarly the nprKF again achieves visibly better performance than the EKF.
One can also spot the fact, that the more hidden neurons, the better performance.
8 Conclusions
We described the basic principle of the Extended Kalman Filter, Unscented Kalman
Filter, the nprKF and their joint versions. The detailed description and formulas of
these filters can be found in [6].
The main contribution of this paper is the direct comparison of all the filters in
experiments, where they are used in the recurrent neural network training task for the
next symbol prediction. In the results from these experiments one can see much better
performance of the filters UKF, nprKF, UKFj and nprKFj (they all achieve comparable
results) when compared with the EKF. On the other hand the EKF filter achieves
definitely better results in comparison with the classic gradient method BPTT(h).
As far as we know, this paper describes the first application of the UKFj filter in
the context of recurrent neural network training.
References
1. Čerňanský, M., Makula, M., Beňušková, Ľ.: Processing Symbolic Sequences by
Recurrent Neural Networks Trained by Kalman Filter-Based Algorithms. In:
SOFSEM 2004: Theory and Practice of Computer Science, Matfyzpress, Praha,
Vol. 2 (2004), 58 - 65
2. Haykin, S., Puskorius, G.V., Feldkamp, L.A., Patel, G.S., Becker, S., Racine, R.,
Wan, E.A., Nelson, A.T., Rowels, S.T., Ghahramani, Z., van der Merwe, R.:
Kalman Filtering and Neural Networks. John Wiley & Sons, NY, 2002.
3. Julier, S.J., Uhlmann, J.K.: A New Extension of the Kalman Filter to Nonlinear
Systems. In: Int. Symp. Aerospace/Defense Sensing, Simul. and Controls, Orlando,
FL (1997)
4. Nørgaard, M., Poulsen, N.K., Ravn, O.: Advances in Derivative-Free State
Estimation for Nonlinear Systems. Technical report, Revised edition, Technical
University of Denmark, 2000.
5. Prokhorov, D.V.: Kalman Filter Training of Neural Networks: Methodology and
Applications. In: Int. Joint Conference on Neural Networks, IJCNN2004 Tutorials,
Budapest, Hungary (2004)
6. Trebatický, P.: The Recurrent Neural Network Training with the Extended Kalman
Filter. Neural Network World. Submitted for publication.
Security,
Computer Systems
and Networks
Complexity Analysis of Routing
Algorithms in Computer Networks
Peter BARTALOS∗
Slovak University of Technology
Faculty of Informatics and Information Technologies
Ilkovičova 3, 842 16 Bratislava, Slovakia
peter.bartalos@stonline.sk
1 Introduction
The routing is one of the latency sources in communications network. Routing
algorithm has a task to determine the suitable port for delivering message addressed to
one network node. The aim is to have the fastest routing available in the network. The
case of every node sending the message to each other by correct delivery can be
considered as optimal one. It could be achieved by keeping a table of size O(n) by
every node, where n is the number of nodes. It is not very suitable in larger networks.
There are lots of methods which memory demand for the data holding required for
routing is very low. To ensure effective routing with the best possible throughput it is
important to identify and analyze complexity of routing strategies. In this paper we will
use the classic operators of asymptotic notation.
∗
Supervisor: Mgr. Martin Nehéz, Institute of Informatics and Software Engineering, Faculty of
Informatics and Information Technologies STU in Bratislava
1.1 Preliminaries
2 Routing tables
The principle of routing with routing tables is straightforward. Every node keeps a
table with entries for each other node. Using these entries, it could be determined via
which outgoing port a message had to be sent.
2 4
Destination Port Destination Port
1 0 1 0
3 1 2 0
4 1 1 0 3 0
5 1 5 1
0 3 1
0 1
Routing with routing tables is today a dominant strategy. There are lots of
methods to reduce the memory demand for the data holding required for routing. The
aggregation is one of the most important. It is based on that we don’t hold information
for each node in network but only for subnetworks to which nodes belong. This way
one can excessively reduce the size of routing tables.
1
number of bits
2
number of operations
Complexity Analysis of Routing Algorithms in Computer Networks 71
Algorithm 1.
The algorithm is understood for routing in node u ∈ V .
Input: destination node d, message m.
A data structure table[] is a field which implements the routing table. Its size is n and it
stores identification labels of ports which are positive integers. It is organized in such a
manner that in i-th position is stored an ID-number of port via which a message
addressed to a node w ≠ u is forwarded.
receive(m, d);
if d = = u then OK
else
p = table[d];
send(m, d) to p;
Theorem 1. Routing with routing tables requires O (n log ∆ ) bits to store the routing
information.
Proof. The size of registers in RAMs depends on the number stored in it3. We need
⎡log 2 ∆ ⎤ bits4 to keep port numbers. We need to store n such values. Hence the
memory requirements are n.⎡log 2 ∆ ⎤ = O (n log ∆ ) bits.
Theorem 2. Time complexity of Algorithm 1 in RAM model with unit cost criterion
is O(1) .
3
in difference with real computers with fixed register sizes
4
from Lemma 1.
72 Peter Bartalos
3 Interval routing
Interval routing is a space efficient routing strategy used in computer networks. This
method gaining a great interest because of accessible implementation chips available
on the market. The basis of interval routing idea is to label all of the nodes with integer
from one set (for example {1, 2, 3,..., n}) and labeling of all arcs with interval (in range
of number of nodes). These intervals means that a message addressed to a node labeled
with u, via a port labeled with interval which includes a node u is forwarded.
2 4
[3, 5]
[1, 3]
[1]
[1, 2] 3 [4]
[5]
[5] [4]
[2, 5]
m [1, 3]
1 5
Definition 1:
Interval labeling scheme (ILS) of graph G = (V, E) is a scheme, where:
1. a node labeling is an assignment of unique labels to nodes of V
2. for each node v ∈ V, an edge labeling is an assignment of disjoint intervals to
arcs e ∈ I(v), where I(v) denotes the set of arcs outgoing from v
Complexity Analysis of Routing Algorithms in Computer Networks 73
An interval routing scheme, denoted also IRS, in a graph is a valid ILS. The
validity means that the routing strategy guarantees that the message will always be
delivered to its destination using that ILS.
Proposition 1. [12] The validity of every ILS can be checked in O(n2) time, where n is
the number of nodes of the graph.
Proposition 2. [11] For general graphs, the problem of deciding whether G supports
1-IRS is NP-complete.
Proof. Let us denote φi(u) the number of intervals which belongs to port i in node u.
We know that we denote every port with at most k intervals in k-IRS, so φi(u) ≤ k.
∑
ϕ i (u) represents Ψ (u ) . Since Ψ (u ) =
∀ports
∑
ϕ i (u ) ≤
∀ports
∑
k = k deg(u ) ≤ k∆ for
∀ports
Algorithm 2:
The algorithm is understood for routing in node u ∈ V .
Input: destination node D , number of intervals in node Ψ .
Output: port number.
Other variables: index of interval I .
Algorithm uses these functions:
• int getLeftBorder(int i) returns the lower bound of interval stored
in i-th position in sequence P1 = (a1,...,aψ) of lower bounds of intervals.
5
from definition of O-notation
74 Peter Bartalos
Theorem 3. Provided having a graph G and let u ∈ V(G). Assume that it is possible to
create k-IRS for G. We need than O(k deg(u ) log n) bits to keep routing information
in node u. The space complexity for a whole network is O(k∆ log n) , since we can
substitute deg(u) by ∆ .
Proof. For a convenience, let us assume only a linear k-IRS. The proof for a general
(i.e. nonlinear) k-IRS can be done by a similar manner. In all nodes we will denote the
i-th interval in node [ai, bi] for i ∈ {1,..., Ψ } and the port to which this interval belongs
we will denote pi. Let us assume that intervals [ai, bi] are increasingly sorted and linear.
Recall that P1 = (a1,...,aψ) is a sequence of lower bounds of intervals and P2 = (p1,...,pψ)
is the sequence of ports such that pi is a ID-number of port via which a message
addressed to a node included in interval [ai, bi] is forwarded. Than we only need to
store these two sequences for routing. It is not necessary to keep upper bounds bi of
intervals. We can evaluate them: bi = ai+1-1 for i < Ψ and bi = n for i = Ψ . Storing the
lower bound requires O(log n) bits and the number of port O(log ∆) bits. In both
sequences we have exactly Ψ members. Totally we need Ψ.(O(log n) + O(log ∆ ))
bits. As ∆ < n, therefore also log ∆ < log n . It yields
Ψ.(O(log n) + O(log ∆)) = Ψ.O(log n) = O(Ψ log n) = O(k∆ log n) .
n
Proposition 3. [11] A more accurate coding allows us to use only O (k∆ log ) bits
k
per node.
Assume the encoding of subsection 3.2, finding the interval which belongs to the
destination node requires looking in at most Ψ intervals. Using sequential searching
the time complexity is O(Ψ ) . However P1 is sorted, we can reduced the time. We
obtain the following results.
Theorem 4. Time complexity of Algorithm 2 in RAM model with unit cost criterion is
O(log(k∆)) .
Complexity Analysis of Routing Algorithms in Computer Networks 75
Proof. It was showed in [5] that the complexity of binary searching is O (log n) for n
element list. Assuming the Algorithm 2 the resulting complexity is
O(log Ψ ) = O(log(k∆)) .
4 Conclusions
The main results of this paper are summarized in Table 1.
Tab. 1. Summary
Routing tables Interval routing
Space complexity O(n log ∆) O(k∆ log n)
Time complexity O(1) O(log(k∆))
Our results can be used mainly to estimation of latency of message passing in wide-
area networks.
References
1. Aho, A., Hopcroft, J., Ullman, J.: Design and Analysis of Computer Algorithms.
Addison-Wesley. 1974.
2. Bakker ,E. M., Leeuwen, J., Tan, R. B.: Linear Interval routing. Department of
Computer Science, Utrecht University, 1991.
3. Bartalos, P.: Complexity analysis of routing algorithms in computer networks.
Bachelor thesis (in Slovak). Faculty of Informatics and Information Technologies,
STU. December 2004.
4. Bodlaender, H. L., Leeuwen, J., Tan, R. B., Thilikos, D. M.: On Interval Routing
Schemes and Treewidth. Department of Computer Science, Utrecht University.
1996.
5. Cormen, T., Leiserson, C., Rivest, R.: Intorduction to lgorithms. MIT Press, 1990.
6. Flammini, M., Leeuwen, J., Spaccamela, A. M.: The Complexity of Interval
Routing on Random Graphs. Comput. J. 41 (1)(1998) 16-25.
7. Fraigniaud, P., Gavoille, C.: Interval routing schemes. Algorithmica 21 (1998)
155-182.
8. Gavoille, C., Nehéz, M.: Interval routing in reliability networks. Theoretical
Compurer Science. Vol. 333, No. 3, (2005) 415-432.
9. Gavoille, C., Nehéz, M.: On Interval Routing in Random Meshes. In: Proc.
Eurocomb '03 (J. Fiala ed.), ITI Charles University Prague (2003), 147-150.
10. Gavoille, C., Peleg, D.: The compactness of interval routing for almost all graphs.
SIAM J. Comput. 31 , No. 3 (2001),, 706-721.
76 Peter Bartalos
11. Gavoille, C., Peleg, D.: The compactness of interval routing. Université Bordeaux.
1999.
12. Gavoille, C.: A survey on interval routing. SIAM J. Discrete Math. 12, No. 4
(1999), 459-473.
13. Gruska, J.: Foundations of Computing. Int. Thomson Computer Press. 1997.
14. Lau, F. C. M., Tse, S. S. H.: A Lower Bound for Interval Routing in General
Networks. Networks 29 , No. 1 (1997), 49-53.
15. Lau, F. C. M., Tse, S. S. H.: On Two-label Interval Routing. Department of
Computer Science The University of Hong Kong. 1996.
16. Lau, F. C. M., Tse, S. S. H.: Two Lower Bounds for Multi-Label Interval Routing.
In: Proc. of SIROCCO '95, Carleton Scientific Press, 123-134
17. Lau, F. C. M., Tse, S. S. H.: On the Space and Traffic Problems of Interval
Routing. Department of Computer Science The University of Hong Kong. 1997.
18. Lau, F. C. M., Tse, S. S. H.: More on the Efficiency of Interval Routing.
Department of Computer Science The University of Hong Kong. 1998.
19. Nehéz, M.: On Subgraphs with Compactness 1 in Random Meshes. In: Proc. 3rd
International Conference APLIMAT 2004, Dept. of Mathematics, Faculty of
Mechanical Engineering, Slovak University of Technology, Bratislava (2004),
729-734.
20. Leeuwen, J., Tan, R. B.: Interval routing. Comput J. 30 (1987), 298-307.
Enhancing the Work and Preparation of
Instructors Teaching in Cisco Networking
Academy Program (CNAP)
Peter MESJAR∗
Slovak University of Technology
Faculty of Informatics and Information Technologies
Ilkovičova 3, 842 16 Bratislava, Slovakia
pmesjar@centrum.sk
1 Introduction
Cisco Networking Academy Program was developed by Cisco Systems Inc. because of
high demand for skilled engineers knowing how to design, install operate and
troubleshoot computer networks. As the interest among students as well as educational
institutions grew so did the e-learning program evolve and continue to do so. Currently
it does not only teach various subjects relating solely to computer networks, but other
courses include programming in Java, web page design, fundamentals of computer
technology, fundamentals of UNIX operating system and numerous other courses. So
far courses are mainly computer related, however this does not mean CNAP can be
∗
Supervisor: doc. Ing. Pavel Čičák, PhD., Institute of Computer Systems and Networks,
Faculty of Informatics and Information Technologies STU in Bratislava
implemented only for field of computer technology. CNAP is whole e-learning system
incorporating professionally developed study material accompanied by hands-on
laboratory exercises, on-line testing, CNAP users and student records tracking and
class management to name just a few of its main features. Following pictures display
some of the functionality of CNAP e-learning system [1].
2 Instructor preparation
Before I explain the problems current study material is facing, I will introduce the
structure how practical laboratory exercises are presented to the students as well as
instructors. However it needs to be pointed out that my work deals solely with
shortcomings of practical laboratory exercises and has nothing to do with potential
problems of study texts, where the theory is explained that need to be read before
moving to practice in labs.
The usual structure followed by all laboratory exercises presented by original
CNAP material is as follows. Every laboratory exercise begins with a sample picture
(figure 3, [1]) showing how the equipment students and instructors will be practicing
on needs to be connected together.
80 Peter Mesjar
The text following the picture is divided into step by step instructions. Each step
instructs students in detail what they need to accomplish and what to configure on their
lab equipment. Additionally there are numerous questions aimed to reinforce students’
knowledge on the subject. Sample step by step lab structure is displayed on figure 4
(sample laboratory exercise is from [1]).
First problem can be identified under the closer inspection of lab setups described by
pictures like the one on figure 3. The problem lies in their simplicity. Most of the
computer networks are large and while teaching students and preparing instructors on
such simple scenarios is sufficient at beginner level of education, it is not adequate and
sufficient as students and instructors progress with their studies. Also explaining of
how more advanced and complex routing protocols and other techniques used in
modern computer networks work on simple lab setups is missing the desired effect.
Additional problem with such simple scenarios is that they are lab scenarios and are
not even trying to simulate real life networks and real life problems.
Further inspection of the structure of original material yields to another problem.
Laboratory exercise is divided into step by step instructions. Each step incorporates
what are students expected to do with their laboratory equipment, how to accomplish
the goal and series of questions to reinforce student knowledge of the subject. The
problem with original study material lies in the method of “how to accomplish the
goal” is presented to students. The “how to” is written in such detailed way that all the
student is required to do during laboratory work is to copy the directions directly from
the lab material and without even understanding what he is doing his lab will work
almost flawlessly. Presenting the labs written in this way imply additional problems.
Student does not need to prepare himself by reading study texts before coming to the
lab for practice. He does not even need to understand what is happening and the labs
will just work.
Last problem lies in the form of questions included with laboratory exercise. Most
of the time they are just plain simple like “copy this number from the output of this
command”. Other questions are just asking for wrong or completely non-important
information, which may sometime even confuse students.
The proposed solution to all shortcomings original material is facing is to
completely rewrite original material and adapt all laboratory exercises to the
environment where the teaching takes place.
Lab setups described by accompanying pictures should be made more complex,
including more equipment and trying to simulate more real life situations.
The “how to” method of solving the lab exercise original material presents is the
main concern here. At least this part needs to be rewritten or the lab exercises will be
nothing more than directions that if followed everything will work without even
understanding the underlying processes. Proposed solution here is to create step by step
instructions in such way the students will be required to figure out how to make the lab
work from what they have learned by reading the study text and/or by consulting the
instructor during the lab.
The problem of questions can be solved by class discussion. Here the instructor
role is very important. By asking the right questions student knowledge on the lab
subject together with underlying theory will be reinforced. Most important part in
solving this problem is well-prepared and knowledgeable instructor.
82 Peter Mesjar
3 Conclusions
Rewriting the labs so they are adapted to the environment where the instructor is
teaching will greatly help the instructor to understand every aspect of practical
scenarios presented to students during lab work. Since I am also an instructor of CNAP
I can say from my own experience this helped me to understand computer networking
theory much better, helped me to know every way in which the equipment used during
the lab can go wrong. I can react to student or other instructor questions much faster
and I can answer more and more of their questions without further consulting
additional material.
Rewriting the original materials to adapt to our teaching environment not only
helped me but also the students I am teaching. They are getting better grades in online
testing, better understand the theory they study and better react to real life problems
posed to them by everyday life at work or at school.
References
1. CCNA practical laboratory exercises. http://cisco.netacad.net
Methods for Improving Security
of GNU/Linux System
Tomáš ZAŤKO∗
Slovak University of Technology
Faculty of Informatics and Information Technologies
Ilkovičova 3, 842 16 Bratislava, Slovakia
woody@ynet.sk
∗
Supervisor: Ing. Branislav Steinmüller, Institute of Applied Informatics, Faculty of
Informatics and Information Technologies STU in Bratislava
1 Introduction
The requirement of quality increase, sharing resources or cost saving, which cause, that
control technique is still more and more including information systems, is necessary.
Usually, the first step is virtual equipment or whole virtual laboratories, which
purpose is control process simulation. In the next step virtual equipments are
substituted with real equipments and control process are made inside laboratories. This
step is kind of preparation for employment control process in real control applications.
Computer networks are relatively new part of control technique. They offer
possibility of remote control. For operator this fact allows to move away from control
process or even to become a mobile and control process from almost any place of the
world.
∗
Supervisor: Ing. Čičáková Oľga, Department of Measurement, Faculty of Electrical
Engineering and Information Technology, doc. Ing. Kotočová Margaréta, Institute of
Computer Systems and Networks, Faculty of Informatics and Information Technologies STU
in Bratislava
2 Control possibility
In present time it is possible to control process in local or remote mode so these two
terms should be explained.
Local mode control is the form of control, where the signals are transported by
electric conductor, RS234, GPIB, VXI, PROFIBUS etc. Individual parts of working
place can be interconnected with each other or with control computer. The control
computer controls whole working place [fig. 1]. In this case control computer is only
control element in entire system. Very often, in local mode control, all parts of control
system are placed near each other.
equipment
Remote mode control. Control is becoming remote if a network and next one or
more computers are connected to the local control system. After that control computer
is called “local client” and other computers are called “remote clients”. One of the
remote clients can control process. In this case this remote client is called “control
client” [fig. 2]. Some present control equipments have RJ45 interface and can be
connected directly to network.
remote client
local client
network
control client
Remote Desktop is next solution for extension of local mode control to remote
mode control without any changes made in existing software. With the Remote
Desktop your computer can be remotely controlled from another place. It is allowed to
use the data, applications, and network resources that are on local client, without being
in the same room [4].
4 Existing solutions
Control system development is complicated and expensive work. Companies
developing control systems deliver remote control possibility as a small part of whole
system. The most widely used products are SIMATIC, Matlab, DataSocket [3].
Existing solution advantage are easy implementation and support. On the other side
disadvantage are higher price and more complicated scalability.
5 Design
The system was split into tree mutually communicate parts: local client, remote client
and server. TCP is used as a network protocol.
In the present time local client is the system for local control workplace for calibration
of digital electricity meters [1].
Local client functions:
• receiving of commands from the server and their transformation to suitable
format for the connected equipment
Computer Networks and Remote Control 87
5.3 Server
This part is separated because of the security and better user management.
Server functions:
• remote client’s identification and authentication
• ensure mutual exclusion for remote clients
• data distribution from the control client to the local client
• distribution of respond from local client to all remote clients
• update of list of clients and their activity.
88 Michal Kubík
As it was mentioned above one of the tasks for local client is data transform from
control client to the right equipment and back. Present workplace contains equipments
with different data format. The general data format to abstract from equipment type
was designed.
General data format
TYPE PRIORITY ADDRESS DATA EXTENSION
a) COMMAND data type. This message is from control client to local client sent.
COMMAND PARAMETERS DURATION TTSC
b) RESPOND data type. This message is from local client to remote clients sent.
ICOMMAND RESPOND
There are two reasons why original message is sent in RESPOND message
1. Respond from local client is to all remote clients routed. In this message has
to be information to which command respond comes.
2. Remote client can in batch mode work and so sent batch of commands sent.
Responds one by one with a delay comes and if field PRIORITY is used, then
also in different order. In this case all remote clients would have to keep list of
commands for which respond wait.
This solution disadvantage is that respond can be shorter than command often.
Computer Networks and Remote Control 89
It is assumed, that local client and server will be placed inside of the LAN. Remote
clients will be connected from outside of the LAN [fig. 3.]. For remote clients access to
LAN is established by VPN. Connection security is made by IPSec on network layer.
IPsec works in tunnel mode. Security is the priority of connection so ESP protocol is
used.
passive client
server Tunnel
local client
GPIB,VXI
Internet
equipment LAN
6 Conclusions
This article shortly describes possible remote control process solution and briefly
existing commercial solutions in this field. Design describes remote control calibration
workplace which is used for calibration of digital electricity meters inside of LAN. It is
assumed that the ports for TCP protocol are permitted and access to the LAN will be
able only for authorized users. There is also short design of remote control over
Internet. In the future the implementation of remote control over LAN should be made,
design for remote control over Internet should be finished and implemented.
References
1. Skladan, B.: Programové vybavenie pre kalibračné pracovisko s EKS 05-3.
Bachelor final project, Bratislava, 2004.
2. Halva, T.: Internetové procesy usnadňují řízení procesů na dálku. Automa, Vol.10,
No.4 (2004), 6-7.
3. Integrating the Internet into Your Measurement System. DataSocket Technical
Overview.
4. http://www.microsoft.com/slovakia/windows/xp/pro/evaluation/overviews/remotea
ccess.asp, 22.03.2005.
Network Communication Simulator
Tomáš BACKO, Juraj BUNO, Jozef BURÁK, Daniel KATANA,
Marek KOPRLA, Peter PULLMAN ∗
Slovak University of Technology
Faculty of Informatics and Information Technologies
Ilkovičova 3, 842 16 Bratislava, Slovakia
juing@post.sk
1 Introduction
Because the present day shows us great boom of computer networks, and not only in
big corporations, but in small firms and households as well, the demand for knowledge
from this area is great and eminent.
The purpose of this project is to allow the user to understand the functionality of a
computer network, and it is possible for to design the whole network and set it into
correct activity. At the same time the user can observe, what is going on inside the
network and this way understand the logic of network communication.
Nowadays, various tools exist, which in some way simulate a computer network
and allow its configuration. But those products cover mostly only specific areas of the
whole problematic. There are simulators for the router console to simulate CLI,
∗
Supervisor: Ing. Katarína Jelemenská, PhD., Institute of Computer Systems and Networks,
Faculty of Informatics and Information Technologies STU in Bratislava
3 Simulation model
The following subsections describe the model of a real computer network environment
from the view of the simulation process. Model of the simulation is a part of the
application.
The goal, pursued already from the specification, was to sustain the chronology of
stochastic events in the simulation, which appear in the real world of computer
network. Because of this the system was understood and designed as a queuing system.
By stochastic events we mean the behavior of virtual users or the impact of outside
factors as well.
The simulation is based on cooperative threads (farther processes), which interact
using simulation time and buffer memories of FIFO type. These resources are
implemented using Tiny library, which was designed to simulate discrete systems
based on events. Itc was implemented at KIVT FEI STU, Bratislava in the year 1996
and is not the subject of this work.
The library is not designed for continual simulation requested by the application.
If no more events are scheduled, the simulation ends. The solution of this problem lies
in creating a process, which schedules itself and doesn't perform any other activity
connected to the simulation. This process serves for indicating the simulation time to
the user and dynamic adding and canceling of network components while the
simulation is running. But consequently, the problem how to correctly end the
simulation arose (e.g. when application is exiting). It was solved by making each
process determine if the simulation should not be terminated. If so the process does not
schedule any more processes. It is obvious, that the termination can take some time
depending on the size of topology.
92 Tomáš Backo, Juraj Buno, et. al.
For the simulation to have some value for the user, it must run conformly with the
real time. That means it has to be artificially slowed down so that the simulated time
would be associated with the real time. This was achieved by sleeping the simulation
thread between two scheduled events for a time, which segregates those events. This
concept solved some further limitations of the library, including the interaction with
the user. It is obvious that the real delay is strongly dependent of computers free
resources. We don't find this fact to be too serious.
The behavior of individual components of the network, e.g. switches or routers, is
deterministic and can be described by an algorithm. Their behavior will be controlled
only by external parameters entered by user. The model and the way it works is
described in further chapters.
3.2 Host
HOST CPU
DHCP server
(facility)
DHCP service
ARP DHCP client
cache
UDP service
DNS server
DNS service
DNS client
ethernet
interface WEB server
IP service
process HTTP service
WEB client
TCP service
FTP server
FTP service
port FTP client
connection
{MAC, IP, mask}
PING proces s
ICMP service
console TRACERT
proces s
3.3 Router
In the figure 2, the router structure is shown. Here, it must be stated, that the
implementation of parts identical with the host computer do not have to be the same.
The number of interfaces is always greater then 1.
Link layer Network layer Transport layer Application layer Applications
port
ROUTER
ethernet ICMP service
{MAC, IP, interface PING proces s
connection mask} process
TRACERT
proces s
port ethernet
{MAC, IP, interface routing CPU
connection table CLI console
mask} process (facility)
3.4 Switch
Implementation of the switch (figure 3) is different from the previous cases, especially
in its interfaces, there is no ARP protocol used. This is applied on the higher layer,
since the switch has the same MAC and IP on each port.
Link layer Network layer Applications
SWITCH
port ethernet STP service
{MAC, IP, interface PING process
connection mask} proces s ICMP service
TRACERT
process
switching switching
IP service
table process
CPU
(facility)
ARP
cache
port ethernet
{MAC, IP, interface
connection CLI console
mask} proces s
3.5 Link
4 Implementation
The application is implemented using object oriented approach in C++ in Microsoft
Visual Studio .NET, Microsoft Visual SourceSafe to control the versions.
Program consists of a simulation thread and the user interface thread. Each
process consists of an infinite loop, in buffers the process function is executed, and
input (output) FIFO.
The process picks up so-called transactions (packets or requests) from its input
buffer, processes them, identifies target process and writes them to input of another
processes. But if those are passive (not scheduled) it must schedule their start in time 0.
The specific of some protocols are the timers. Those are mostly solved as single
processes working with of executive processes to which they belong.
In reality, IP and higher layers are implemented by operating system. In order to
obtain representative times, the simulated device must occupy one single virtual
processor (or all the processes would be executed simultaneously). This process is
implemented as an independent process with one input buffer and one servicing
facility. If a process is active, it inserts the task into this buffer and gets to passive
status. It will be awoken by virtual processor process. To avoid being awoken by other
process (using the above scenario) it must set an added state, which informs, that the
process awaits for the end of task processing (it is passive from the side of the
simulation).
5 Achieved results
The basic network components can be added into the network, they can be connected
optionally even during the simulation (mentioned interaction of the simulation with the
user). The created topology can be saved into a file, and loaded back at any time. The
configuration of all network components is saved as well. All of this by using user
friendly graphic user interface.
Topology can be tested using the program PING or TRACE ROUTE, further,
TCP connections can be established using HTTP or FTP protocol. Every host computer
can be configured (IP address, running application services, etc.) using a dialog
window. Routers and switches are configured by a CLI console, which simulates the
behavior of original devices very realistically.
For each component of the network, the statistic information, like number and
types of received and sent packets or processor usage of the device, can be shown in
Network Communication Simulator 95
the application window. It is also possible to generate load between the elements of the
topology and simulate the error rate of the link. Information about what which
component of the network executed are shown as well, where the level of details can
be configured and information can be filtered. The printout of every component is
differenced by color.
6 Conclusions
The main goal of this work was to create a software tool, using which, the user can
create and test his own virtual computer network. Tiny library has permitted us to
approach very closely to a real network behavior. It means that the communication in
each node copies the communication model TCP/IP, which designates this application
for more development and implementation of simulated protocols. The modular object
oriented architecture of the program helps this as well. This model allowed us to create
a whole package of protocols and tools, giving the user the option to test the network
not only based on the availability of individual nodes, but from the print of view of
their usage as well.
Another advantage of the software is its usability in the pedagogical process.
Students can gain experiences not only by functional testing of created topologies, but
by configuring them and testing them as well.
We encountered many difficulties when developing this tool. We managed to
overcome them only by the successful cooperation of the team members and thank to
the support and consultations with Ing. Solčány and the project leader Dr. Jelemenská.
References
1. Dostálek, L., Kabelová, A.: Velký průvodce protokoly TCP/IP a systémem DNS.
2nd release Praha: Computer Press, 2000. 426 p. ISBN 80-7226-323-4.
2. Hedrick, C.: Routing Information Protocol. Rutgers University. 1988, RFC1058,
33 p.
3. IEEE 802.1D: Media Access Control Bridges PART 3. IEEE. 1998, 373 p.
Security Mechanisms in Grid
Environments
Adrian BAGALA, Roland BOTT ∗
Slovak University of Technology
Faculty of Informatics and Information Technologies
Ilkovičova 3, 842 16 Bratislava, Slovak Republic
{bagala,bott}@fiit.stuba.sk
1 Introduction
Computational grid is a technology allowing IT resources of various organizations,
institutions or individuals to be commonly used, creating one unified structure. It is
used mainly for complicated and time consuming computation tasks. These
computations run within the environment mentioned above are known as grid
computing.
The infrastructure appears for the user as a single powerful computational system.
So the grid is an abstraction allowing transparent and easy access to distributed
computational resources. It consists of a number of interconnected resources like
computational systems, data storages and the connections between these systems. The
entities of this structure could be geographically spread and the interconnections are
provided by network infrastructures.
The required features of the grid are security, reliability, effectiveness, low price
and high throughput for computational applications. This article is focused mainly on
the current most used security technologies implemented in the most grid environments
∗
Supervisor: doc. Ing. Ladislav Hudec, PhD., Institute of Computer Systems and Networks,
Faculty of Informatics and Information Technologies STU in Bratislava
such as the well known Globus Toolkit. The security is mainly focused on the
identification, authentication and authorization of the grid users. These security
technologies are similarly used in community solutions of individual access as well.
GSI uses for authentication purposes certificates of public keys X.509 and SSL. These
certificates assign to grid subjects or entities unambiguous names and are signed by
Certification Authority [5].
The format of the certificate used in the Internet is described in RFC-3280 [6].
The certificate consists of the following basic parts:
• number and version of the certificate
• name and ID of the subject and the issuer
• public key of the subject
• the validity period of the certificate
• extensions of the certificate
• the identifier of the signing algorithm
• digital signature of the CA
The proxy certificate is based on the X.509 certificate. It was set up to help perform a
job process on a remote resource, to which a user has been granted access within the
grid. For numerous processes a chain of short-term proxy certificates is created, also
known as user proxy. Processes, belonging to one user but running on various remote
resources, using these proxy certificates authenticates themselves without the need of
an interactive user authentication. The certificate is signed by the user itself or by one
of the user proxies. The process of remote proxy creation is called delegation, where a
new private key is created along with the certificate of the corresponding public key,
which is signed by the key from the creator’s X.509 certificate.
The user’s private key with long-term access rights attached is protected using various
methods, which needs manual authentication. This process is needed to protect the
private key. But this could be graceless when the user needs to access the key all the
time, using it for authentication on remote resources [4].
The proxy certificate is addressing this problem, enabling sign-on. It makes
possible for the user to authenticate manually only once at the proxy certificate
creation. This proxy certificate could be used repeatedly for further authentication for a
limited time period.
The creation process of the simple sign-on proxy certificate is illustrated on the
following figure.
Security Mechanisms in Grid Environments 99
Proxy certificates among others could be created for delegating owner permissions for
remote resources. This delegation is done using network connections. Therefore the
delegation process requires the network connection to be secured against attackers [4].
100 Adrian Bagala, Roland Bott
The figure above shows the steps of the proxy certificate created privileges
delegation using network connection:
1. At the beginning host “A” on the left side is contacting the destination service
“B” on the right. The initiator and the destination service are authenticating
each other. The initiator uses for the authentication its existing proxy
certificate and the destination service uses its certificate with its public key.
After the authentication a secure connection is created, for example using the
SSL/TLS protocol.
2. The initiator sends its delegation request for a particular application and the
destination service generates a new key pair.
3. A certification request is signed using the new public key and sent back to the
initiator using the secured connection.
4. The initiator uses the private key associated with its proxy certificate to sign
the certification request. It generates a new proxy certificate including the
newly generated public key from the destination service and fills in the
relevant fields in the new proxy certificate.
5. The new proxy certificate is sent back to the destination service using the
secure connection. The destination service saves it to a file with the generated
private key. This new proxy certificate could be used on the destination
service by the user’s applications.
The CAS service enables group-based processing of access rights for members of
a particular community. This needs CAS server to be created, which serves as a
processor for request from community members to access provided computational
resources. Using such CAS server the resource providers can define access policy for a
particular community.
Every community of grid users initializes their own CAS server. The
representative of the community gains GSI authorization to represent the community as
a whole and deploys CAS server, which uses the community identity.
The resource providers assign access rights to a particular community of grid
users, instead of each user independently. Every resource provider ensures or
authorizes, that the holder of the community permission is representing that particular
community and if the community policy is consistent with the resource provider’s
policy.
The representatives of a community are using CAS for managing and controlling
trust relationships (for example to register users and resource providers with a
community using a community standard) and creating fine-grained resource access
control. Community members with the appropriate right could authorize other
members of the community.
When the grid user wants to access a grid resource which is accessible trough a
CAS server, the user creates a request to the CAS server. If the CAS database on the
server indicates that the user has the required rights, then it issues a limited GSI proxy
certificate for the user. This proxy certificate has an access policy attached, which
grants to the user rights to fulfill the requested action.
The user in turn uses the certificate from the CAS server which grants community
access rights to contact resources involving grid tools (for example GridFTP). The grid
resource then applies its local security policy to determine the access level assigned to
the community and other restrictions which are based on the security policy in the CAS
certificate.
4 Conclusions
The presented security techniques are making an essential part for the future of the ever
growing grid computing technology. Also while delegated proxy certificates and
community authorization successfully challenges some of the grid security problems,
these techniques are not fully completed yet and there is further work needed to
challenge all security issues specific for grid computing.
Acknowledgement: This work was supported by Slovak Science Grant Agency grant
No. VG 1/0157/03 entitled Methods and tools for development of the secure networked
and distributed mobile computer systems and their management II.
References
1. Foster, I., Kesselman, C., Tsudik, G. et al.: A Security Architecture for
Computational Grid. In: 5th Conference on Computer & Communications Security,
San Francisco, CA, USA, ACM (1998)
2. Gombás, G.: Globus toolkit. 2005.
http://www.lpds.sztaki.hu/projects/completed/ni2000/globus_toolkit.pdf
3. Schmidt, J.: Adatintenzív alkalmazások grid-es kornyezetben. 2005.
http://aszt.inf.elte.hu/~grid/sclust/SchmidtJanos-dipl.pdf
4. Welch, V., Foster, I., Kesselman, C. et al.: X.509 Proxy Certificates for Dynamic
Delegation. In: 3rd Annual PKI R&D Workshop (2004)
5. Welch, V., Siebenlist, F., Foster, I. et al.: Security for Grid Services. In: 12th IEEE
Int. Symposium on High Performance Distributed Computing (HPDC’03), IEEE
(2003)
6. Community Authorization Service.
http://www-unix.globus.org/toolkit/docs/3.2/cas/index.html
7. Housley, R. et al.: Internet X.509 Public Key Infrastructure - Certificate and
Certificate Revocation List (CRL) Profile. 2005. http://www.ietf.org/rfc/rfc3280.txt
Home Agent-Based Decentralized
User-Mobility with EPA-Selection
Hossam el-ddin MOSTAFA∗
Slovak University of Technology
Faculty of Informatics and Information Technologies
Ilkovičova 3, 842 16 Bratislava, Slovakia
eng_hosam@fiit.stuba.sk
1 Introduction
People want to be selectively communicated-anytime and anywhere via any device.
One of the most recent attractive broadband communication networks is wireless
mobile-IP (MIP) [1], in which when a user with Laptop or portal is decentralized
away from it’s home subnet (HS) (macro user-mobility), in contrast to the nomadic
user-mobility, it wants to find agents so it does not lose access to the Internet. This
access is needed for uninterrupted access to personal data (web-browsing, email, ftp,
multimedia streaming....), as well heightened demand for secure services. See Fig. 1
for a complete scenario of MIP operation.
∗
Supervisor: doc. Ing. Pavel Čičák, PhD., Institute of Computer Systems and Networks,
Faculty of Informatics and Information Technologies STU in Bratislava
• When there are a lot of MNs roam in the network, then the problem is further
accumulated.
Ideally, this interruption of connection should not be neglected but should be
further avoided, to bridge the gap between subnets, an area that until now has been
largely neglected. Even with route optimization [1], [7], the interruption problem still
remains unsolved and MIP doesn’t seem to have a complete enhanced operation.
4 Performance analysis
Applying the EPA principle, in which it is assumed that the system is always at an
equilibrium point of the Markov chain of network states, the number of agents (A) in
network states will be represented of a multidimensional Markov chain space vector, as
follows in Eq. (1).
106 Hossam el-ddin Mostafa
⎣ OLS ⎦ ⎢⎣ 1 2 L AOLS ⎥⎦
Where A : Total number of network agents.
ANS : Number of network agents in the normal state (NS).
ACS : Number of network agents in the choosing state (CS).
AUS : Number of network agents in the updating state (US).
AAS : Number of network agents in the alerting state (AS).
AOLS : Number of network agents in the on-line state (OLS).
τ : Fetching time of data from the MBC (in sec).
TL : Lasting time of registration request (in sec).
TP : Propagation time between nodes (in sec).
TW : Wasting time between agents (in sec).
This provides that the network throughput, Th, is represented by the number of
agents in active state (on-line state) of Eq. (2)
Equations (1) and (2) simply show that the throughput of our network of a HA-
based decentralized user-mobility with EPA-selection is a function of the number of
agents in other various network states, i.e., is a function of different network
parameters, τ, TL, TP, TW, …. This will help network designers in choosing the proper
system settings.
Motivated by these concerns, and by looking at the problem from a practical and
commercial point of view, we are better able to interpret the future results of our
opportunity and so build our intuition. Thus, some of the current operational benefits of
the HA-based scheme seem obvious: new initiatives in the MIP protocol to the access
interruption, better macro-mobility service and performance, and built-in QoS.
However, a number of barriers must be overcome before the implementation of the
HA-based scheme. The biggest question will be what the business need and customer
service impact are for moving from current FA-based to HA-based configuration. We
believe that the later case is considered as an excellent opportunity in data networks to
improve the decentralization capability in order to avoid the access interruption.
Home Agent-Based Decentralized User-Mobility with EPA-Selection 107
5 Conclusions
With the explosion of the Laptop industry, location will no longer be able to disconnect
and influence our frequency of communication and users became more reliant on
mobility. This need for mobility has driven companies, standards bodies and industry
forums to spend millions of dollars on the research and development (R&D) of
Laptops and protocols to create a seamless connection through and to the home subnet,
which is affordable, efficient, and transparent to the basic mobile-IP standards.
Therefore, dynamic macro user-mobility, in contrast to the nomadic user-mobility,
outside home subnet is to the centric of all aspects in this work. This paper addressed
the more fundamental question of the appropriate level of effectively for a home agent-
based decentralized user-mobility using an EPA selection, and rather understood the
impact of this scheme and mobility resource management algorithms, on the QoS of
the system for different parameters in wireless networking infrastructure. Also, initial
results, primary business issues, key innovations, and the expected impact on the
commercial and marketing aspects were described.
References
1. Jamalipour, A.: The Wireless Mobile Internet: Architectures, Protocols and
Services. John Wiley & Sons Ltd., England, 2003.
2. Perkins, C.E.: Mobile IP. IEEE Commun. Magazine, Vol. 35, No. 5 (1997), 84-99.
3. Son, W.: Mobile IP. 2003. http://williamson.cx
4. Cisco Systems: Cisco Mobile IP. 2004. http://www.cisco.com/go/mobile_ip/
5. Stiller, B., Braun, O., Heursch, A., Racz P. (edts.): Internet Economics II,
Technical Report No. 2003-01, University of the Federal Armed Forces, Munich,
Germany, 2003.
6. Jue, J., Ghosal, D.: Design and Analysis of a Replicated Server Architecture for
Supporting IP-Host Mobility. ACM Mobile Computing and Commun. Revue, Vol.
2, No. 3 (1998), 16-37.
7. Perkins, C.E., Johnson, D.B.: Route Optimization in Mobile-IP. 1997. Draft-IETF-
mobileip-optim-06.txt
8. Fukuda, A., Tasaka, S.: The Equilibrium Point Analysis-A Unified Analytic Tool
for Packet Broadcast Networks. In: Proc. of IEEE Globecom’83, San Diego, CA
(1983), 33.4.1-33.4.8.
Advanced Network Approaches
for Wireless Environment
Branislav JARÁBEK∗
Slovak University of Technology
Faculty of Informatics and Information Technologies
Ilkovičova 3, 842 16 Bratislava, Slovakia
beejay@orangemail.sk
1 Introduction
Wireless networks in today meaning are usually set up with a centralized access point
for each area of connectivity. The access point has knowledge of all devices in its area
and routing to them is done in a table driven manner. Following the trend of mobility,
it becomes important to give users the possibility of finding service they need
anywhere in the network. Users would like to obtain access to services automatically,
without reconfiguring their system. Especially with mobile devices dynamic discovery
of services in other than home or corporate network and automatic network
configuration will be very useful.
An ad-hoc network is a special kind of network, where all of the nodes move in
time. So the topology of the network changes as the nodes are in the proximity of each
other. Ad-hoc networks are generally self-configuring, because of the concept of no
∗
Supervisor: doc. Ing. Margaréta Kotočová, PhD., Institute of Computer Systems and
Networks, Faculty of Informatics and Information Technologies STU in Bratislava
stable infrastructure takes a place. Each node in the network must be able to take care
of routing of the data – and this is the domain of ad-hoc routing. So the concept of
centralized network with pre-defined central routing tables could be applied only with
difficulties or with the loss of the advantage of “on-the-fly” nodes changing.
There are two different research areas according to described problems in wireless
networks [1]. First is Service Discovery Algorithms, which focuses on service
propagation and discovery. Second research area is “Mobile Ad-Hoc Network”, which
maintains design, prototype and evaluates protocols and algorithms to facilitate
adoption and use of wireless ad-hoc networks for appropriately selected application
areas and facilitate development of standards for such networks.
2 Service discovery
Future software services and automated devices will exist in large numbers and will
operate in a networked world where they can never be quite sure about the connectivity
available, about the other services and devices nearby, or about the state of the network
neighborhood a few minutes in the future. In such uncertain environments, individual
components will need to discover and maintain awareness of their surroundings and to
configure and adapt themselves in response to changing situations.
The beginnings of the necessary capabilities for service discovery have emerged
over the past few years in the form of service and device discovery protocols, such as
Jini Networking Technology, Universal Plug-and-Play, (UPnP) the Service Location
Protocol (SLP), Bluetooth service discovery, the Salutation Consortium protocol suite.
Despite differences, all of these initiatives aim to allow small collections of
commercial devices and services to auto-configure, to cooperate, and to adapt to
changes.
The Service Location Protocol is developed by the IETF working group called SvrLoc
[2]. Focus of this group is to design a vendor-independent standard based on TCP/IP
network. SLP architecture consists of three main components: Service Agents – are
service careers, takes a place somewhere in the area (location), which is advertised
with service characteristics. User Agents – are “client” applications, which use
services, so they are service discoverers. Directory Agents – are collectors of
information received from Service Agents and they responds to User Agents on their
queries. They could also create different groups of services and service agents and
categorize them.
The concept is very simple. Each new service must register its service to the
Directory Agent. When a user wants a certain service, the User Agent asks Directory
Agent for available services in the network. Directory Agent sends appropriate
addresses and characteristics and user could select and use one.
The main goal before this concept could be reliable is – how to find a Directory
Agent. There are three different methods defined: static – SLP agent obtains an
110 Branislav Jarábek
address to Discovery Agent via DHCP while connecting into the network, active –
User and Service Agents request to the multicast group and listening Directory Agent
replies directly via unicast, passive – Directory Agent periodically sends multicast
advertisements and User and Service Agents listen to them, and after receiving that
multicast are able to communicate via unicast.
There is also a concept, which omits Directory Agent. If there is no DA (for
example small home networks) UA repeatedly send multicast requests for a service
until one or more listening SAs send out their response via unicast.
2.2 JINI
Jini technology [3] is based on the Java language. Jini creates an issue of how devices
connect with each other in order to form a simple ad-hoc network (a Jini “community”)
and how these devices provide services to other devices in this network. Jini consists of
architecture and programming model.
Each Jini device must have running a Java Virtual Machine. The architecture
principles are similar to that of SLP. Devices and applications register within Jini
network through a Discovery and Join process. Application also places itself into the
Lookup Table on a lookup server (always needed). Besides pointers stores Lookup
Table also Java-based program code for these services. This means that services may
upload device drivers, an interface, and other programs that help user to access the
service. When client wants to utilize the service, the object code is downloaded from
the Lookup Table to the JVM of the client. This code mobility replaces the necessity of
pre-installing drivers on the client.
2.4 UPnP
UPnP Device Architecture [4] is more than just simple extension of the plug and play
peripheral model. “Universal” means that no device drivers are needed – common
protocols are used instead. UPnP devices can be implemented using any programming
language.
Advanced Network Approaches for Wireless Environment 111
Each device must have a DHCP client to connect to the network and obtain
appropriate address. Then five steps take care about device and service handling:
1. Discovery – discovery protocol (Simple Service Discovery Protocol – SSDP)
allows device to advertise its service to control points on the network.
Similarly, when a control point is added to the network, the UPnP discovery
protocol allows that control point to search for devices of interest.
2. Description – has two parts: device and service description. Device
description contains vendor specific information. For each service included,
the device description lists the service type, name, and other access URLs.
Service description includes a list of actions with parameters, the service
responds to, and also list of variables of the state of the service.
3. Control – a control point can ask services to invoke actions and receive
responses. To do this, a control point sends a suitable control message to the
control URL. In response, the service returns any results or errors from the
action. Action could change state of the variables that describe internal state –
events are published to all interested control points (see eventing).
4. Eventing – uses standard publisher-subscriber model.
5. Presentation – retrieving it is a simple HTTP-based process.
Main disadvantage is the latency before first packet is sent caused by the route
discovery.
Proactive Ad-Hoc Routing Algorithms (table-driven) maintain routes to all nodes
in the network, so they heavily rely according to tables. Difference to reactive is that
there is no need to construct new route before transmitting but only fetch the next hop
node from routing table.
Main concepts of DSR [7] are route discovery, route caching and route maintenance.
Routing by this method means that the path is discovered. The first data (this means
that no data has been sent to that destination before) initialize the route discovery from
the source to the destination.
Route discovery: Can be done in two ways – active or passive. A source node can
flood the network with a route request (RREQ) for a node it needs a route to. Its
neighbors propagate this RREQ in the same manner until it reaches the destination
node or a node that already has a route to the destination. Each hop of the RREQ is
recorder within the RREQ message. The second way for a node to discover a route is
by caching RREPs that it happens to pass on or overhear from other nodes.
Route caching: Upon arrival of the RREQ at the destination node or at a node that
already has a route for the destination, the inverse route is cached. In the case of a node
that already has a route, the existing route is appended. A route reply (RREP) is then
sent back the same way the RREQ traveled. The RREP contains a list of all the
intermediate nodes between source and destination. On the way back, the RREP is
cached by all intermediate nodes it passes on the way. When the RREP reaches back to
the source, the source can send the data and cache the new route for future use.
Route maintenance: Whenever a node discovers that the link to one of its
neighbor nodes has failed, it will send a route error (RERR) packet to the source of any
cached routes that use the failed link. This RERR will propagate through all
intermediate nodes that also have cached this route. Upon receipt of a RERR a node
will update their caches accordingly and purge the now failed route. In the case of
nodes using promiscuous listening, the node should note that all RERRs might not be
heard (the node may have moved) and the route should be treated differently than route
where the node is an intermediate node.
As the name applies, this protocol adds specific on-demand modification to the
distance vector routing algorithm [8]. The reason to this is to acquire low bandwidth
cost as DSR has with lower time to discover a route. The idea behind is to use only
local broadcast and also modified discovery algorithm.
In route discovery AODV uses RREQ packets as DSR in the same meaning –
packet is broadcasted into the network. The difference is that the hosts on the way of
RREQ packet to the destination maintain “back pointers” from where they received the
Advanced Network Approaches for Wireless Environment 113
packet. This creates reverse path from the destination to the source. When the packet
reaches the destination (or a host whit path to the destination), the destination sends a
RREP packed back, which validates reverse path and sets up the forward path. All
hosts, which maintain “back pointers” and do not receive RREP packet in specified
time, will de-allocate the pointer. This approach guarantees that the only one route is in
use. So this is the difference to DSR – algorithm first builds up a tree of possible paths
from source to destination and then validates only one of these routes. The only one
shortest path can be selected when intermediate nodes uses the sequence numbers of
the RREQ and RREP packets (in opposite to DSR which can multiple routes). So this
algorithm is better to use in larger networks (path is not stored in packets, only one
route from the tree of paths is used).
Route maintenance: If the source node moves, nodes on the path will send a
special RREP. If next node fails to communicate, the node will send information
upstream the path (RREP failure packet). All nodes will remove appropriate
information from their route caches.
Local connectivity management: AODV uses local HELLO messages which
transmit to the immediate neighbors. These messages detect link failures in active
routes as described before.
OLSR [9] is an optimization of a link state protocol for mobile ad-hoc networks. OLSR
uses Multipoint relays (MPRs) and MPR Selectors to reduce the bandwidth cost of
maintaining routes by limiting the broadcast of link-state updates. So each node selects
a subset of its neighbors, as MPRs and these nodes are the only ones that forward
packets from this node. The MPRs record that another node has selected it as MPR –
so node is MPR Selector for MPRs.
OLSR uses local broadcast of HELLO messages, which are no forwarded more
than one hop – so nodes maintain bi-directional links. Each HELLO message contains
a list of neighbors, which this node has received a HELLO message from. This is
recorded in a neighbor-table with sequence numbers. If a node receives HELLO
messages from all of its neighbors, it has knowledge of all nodes in the distance of two
hops. The MPR set should be smaller than the set of neighbors, to take advantage of
relaying through another host. The MPR set is included in HELLO messages, so the
nodes, which take this node as MPR, know to which nodes is this node MPR Selector.
The MPR set is recomputed whenever the link to the neighbor node goes down or a
new node is added.
For calculating the routing table OLSR uses a Topology Control message. This
packet is broadcast to all nodes of the network, using MPRs and contains the nodes for
which source node is MPR Selector. These packets can be used by the node as the list
of last-hop nodes for destination node and are stored in topology table with a sequence
number. Constructing of the route table begins with appending of entries of topology
table (node, last-hop node) starting from each destination in the network and followed
until a node in neighborhood is the last-hop node. So the complete routing table of the
114 Branislav Jarábek
network is created and only optimal routes with minimal hop are chosen. When any of
the entries in topology or neighbor table change, the routing table has to be
recalculated.
TBRPF [10] is pro-active link-state routing protocol based on existing reverse path
forwarding algorithms. It has two modes of operation and two main system functions:
discovery and routing.
The operating modes Full Topology (TBRPF-FT) and Partial Topology (TBRPF-
PT) are different in amount of information each node has. As name implies in full
topology mode each node has knowledge of all links in network. In partial topology
mode, a node has enough knowledge to compute minimal route (min. hop distance) to
any other node. Each topology has its advantage in other network: FT mode is suitable
in open networks with high scattering and PT mode is better for use in dense networks
where the amount of routing information is high and all the information is not needed.
Like OLSR, TBRPF sends a Hello message to first-hop neighbors. But the
message differs – TBRPF sends out only Ids of new and lost neighbors in Hello
message, not the complete set. A “new node” is node that has been recently seen, but
two-way link has not been established. A two-way link is in the meaning when the new
node responds with a HELLO and receives an update request. This brings decreasing
of control data, which is sent over network, and increased frequency of messages could
minimize convergence time.
Topology update and routing function: Each node keeps a source tree of links,
which determines the network topology. A link (a, b) is in the source tree of a node if it
is reported by the next hop parent node to be the shortest path to a.
The source tree is the basis for a node's reportable sub tree. The report from node
b to node a include b's links to all its neighbors and the branch of its source tree rooted
at the node that b is the next hop of for a to reach.
In FT and PT mode forwarding of update messages is done only for link, which
does not contain a leaf node. PT also restricts forwarding – so only changes of source
tree of the node are reported. In this approach each node creates its source tree and
computes route to the destination by computing the minimal-hop path.
TBRPF also uses aggregation of control messages to minimalize the total amount
of messages sent.
4 Conclusions
This paper has cleared research in two major areas of wireless networking of today.
The focus has been given to the new service oriented view on the computer network
and also routing standards has been considered. Regarding the mobile device’s reduced
power supply, the radio transmission have to be as low as possible. So on-demand
Advanced Network Approaches for Wireless Environment 115
Acknowledgement: This work has been supported by the Grant Agency of Slovak
Republic grant No. VG1/0157/03.
References
1. The Advanced Network Technologies Division of National Institute of Standards
and Technology, http://w3.antd.nist.gov
2. Service Location Protocol, RFC 2165, June 1997,
http://www.ietf.org/rfc/rfc2165.txt
3. AR-Jini™ Architecture Specification, Sun Microsystems, January 2005,
http://www.jini.org/nonav/standards/davis/doc/specs/html/jini-spec.html
4. UPnP™ Device Architecture version 1.0, Jun 2000,
http://www.upnp.org/download/UPnPDA10_20000613.htm
5. Larson, T., Hedman, N.: Routing protocols in Wireless Ad-Hoc Networks – A
Simulation Study (Master Thesis), Lulea Tekniska Universitet, ISSN: 1402-1617,
1998.
6. Mobile Ad hoc Networking (MANET): Routing Protocol Performance Issues and
Evaluation Considerations, RFC 2501, January 2001,
http://www.ietf.org/rfc/rfc2501.txt
7. The Dynamic Source Routing Protocol for Mobile Ad Hoc Networks (DSR), RFC
Draft, July 2004, http://www.ietf.org/internet-drafts/draft-ietf-manet-dsr-10.txt
8. Ad hoc On-Demand Distance Vector (AODV) Routing, RFC 3561, July 2003,
http://www.ietf.org/rfc/rfc3561.txt
9. Optimized Link State Routing Protocol (OLSR), RFC 3626, October 2003,
http://www.ietf.org/rfc/rfc3626.txt
10. Topology Dissemination Based on Reverse-Path Forwarding (TBRPF), RFC 3684,
February 2004, http://www.ietf.org/rfc/rfc3684.txt
Internet Single Sign-On Systems
Radovan SEMANČÍK∗
nLight, s.r.o.
Súľovská 34, 812 05 Bratislava, Slovak Republic
semancik@nlight.sk
1 Introduction
Applications based on the HTTP and HTML are the most commonly used mechanisms
for providing live content on the Internet, but the use of independent strong
authentication systems in each Internet application directly is inefficient. The solution
may be the outsourcing of authentication services to trusted third parties. This
document provides overview of systems that allow user to authenticate on one Internet
site and use services on the other Internet site. These systems are referred to as Single
Sign-On (SSO) systems, because they allow single authentication for multiple services.
1.1 Requirements
The requirements for web application Simplified Sign-On system for the usage on the
Internet are defined as follows:
• It must be based on open protocols and standards.
• It must support cross-organization operation.
• It must provide a mechanism to securely share user attributes across
organizational boundaries.
• It must support privacy features.
∗
Supervisor: doc. Ing. Margaréta Kotočová, CSc., Institute of Computer Systems and
Networks, Faculty of Informatics and Information Technologies STU in Bratislava
The goal of Simplified Sign-On system is to securely transfer user's identity, attributes
and current authentication status of a user from source site (Identity Provider) to the
destination site (Service Provider). The trust relationship must be established between
source and target sites for a source site to trust the target site's requests and for a target
site to trust the source site's identity statements. Establishing and maintaining this trust
relationship is out-of-band for most SSO systems. The described Internet SSO systems
follow the proxy-based true SSO model according to [1].
The representation of user in computer system will be called in this work persona.
The persona contains attributes. The physical data structure that stores the persona
attributes is called account.
The persona identifier may be presented to the target site in different ways:
• Direct Linking: Provide the same persona identifier (e.g. username) as the
user has established with the source site.
• Indirect Linking: Provide a pseudonym for a persona. The pseudonym an
identifier that is different as the primary persona identifier established with
the source site, but is fixed in time for the same persona and the same target
site. Indirect linking may be used to implement pseudonymity [2].
• No linking: Do not provide identifier or provide an anonymous handle valid
for a single session or a part of session. No linking is used in anonymity
scenarios [2].
Source 6a Target
(Identity Provider) (Service Provider)
T
A ut
st
T
Aut
st
q ue
q ue
est
hen
h
Aut
ent
n Re
re q u
d re
t ic a
1
icat
en t
h
3 2 6
ent
cate
ti o n
catio
5
rc e
7
ion
Con
icat
ou
enti
res
enti
r eq
ion
Res
pon
Auth
ues
Auth
T 4
se
Redirect
User (browser)
The results of Internet SSO systems evaluation are summarized in the following
sections.
The Liberty ID-FF system [3] is build on top of SAML and uses SAML assertions as a
security tokens, therefore it is dependent on SAML. The modification of Liberty
specification for other, non-SAML security tokens may be difficult.
The Liberty specification mandates the use of pseudonyms by default. This
requirement may help to enforce good privacy features to all Liberty-compliant
implementations.
The WS-Federation specifications [4] are built on top of WS-Trust and WSS: SOAP
Message Security (WS-Security) specifications. The WS-Security specifications leave
a lot of details to the implementer’s decisions and to be defined by the service policy.
Although that is good for flexibility, it brings additional degree of complexity to the
system. The implementing systems may not be interoperable by implementing different
subsets of specifications and/or using non-compatible policies.
The privacy decisions (e.g. use of pseudonyms) is left to the implementers. This
may in practice lead to the implementations, that will not adhere to the best practice
and the level of privacy in WS-Federation-compliant systems may be lower (in
average).
3.3 Shibboleth
The Shibboleth system [5] is built on top of SAML specifications. The system
implemented using Shibboleth specifications will need to specify a lot of local details,
e.g. name identifier types, linking policies, etc. This type of flexibility may lead to
situation that two shibboleth-compliant implementations will not interoperate.
The shibboleth will depend on other specification to define account linking, if
such will be needed. The use of transient name identifiers allows good degree of
privacy, but for any practical purpose will require a solid attribute service.
The SXIP protocol [6] has two variations: simple and XML commands. The variation
using simple commands provides only minimal security. Even the use of HTTPS does
not add any real security to the simple command exchange.
120 Radovan. Semančík
Some of the SXIP XML commands include XML digital signature element that
should protect the integrity of SxipML message. However, no method or guidelines are
documented for creation and validation of these signatures.
The storex and fetchx command messages are not authenticated, which may lead
to the implementations that may allow anyone reading or setting arbitrary persona
attributes.
The use of globally unique GUPI at several member sites makes it easy for the
member sites to collude and correlate persona activities at several sites. This is
partially mitigated by the use of different personae for different member sites, but in
practice this approach may be inconvenient or maybe even unfeasible.
The LID system [7] uses URL as a persona identifier and GPG signature as a security
token. LID URL as an identifier may leak information, especially in self-hosting
scenario as proposed by LID documentation. For detailed explanations see section 4.2.
GPG public key validation is left on simple “callback” method. No other method
is mandated by the LID documentation. The described simple method can be
dangerous when using HTTP protocol, for example due to the DNS attacks [8]. While
using HTTPS method to get public key, using SSL/TLS brings a dependency on X.509
PKI. The result is that LID uses two different PKI systems (X.509 and GPG), that are
in principle and features nearly the same, but not compatible.
4 Discussion
The considered web SSO systems are similar in the generic SSO mechanism, but are
different in the following areas:
• The method of identifying personae and accounts, the way of generating and
assigning identifiers. Global identifiers are better suited for tightly-coupled
systems that are same organizational control or share common policies. Local
identifiers are better suited for loose-coupled systems that cross organizational
boundaries.
• The method of linking accounts and personae in different target and source
systems. The direct linking is desirable only when user privacy is not a
concern, it is not well suited for the Internet environment. The pseudonymity
of indirect linking or anonymity of no linking is better suited to privacy-
sensitive environments. The “no linking” SSO case will in practice require
secure and interoperable attribute service.
• The level of detail that is specified in the documents and the freedom that is
left for system implementers.
The Table 1 summarizes features of considered SSO systems and the next
subsections provide discussion on some aspects of SSO system's architecture and
design.
Internet Single Sign-On Systems 121
The Single Sign-On systems need a way to link several account. The linking is
implemented by associating persona or account identifiers on different systems. There
are two approaches to the management of persona identifiers:
• Global persona identifiers. The persona identifiers are allocated by central
authority that guarantees global uniqueness of the identifier. The global
uniqueness of the identifier allows direct linking of accounts on the global
(Internet) scale.
• Local persona identifiers. The persona identifiers are allocated by the system,
where the persona originated. These identifiers are unique only in the scope of
the source system. For the purposes of persona or account linking, the target
site must accept the identifier in this form or (more frequently) apply
appropriate identifier mapping.
While the direct linking and global persona identifiers may be the easiest
scenario, global identifiers shared by many sites may be used to correlate user
activities on several systems and thus reveal personal information without user
consent. To overcome this problem, lower level virtual personae (with different
identifiers) may be used as pseudonyms. If this approach is deployed in the Internet
scale, the persona management may become difficult and may need automation. The
automatic pseudonym persona management is technically close to the indirect linking
scenario, and the indirect linking may be considered as better approach for the Internet
environment.
One way of storing identity information is to host a source site on a system that is
under user's sole control. As this concept may seem attractive from the privacy point of
view, it in fact may be undesirable in the practice:
• URLs of self-hosted source site may leak information.
122 Radovan. Semančík
5 Conclusions
This document described the generic model for Internet Single Sign-On mechanisms
and provided an overview of existing Internet SSO systems. The Liberty Alliance ID-
FF and the WS-Federation were found as the most advanced and flexible Internet SSO
systems, suitable for general use. The WS-Federation specifications are quite generic,
lack a considerable amount of details and the early WS-Federation implementations
may have interoperability problems. However, the WS-Federation may become a good
platform for SSO services in the future, extended to the web services area as well. The
Liberty Alliance ID-FF specifies a practical SSO system built on top of SAML
specifications. The level of detail is sufficient for good interoperability, the
dependency on SAML is reasonable in the Internet environment. The Liberty Alliance
also specifies extensions to ID-FF for web services environments (ID-WSF). The
Shibboleth specifications also depends in SAML, but the level of details is
considerable lower compared the Liberty case. The Shibboleth system is suitable for
large communities that are mostly composed of independent organizations (e.g.
academic community). The SXIP and LID SSO systems in its current state are not well
suitable for the Internet environment. They provide only minimal privacy features, use
global identifiers and feature limited standards support. These systems may be suitable
for closed communities or for the environments where security and privacy is not a
concern.
While all these systems use similar mechanisms, their properties vary
considerably. Especially the use of persona identifiers and pseudonyms as well as the
use of attribute services will require further study for the SSO systems to be deployed
in secure and privacy-supporting manner.
References
1. Pashalidis, A., Mitchell, C.: A taxonomy of single sign-on systems. Lecture Notes
in Computer Science, Vol. 2727, Springer-Verlag, Berlin (2003) 249-264.
Internet Single Sign-On Systems 123
1 Introduction
Using of design patterns in software development offers many advantages, such as
code reusability, easier program extensions or others. It supports development and
maintenance of software applications and systems. On the other side, design patterns
may introduce inefficiency into programs. It is possible to eliminate this disadvantage
by specializing the program, which adapts this program to a specific execution context
[5]. An application that performs specializations is an automatic specializer.
Specialization may optimize object-oriented programs, especially those ones that
are written according to design patterns. In object-oriented programs, overheads
usually result from genericness. Approach, which prefers using generic methods and
components, is in many cases at the expense of effectiveness. One of the factors that
influence program effectiveness is usage of virtual calls.
Specialization of a program is a transformation technique, which adapts a generic
program to a specific execution context. There are various specialization methods that
∗
Supervisor: prof. Ing. Pavol Návrat, PhD., Institute of Informatics and Software Engineering,
Faculty of Informatics and Information Technologies STU in Bratislava
can be used for program specialization [1, 5, 8]. We will point our interest only to the
specialization technique named partial evaluation.
Execution of an object-oriented program is determined by a sequence of
interactions among objects. Further specification of program context makes it possible
to improve some interactions, so the static interactions will be evaluated in advance.
Specialization substitutes generic method calls by specialized methods calls.
2 Design Patterns
Design patterns represent the way of designing and implementation of a specific
problem. Design patterns were well explained and documented by Gamma et al. [3].
The authors divided all patterns into three categories - creational patterns, structural
patterns and behavioral patterns. Each of these groups focuses on different kind of
problems. The first one describes the design possibilities of creating new objects, the
second one arranges relationships among objects and the third one focuses on
generalizing of object behavior.
Using of design patterns enhances the process of software design and allows
simplified reusability and maintenance but in consequence of excessive generalization
it introduces overheads into programs. These overheads could rise from virtual method
calls, which may be in certain cases eliminated by specialization. In this paper, we will
show the basic principles of virtual calls elimination in the design patterns prototype
and abstract factory.
Name: Prototype.
Description: In case the system has to be independent on the product creation, it is
suitable to use prototype.
Structure: The structure of the prototype design pattern was presented by Gamma
et al. [3].
Area: Specialization is focused on the part of the code where new objects are
being created by calling the method that returns an object clone.
Overhead: Cloning methods present virtual calls that could be eliminated.
Approach: Virtual calls of prototype clone method will be replaced by directly by
the method body.
Conditions: Concrete type of the prototype must be known.
Specialization of Object-Oriented Programs Written in Java Language 129
Methods of abstract factory that call clone methods are being called in a main
method of class Runner.
We will specialize the part of the code in class Runner where new objects are
being created.
130 Igor Dysko
All methods named makePrototypeX call method clone, which calls the
constructor of its class for the creation of a new object. Replacing the call of
makePrototypeX method, directly by the constructor call, eliminates two virtual calls.
We have replaced virtual method calls directly by the bodies of called methods.
After specialization the class Runner looks as follows:
4 Experimental testing
During the testing of specialization, 10 million objects in case of Floor, Door, Wall and
Room classes and 10 thousand objects in case of class Building were created. The huge
number of objects was created due to the requirement of accurate time slices
measurement. We have measured the time of code execution 5 times for each class.
Results of the testing are listed in the following table (Tab. 1). Measured times are
mentioned in milliseconds. A row for specialized code contains letter “s” after the
name of the class.
At the end, 10 million objects of the classes Floor, Door, Wall and Room were
created. In this case we measured the acceleration of code that contains the creation of
simple and difficult object together.
5 Results of specialization
The speed up range for the object creation is between 1.2 and 29.8 percents. The lower
limit arose due to the fact that creating a difficult object takes too much time compared
to virtual call evaluation. The highest speed up was achieved by the creation of simple
objects where the time needed for virtual call evaluation is comparable to the time of
simple object creation. The specialization of prototype and abstract factory is beneficial
when it is used for creation of simple objects. The specialization of difficult object
creation reaches the zero speed up.
7 Conclusions
Design patterns offer many advantages in software development but may introduce
overheads into the original code. We presented the way of eliminating some of these
overheads, specifically those ones that are caused by virtual method calls. For virtual
calls replacement, it is convenient to impose the functionality of aspect-oriented
programming.
Introduction of new specialized methods and replacement of virtual calls in the
original source code makes the code less readable and it worsens the efficiency of its
further development. Hence the specializer should be used as a precompiler only.
132 Igor Dysko
Acknowledgement: The work reported here was supported by Science and Technology
Assistance Agency under the contract No. APVT-20-007104.
References
1. Bobeff, G., Noyé, J.: Molding components using program specialization
techniques. In: Eighth International Workshop on Component-Oriented
Programming, Bosch, J., Szyperski, C., Weck W. (Eds.), Darmstadt, Germany
(2003)
2. Dysko, I.: Specialization of Design Patterns. In: ISIM’05 Conference Proceedings
(2005)
3. Gamma, E., Helm, R., Johnson, R., Vlissides, J.: Design Patterns: Elements of
Reusable Object-Oriented Software. Addison-Wesley, 1995.
4. Návrat, P., Filkorn, R.: A Note of the Role of Abstraction and Generality in
Software Development, Journal of Computer Science, Vol. 1, No. 1, Science
Publications (2005), 98-102.
5. Schultz, U. P., Lawall, J. L., Consel, Ch.: Automatic program specialization for
Java. ACM Transactions on Programming Languages and Systems (TOPLAS),
Vol. 25, No. 4 (2003), 452-499.
6. Schultz, U. P.: Black-box program specialization. Published Technical Report
17/99, Department of Software Engineering and Computer Science, University of
Karlskrona/Ronneby, In: Proceedings of WCOP'99 (1999)
7. Schultz, U. P.: Partial Evaluation for Class-Based Object-Oriented Languages. In:
Symposium on Programs as Data Objects II. Lecture Notes in Computer Science,
Vol. 2053, O. Danvy and A. Filinski (Eds.), Aarhus, Denmark, 173-197.
8. Schultz, U. P., Lawall, J. L., Consel, Ch.: Specialization patterns. Research report
1242, IRISA, Rennes, France, 1999.
9. Schultz, U. P., Lawall, J. L., Consel, Ch., Miller, G.: Towards automatic
specialization of Java Programs. In: Proceedings of the European Conference on
Object-Oriented Programming (ECOOP‘99). Lecture Notes in Computer Science,
Vol. 1628 (1999), 367-390. R.Guerraoui (Ed.), Springler-Verlag, Lisbon, Portugal
10. Smolarová, M., Návrat, P., Bieliková, M.: Abstracting and Generalising with
Design Patterns. In: ISCIS'98 - The 13th Int. Symposium on Computer and
Information Sciences, A. Gürsoy U. Güdükbay, T. Dayar and E. Gelenbe (Eds.),
Belek-Antalya, Turkey, IOS Press, Amsterdam (1998), 551-558.
11. Volanschi, E., Consel, C., Muller, G., Cowan, C.: Declarative Specialization of
Object-Oriented Programs. In: OOPSLA’97 Conference Proceedings. ACM Press,
Atlanta, GA, USA (1997), 286-300.
Object-Oriented Specialization Using
Aspect Programming
Adrián SLAVKOVSKÝ*
Slovak University of Technology
Faculty of Informatics and Information Technologies
Ilkovičova 3, 842 16 Bratislava, Slovakia
adrian.slavkovsky@gmail.com
1 Introduction
Design patterns in object-oriented approach present a major step towards defining,
formalizing and solving common design problems in software architecture. But their
generality brings inefficiency into the programs. Objects are accessed mainly through
interfaces or abstract classes so there are many virtual calls which have to be evaluated
runtime. Standard compiler optimizations do not fully eliminate these kinds of
overheads. Therefore a program specialization was proposed to solve this problem.
There are many ways how to use specialization. This paper focuses on object-
oriented specialization especially on eliminating virtual calls. Schultz et al. have
defined what to specialize, how we should specialize and where specialization is
effective [5, 6]. He defined a structure of specialization patterns as a complement to
design patterns [7]. Schultz has also described different ways of integration of original
and specialized code. One option is to use aspect-oriented programming. Our work
shows some possibilities of how can aspect code be used during the specialization
∗
Supervisor: prof. Ing. Pavol Návrat, PhD., Institute of Informatics and Software Engineering,
Faculty of Informatics and Information Technologies STU in Bratislava
process. Two different concepts of aspect interaction were proposed – static, which is
made by introduction and is woven into original code in compile time and dynamic,
which allows us to replace virtual calls with our specialized code when particular call
occurs. At the end specialization example and results are shown which document my
observations of specialization improvement on decorator design pattern.
2 Program Specialization
Specialization is a technique of code transformation. Primary goal of this
transformation is to produce more effective code than the original one. To achieve this,
we need to know some specific information about the context this code is running in.
In object-oriented programming, virtual dispatching represents one source of overhead.
Virtual calls make program control flow more difficult and block traditional compiler
and hardware optimizations, because compiler often does not know the concrete type
of object.
Specialization is supposed to be a complement to compiler optimization but it is
driven explicitly by programmer. He is the one, who chooses the appropriate fragment
of code to specialize and he defines invariant information about fragment's context
(which compiler usually doesn't know) that means he in fact directs the specialization.
3 Specialization patterns
Using design patterns simplifies process of software design and development, but bears
respective overhead. Schultz et al. proposed specialization patterns as a complement to
design patterns in terms of defining the specialization opportunities [7]. Each design
pattern can have corresponding specialization pattern. This pattern contains
information where and what kind of overhead is presented, which parts can be
specialized to eliminate this overhead, what are the conditions of execution of
specialization, specialization strategy, proposal of specialization class and
applicability. After determining the right type of specialization we specialize selected
code fragments. The last part of specialization process is integration of original and
specialized code. One way how to make it is to put specialized methods into original
classes. The problem of this concept is to ensure security. Another approach is to
encapsulate specialized code into separated classes. Specialized methods from separate
class will not be able to access private or protected attributes of original class.
Integration can be also achieved using aspect-oriented programming. Specialization
code is separated in aspect and woven into original code in compile time. Thus we can
distinguish between original and specialized code and if we decide not to use
specialization we simply won't weave aspect code into original.
Object-Oriented Specialization Using Aspect Programming 135
This concept simply adds new methods and attributes into existing code in compile
time (more precisely in weaving time). The place of addition is defined by pointcut
expression. Aspect programming uses term introduction. After specialized methods are
introduced into original program the client code invoking original code needs to be
changed. Change consists of replacing these calls with specialized ones.
This concept is rather different from the static one. It is based on dynamic activation of
advice code whenever specific code join point is reached. We can bind this advice code
to a code pointcut what in a case of specialization may represent virtual call. If we
want to replace call of original function we use an around section with specialized code
and omit a statement which calls it. Advantage of this approach is that after
specialization we don't need to change any client code. Aspect containing specialized
code is activated when relevant code join points are reached. Unfortunately this
approach has limited applicability in present time because AspectC++ produces some
overhead when invoking advice code. This overhead grows with number of parameters
that need to be passed to specialized methods and as my tests show it costs more than
the call to the virtual function. When this problem will be solved we can expect that
this type of specialization will be fully applicable.
5 Specialization example
Example consists of specialization of program using design pattern Decorator [1]. The
overhead in this case is coupled with method invocation on AComponent object. Client
is not aware of concrete type of object being hidden behind this abstract class. We are
able to eliminate virtual methods in fragments in which we can determine the concrete
type of the object the client is working with. For this purpose let us say that it is
CConcreteDecoratorA, which has CConcreteComponent as inner component.
136 Adrián Slavkovský
6 Results
Tests were made using ac++ 0.9 under Microsoft Visual C++ .NET in cooperation with
AspectC++ Add-In under two configurations – Debug mode and Release Mode (full
optimizing mode). Specialization using introduction accelerates program from 2 to
15%. Using dynamic concept we have observed slowdown of specialized program.
Because decorator contains the other component (which could be decorator as well)
specializing a method of such object can be done via recursive algorithm.
unfoldDecorator(AComponent *dec) {
if (dec is not component) {
dec->before(); //do before method
unfoldDecorator(dec->getComponent());
dec->after(); //do after method }
else return dec->doMethod(); }
To improve performance and eliminate excessive method invocation we can
provide references to component objects as parameters of specialized function and call
methods on these objects in function body respectively. The results are shown in tab. 1.
From these observations we can say that in present time the only applicable way
how to integrate specialized and original code with aspect programming is to use
138 Adrián Slavkovský
7 Conclusion
Object-oriented programming is dominating paradigm in developing commercial
applications. With aim of design patterns software becomes more generic, reusable,
modular and adaptable but leads also to performance expenses. These overheads can be
eliminated by specialization. This paper focuses on object-oriented specialization and
integration of original and specialized code using static and dynamic aspect approach.
The results of my observations show that static way accelerates program's execution.
The limitation of dynamic way lies in overhead internally caused by aspect language. If
these overheads shall be eliminated this approach could be more perspective.
Acknowledgement: This work has been partially supported by the Grant Agency of
Slovak Republic grant No.VG1/0162/03.
References
1. Gamma, E., Helm, R., Johnson, R., Vlissides, J.: Design Patterns Elements of
Reusable Object-Oriented Software. Addison-Wesley, 1995. ISBN 0-201-63361-2
2. Masuhara, H., Kiczales, G.: Modeling crosscutting in aspect-oriented mechanisms.
In: Proceedings of ECOOP2003, LNCS 2743, Darmstadt, Germany (2003), 2-28.
3. Návrat, P., Filkorn, R.: A Note of the Role of Abstraction and Generality in
Software Development. Journal of Computer Science, Vol. 1, No. 1, Science
Publications (2005), 98-112.
4. Rashid, A., Blair, L.: Aspect-oriented Programming and Separation of Concerns.
In: Proceedings of the International Workshop, Lancaster University, UK (2001)
5. Schultz, U. P., Lawall, J. L., Consel, Ch.: Automatic Program Specialization for
Java. ACM Transactions on Programming Languages and Systems, Vol. 25, No. 4
(2003), 452-499.
6. Schultz, U. P.: Partial Evaluation for Class-Based Object-Oriented Languages. In:
Proceedings of the Second Symposium on Programs as Data Objects; Lecture
Notes In Computer Science, Vol. 2053 (2001), 173-197.
7. Schultz, U. P., Lawall, J. L., Consel, Ch.: Specialization Patterns. Rapport de
recherche 3853, 1999.
8. Slavkovský, A.: Specialization of design patterns using aspect-oriented
programming. In: Proceedings of ISIM '05, Czech Republic (2005)
9. Urban, M., Spinczyk, O.: AspectC++ Language Reference. Version 1.2, 2004.
http://www.aspectc.org
Exploring the Commonality in Feature
Modeling Notations
Miloslav ŠÍPKA∗
Slovak University of Technology
Faculty of Informatics and Information Technologies
Ilkovičova 3, 842 16 Bratislava, Slovakia
miloslav.sipka@gmail.com
1 Introduction
Feature modeling is the activity of modeling the common and the variable properties of
concepts and their interdependencies and organizing them into a coherent model
referred to as a feature model [1].
A feature model represents the common and the variable features of concept
instances and the dependencies between the variable features. Model represents the
intention of a concept, whereas the set of instances it describes is referred to as the
extension of the concept. A feature model consists of a feature diagrams and some
additional information such as short semantic description of each feature, rationale for
each feature, constraints, default dependency rules etc.
A feature diagram consists of a set of nodes, a set of directed edges, and a set of
edge decorations. The nodes and the edges form a tree. he edge decorations are drawn
as arcs connecting subsets or all of edges originating from the same node.
∗
Supervisor: Ing. Valentino Vranić, PhD., Institute of Informatics and Software Engineering,
Faculty of Informatics and Information Technologies STU in Bratislava
[1..1] [0..1]
f1 f2 f1 f2 f1 f2
alternative subfeatures XOR group group with cardinality <1-
c c 1>
c
<1-1>
f1 fn f1 fn
f1 fn
OR group group with cardinality <0-
k>
c c
<0-k>
f1 fn f1 fn
XOR group with optional group with cardinality <0-
subfeatures k>
c c
<0-1>
f1 fn f1 fn
Fig. 1. Comparison of feature modeling notations [2]
Another UML-based notation is the one used in FeatuRESB [3]. It explicitly deals
with variation points. It defines static and dynamic binding in a variation point. This
notation was overcome by Gurp-Bosch-Svahnberg notation [6] which has been
developed for expressing variability in software product lines. It brings OR and XOR
specialization into variation points. Initially, the binding type was not represented as
edge decorations, but this can be done using the flag at the feature. In Fig. 3, the two
mentioned UML-based notations are confronted with Czarnecki-Eisenecker notation.
142 Miloslav Šípka
Load time
f1 f2
dynamic dynamic f1 f2 f1 f2
XOR group Variation point feature – XOR generalization
static binding
c c c
f1 f2 f1 f2 f1 f2
OR group OR generalization
c c
f1 f2 f1 f2
Fig. 2. Comparison of others feature modeling notations
First additional information provided with features is binding time and binding mode.
Binding time is important if we have to describe implementation details of feature and
code with references feature. So it is important to identify binding time of feature.
First of five binding time is source time. The decision to bind feature is made by
programmer or designer during the implementation phase. Other binding times are
compile and link time. In this case the feature is bound automatically by preprocessor
or special linker program. There is no reason to make difference between linking and
compile time. Some languages do not have linking at all. This three times represents
static binding.
Other two types of bounding represent dynamic bounding. It is load and rum time.
Feature with load time bounding is selected in instance of concept in time when the
program loads in to memory. Feature with run time bounding can be selected widely
when the program is running. In both cases we must implement feature and compile it.
Exploring the Commonality in Feature Modeling Notations 143
But in fact implementing other modules can be different if feature can change in run
time of the program.
Another additional information supported with feature is layer. FODA [4]
identifies four layers of features. There are Operating environment layer, Capability
layer, Domain technology and Implementation technique. But there can be need of
more than four layers of features. So categorization of features in layers is not so
important and is used very rarely.
One important categorization is to identify if feature represents abstract (identical
as a abstract class in OOP) thing or have to be implemented and integrated as a part of
code.
Other additional information provided with features and feature model in general
are constraints and default dependency rules. Constraints represent necessary
conditions each instance of concept have to fulfill. Default dependency rules represent
rules of choosing default feature while creating instance of a concept. In FODA the
constraints are reduced to simple rules representing the so-called requires and mutual
exclusion relationships between features. A more sophisticated way of representing
constrains is to use predicate logic [5].
After comparing several notations we can extract the common parts. Czarnecki-
Eisenecker notation can act as a backbone for this. The reason is simple: each of the
analyzed notations extends this notation. Original Czarnecki-Eisenecker notation will
be improved in two ways. The first is extending by cardinalities as it is in Fig. 1. The
second way is to identify relationship between a feature and its subfeature as in Fig. 2.
It seems there are lot of information associated with features and feature diagram. If
fact it is impossible to choose set of information for common notation. The best way is
let user to choose witch associated information he need. In this case it is important to
let user choose what associated information will be displayed in a feature diagram and
how. Truly common parts of associated information are constrains and default
dependency rules. One effective way to express constraints is predicate logic [5].
3 Conclusions
In our survey we compare six notations of feature model. We discover that there are no
collisions between these notations. Concerning feature diagram, each notation
introduces different quantum of information in diagram. At one side, information
contained in diagram doesn’t have to be included as additional information. At other
side feature diagram can be difficult to read. Concerning additional information, we
found that each notation provides other type of information.
144 Miloslav Šípka
Acknowledgement: This work has been partially supported by the Grant Agency of
Slovak Republic grant No.VG1/0162/03.
References
1. Czarnecki, K. Eisenecker, U.W.: Generative Programming: Principles, Techniques
and Tools. Addison-Wesley, 2000.
2. Czarnecki, K. Helsen, S. Eisenecker, U.W.: Staged Configuration Using Feature
Models. In: SPLC 2004, LNCS 3154, R.L. Nord (Ed.), 2004, 266–283.
3. Giss, M. L. Favaro, J. d'Alessandro, M.: Integrating Feature Modeling with the
RSEB. In: Proc. of 5th International Conference on Software Reuse, Vicoria, B.C.,
Canada. IEEE Computer Society Press (1998),
http://www.favaro.net/john/home/publications/rseb.pdf
4. Kang, K.C., Cohen, S.G., Hess, J.A., Novak, W.E., Peterson, A.S.: Feature-
oriented domain analysis (FODA): A feasibility study. Technical Report
CMU/SEI-90-TR-21, Software Engineering Institute, Carnegie Mellon University,
Pittsburgh, USA, November 1990.
5. Vranić, V.: Multi-Paradigm Design with Feature Modeling. PhD thesis, Slovak
University of Technology in Bratislava, 2004.
6. Group, J., Bosh, J., Svahnberg, M.: On the Notion of Variability in Software
Product Lines. In: Proceedings of WICSA 2001 (2001),
http://www.jillesvangurp.com/publications/notionOfVariability.pdf.
Automatic Backup in Oracle Database
Miloš SÝKORA∗
Slovak University of Technology
Faculty of Informatics and Information Technologies
Ilkovičova 3, 842 16 Bratislava, Slovakia
msykora@gmail.com
1 Introduction
Without a backup it is impossible for the DBA to get a database up and running, if
there is a file loss, without loosing data. Backups are critical for recovering from
different types of failures.
Backup and recovery strategy depend on the type of company. For example I
choose software Development Company, which needs the logical backup and cold
(offline) backup of the testing database.
2 Backup scripts
The nature of backups and recovery strategy is always affected by the type of business
operations. In this case, I want to select proper backup and recovery strategy for the
small Development Company.
∗
Supervisor: prof. Ing. Vladimír Vojtek, PhD., Institute of Applied Informatics, Faculty of
Informatics and Information Technologies STU in Bratislava
Development Company does not need this solution. Therefore, the database is
configured in noarchivelog mode. The main feature of running database in
noarchivelog mode is that the redo log files are used in a circular fashion. DBA may
perform only operating system backups of the database when the database is shut
down. During each backup must DBA backup the entire set of data files, redo log files
and control files. In the case of failure DBA must recover these files from an earlier
copy of a full database (offline backup).
A closed database (cold) backup is an operating system backup of all data files,
control files, redo log files, parameter files, and the password file that constitute an
Oracle database.
I define an operating system backup procedure that will always back up all
necessary files as part of a strategy to safeguard against potential media failures that
can damage files. It is a simple script that shut down the database, copies the data files,
and opens the database. Then another script sends log file with results by e-mail to
DBA. For a Development Company I select to perform cold backup twice a month.
Automatic Backup in Oracle Database 147
Logical backup provides Oracle Export and Import Utility. Export utility provides a
logical backup of database objects or an entire database. The import utility is used to
read a valid Export file for moving data into database.
For a Development Company I choose everyday logical backup in Full database
mode. This mode exports all objects, except those in SYS schema.
148 Miloš Sýkora
In previous sections I describe how to make backups. It is important to know for each
DBA what the result of these scripts was. The easiest way is send an e-mail with the
log file of screen output.
Sending mails from operating system depends on platform. Because of this, DBA
needs to implement the functionality of sending email directly from the Oracle
database. Oracle has an e-mail server option that allows programmer to send mail from
within his code. In the case, users can send e-mails to competent persons when a
critical parameter is altered, when a database has some issues (for DBAs), or when a
backup is over and so on.
For e-mails without attachment UTL_SMTP and UTL_TCP packages are
required. UTL_SMTP is designed for sending e-mail over Simple Mail Transfer
Protocol (SMTP). The UTL_TCP package provides TCP/IP client-side access
functionality in PL/SQL.
Automatic Backup in Oracle Database 149
In this case DBA need to attach log files. When DBA sends email using Java
Stored Procedures (JSP) and the Sun Microsystems JavaMail package, attachments can
also be sent.
Performing mail notification:
2.5 Installation
The DBA have to ensure the complete path names of the files are noted and used
appropriately in backup. In a multiple database environment, care must be taken to
associate these files with the corresponding database through some naming convention,
since the names of the parameter files and password files are not recorded in the
database dictionary.
Location of backup scripts depends on operating system platform. UNIX cron
jobs can be scheduled with the crontab command. Windows can schedule any
application using the Windows Scheduler.
3 Conclusions
The primary goal of these backup scripts is to relieve the DBA from backup routine.
Only what he has to do is check his e-mails, and makes appropriate action (copy
backup files to tape, etc).
References
1. Schwinn, U., Venkatachalam, V.: Oracle8: Database Administration, Vol 1,
(March 1998)
2. DiIanmi, J., Raman, S., Robson, P.: Oracle8: Backup and Recovery Workshop, Vol
1 (October 1998)
Modeling Systems Using Design Patterns
Jaroslav JAKUBÍK ∗
Slovak University of Technology
Faculty of Informatics and Information Technologies
Ilkovičova 3, 842 16 Bratislava, Slovakia
jakubik@fiit.stuba.sk
1 Motivation
Current phases of software development process are fairly delimitated and defined
except for some experimental projects. To find the exact limits between phases is
becoming harder and harder, however. After business processes were defined and
requirements were concretized, there was a place for analysts and designers to create a
model of reality. In this phase, there is a need for narrow communication about
modeled problems between analysts and designers.
Designers need to zoom in reality described in the analysis. Based on the analysis,
the designers need to define the design model. It is very important to remove all
communication differences between the analysts and the designers as well as those
between designers themselves.
We want to be able to create a communication bridge between analysts and
designers to define a terminological glossary, basic modeling units etc. We create a
model in which analysts can find their required functionality and which offers
designers view the realization of the defined functionality. There are several resources
∗
Supervisor: doc. Ing. Jana Minárová, PhD., Institute of Informatics and Software
Engineering, Faculty of Informatics and Information Technologies STU in Bratislava
how to attain this bridge. In this method the concept of design patterns according to
catalogue [1] is used.
By the described method, we want to refine differences between the analysis and
the design to quickly come to an agreement between the analysts and the designers
concerning the design model.
2 Introduction to problem
Analysts know “what” and designers know “how”. There is a need to join these two
views together into one model where analysts can see which part of the system is able
to provide a required functionality and designers can have an apparent method how this
model can be transform into a design.
For this context we use older concept of design patterns. In each catalogue of
design patterns, a lot of patterns described with various UML diagrams, examples and
recommendations of use can be found. We can process this additional information and
get a list of functionality which using of each design pattern brings.
From an analyst’s point of view, we have design pattern functionalities. On the
other side, from the point of view of a designer, we have a way to implement a current
pattern, entire view of a design and an implementation of the application, a way in
which an application will be expandable in future and a lot of information from many
experts in the domain of object oriented software development.
3 Related works
There exist a lot of theories about design patterns composition. The main idea of these
theories is that pattern glue with another (or the same) pattern together solves largest
scope of problems. Whereas majority of publication concentrate on composing design
patterns on class level such as [6] and that argue by various mathematical theories, we
want to look on composition of design patterns on view of their functionality. We
enable analysts and designers to speak the same language, which lighten and simplify
mutual understanding.
Concept of modeling with pure design patterns was used in [7, 8]. Authors based
on publication of Alexander [9] defined two ways of composing design patterns.
Straight modeling was distributed to two phases. In the first phase “Analysis” analysts
list all related patterns. In second phase “high level design” designers keep patterns
selected by analytics to three models “Pattern-Level Model”, “Pattern-Level with
Interfaces” and “Detailed Pattern-Level model”. In each model designer explore new
details of pattern and application domain. The last model can be transformed directly to
class diagram.
This method is very similar like our approach but it is concerned on special group
of patterns named “constructional patterns”. Authors in thesis don’t define any
relations between patterns.
There are many notations of saving metainformation about design patterns in
concrete design. There are two mainly ways of these notations. First way is to extend
Modeling Systems Using Design Patterns 153
UML with resource exactly to extend UML for example UML Collaboration Notation
[3], Stereotype annotation [4], Tagged Pattern Annotation [2]. Second way is to define
visualization of design pattern in class diagrams for example Venn Diagram-Style
Pattern Annotation [5], Dotted Bounding Pattern Annotation [4], Pattern: Role
Annotation [5].
Basic modeling units in all of these notations are class, method or attribute in
dependence of concrete notation. For our using there are all notations too detailed and
didn’t defined relations and their notations on pattern level.
In following progress of pure design patterns phase based on analysts and designers is
a need to define relationships between patterns. In general we can separate
relationships to two groups:
1. general relationships - include relations between any of patterns except special
cases
2. concrete relationships - is assigned to a enumerated group of patterns, where
each pattern has its own role in relation
Now, for express relation between two patterns we used continuous line, which
says nothing about concrete relation between patterns and neither about role of pattern
(or class as a part of pattern) in relation.
We can conceive pattern as a subsystem which insure defined and known
functionality. With this generalization we have got model, which consist of group of
patterns expressed with subsystems and elementary relations between patterns
expressed with continuous line.
154 Jaroslav Jakubík
Now we can say that based on this model we came near from analysis to design as
far as to implementation. This model doesn’t represent material for definitive
transformation from model of pure design patterns to concrete design. General
relations between design patterns can be interpreted in different concept.
We don’t want go in this way. When we created model in pure design patterns
phase with sufficient metainformation it must be definitive transformation and
interpretation of this model to class diagram.
In comparison with elementary relationship there is a need to have concrete
definition of relations between patterns.
Fig. 2: Join of design patterns Composite and Iterator through Client class
in Iterator pattern on class layer
Modeling Systems Using Design Patterns 155
Fig. 3: Join of design patterns Interpreter and Iterator through Client class
in Iterator pattern on class layer
Based on first generalization we know how to use any pattern with pattern Iterator
(if it is necessary). The next step in process of generalization is to generalize pattern
Iterator to pattern B. Now we can compose any patterns by role of client. For example,
rendered in figure 4, class Leaf from Composite pattern can be client in Strategy
pattern. Class Leaf from Composite pattern is in role of Client in Strategy pattern.
Let’s name this relationship as follows: pattern A with class A1 used pattern B.
We have got whole definition of relation between two patterns, but how can we
write information about relationship to pure design patterns model? We need notation
for writing relation to model. What kind of information we need to know for transform
defined relation to class diagram? In this occurrence answer is very simple. We need to
know pattern A and pattern B, which are connected with relation, and class A1 which
is in Client role of pattern B.
The last problem of definition process is graphical formulation of defined
relation. We use current notation of UML and pattern express as subsystems as we
defined before.
4.3 Verification
The suggested approach into the software development and modeling has not been
verified in a commercial project, yet. This approach was used in two smaller
experimental projects but in these cases, the exactly defined relationships were not
used. We used patterns Iterator, Composite, Adapter, Strategy, Builder and Singleton
to reach the required functionality.
The phase of pure design patterns was used in the development of both systems.
Our phase has brought former comprehension of the design problems by analysts and
vice versa the comprehension of analytical requests by designers.
The statement cannot be generalized about all projects but the phase of pure
designed patterns seems to quicken the process of understanding the requests, reduce
the communication gap between analysts and designers and facilitate the partial
automation of transition from an analytical model into a designed one. This can
happen mostly in case that the phase of pure designed patterns is exactly defined and it
additionally includes other rules.
5 Future work
This work brings a new view on the concept of the design patterns. However, this
brings a lot of problems that have to be solved before the final use of this method in
commercial projects. Firstly, a large variety of relationships among patterns is
Modeling Systems Using Design Patterns 157
6 Conclusion
The proposed method tries to utilize as much as possible from the wide potential of
patterns. Furthermore, at the basis of the requested functionality, a model is being
created only by using designed patterns. This covers irrelevant details in the phase of
analysis and an initial design and on the other side it displays the essential details for
the transformation in the later design.
In comparison with POAD method from [7] and [8] our method in using design
patterns join both approaches in composing design patterns whether directly by gluing
patterns together to “stringing patterns” or with use of new defined relationships for
creating “overloaded patterns”. The main idea of our method is very similar like idea
of POAD method. Both approaches have some equivalent phases like analysis, in
which analysts define list of patterns to cover requested functionality, and phase of
design refinement, which comes after transformation of pure design patterns model to
class diagram. Our approach unlike POAD method defines only one model in
difference of three models in POAD. Each refinement creating in models of POAD is
substitute by using strictly defined relationships between patterns.
The mentioned approach to the software development or transition from an
analysis to a design based on the defined phase appears to be the appropriate
alternative to the traditional approach. This issue is not being sufficient for the
purposes of the real use. However, the missing relationships among patterns should be
defined upon the work experience of either commercial or experimental projects.
Acknowledgement: This work has been partially supported by the Grant Agency of
Slovak Republic grant No. VG1/0162/03.
References
1. Gamma, E. et al.: Design Patterns, Elements of Reusable Object-Oriented
Software. Addison-Wesley Publishing Company, 1995, ISBN 0-201-63361-2.
158 Jaroslav Jakubík
1 Introduction
Concerning the programming of personal computer, different programming languages
and environments were hitherto created. We have number of interesting options to
choose from. There are various classes of languages, there are various levels of
abstractions. These programming environments enable us to explain the computer how
to represent, store and manipulate the information of our interest. When we are
proficient in some programming environment, we can deal with most kind of locally
stored information without problems.
There are, however, situation when two or more processes need to share the same
data. That data might be on the same or on a remote computer. There we have various
∗
Supervisor: prof. Ing. Jiří Šafařík, PhD., Institute of Informatics and Software Engineering,
Faculty of Informatics and Information Technologies STU in Bratislava
bad options to choose from. None of them fits to the language we are using. Many
programmers wouldn't ever notice this problem because the language they use is so
inconsistent, that another inconsistency doesn't change anything. Those of us, however,
who use some consistent language will suffer.
Databases more or less provide the functionality we need. They enable us to have
shared, concurrently accessed and persistent data. So what is wrong with databases?
They do not enable us to do what we need to do. We want to create open systems. We
would love to have a possibility to create vivid, interacting and communicating
information systems. We need similar platform for distributed computing as was
provided by Smalltalk in the area of personal computing. The impacts of such a
wonderful computation platform, if it existed, would be immense. It would at least free
us, Smalltalkers, from the prison of a local image. The wise have already realized the
properties and implications of open systems long time before [1]. We need open
systems. It is the way to explicitly cooperating information systems, e-business, e-
government etc. The personal computing is covered by vast number of various
programming languages. Concerning open systems, there seems to be none. We think
that it is not because there is no need for such a platform. It is so, because of the nature
of the problems in this area which are far more complex than with which the
programmer has to deal with when creating a single isolated sequential program.
The first problem which attracted our interest is the problem of finding proper
computational model for expressing all the computation we need. In personal
computing, we had Smalltalk. A single, powerful, consistent and general-purpose
language. As it was realized earlier [1], open-systems will be composed from diverse,
concurrent, asynchronous subsystems.
and pipes as glue which binds them together. The primitive functionalities could be
composed to the larger whole in many different ways. We can start with simple
functionalities and by composing them together we can gradually add the complexity.
This approach is an example of composable programming paradigm. The composition
we speak about is easy. Imagine that you have two processes and you interconnect
them with a pipe. The effort required for understanding the whole is the sum of the
efforts required for understanding the parts plus some constant which does not depend
on the complexity of the parts.
4 The Object-Model
We have had to make some decisions how to organize actors. The object model
enables the actor to store its state–there are attribute slots. It also enables the actor to
store its behavior and thus specify its reactions to the mails it receives–there are
method slots. Attribute slots and methods slots has names. They enable us to recognize
between the particular attributes and methods similarly as it in normal object-oriented
languages. Value of an attribute slot is a reference to a mailbox. Value of a method is a
block-context. More detailed information about the organization of actors can be found
in [5].
5 Primitive Actors
Some values cannot be expressed as a composition of other values. Integers are
example of such kind of values. If our system didn’t contain integers, the programmer
wouldn’t be able to implement them himself. Therefore our system, similarly as it is in
Smalltalk, provides the programmer with all the necessary primitive actors he needs to
build its own actors. Integers are also actors although their implementation might be in
some respect obscure. Nonetheless, the programmer can treat them as any other actors.
No other primitive actors were implemented because anything else can be represented
by composition of integers. Numbers of floating point, for example, can be represented
as a couple of integers where the first integer actor is a mantissa and the second one is
an exponent. Or, if we would like, we could introduce a second kind of primitive
actors–floats–to take advantage of the floating-point support which is provided directly
by the underlying hardware, if we wanted.
One of the primary expressions is an integer expression. The programmer can
utilize a literals to denote a particular integer actor. That is convenient. We could
implement also a support of other literals such as characters or strings. They, however,
need not to be mapped to primitive types as it is in case of integers, but perhaps into
derived actors, i.e. those ones, whose implementation is based on primitive actors or
on other derived actors.
The other kind of primitive actors we couldn’t avoid to implement is so called
block-context actor. They are somewhat similar to the blocks in Smalltalk or to
lambda-expressions in LISP. They represent a deferred computation. These block-
contexts can be invoked at run-time. When they receive a predefined message with
selector called value, their body is executed. Their execution may require additional
parameters and these are also given at run-time. The body of each method is also
represented as one block-context. The block-contexts are useful because if we have
them, we can express branching and iteration by passing mails. We need not introduce
special purpose language constructs. All we need is passing mails. This language is
really beautiful because it is built from a small number of powerful concepts.
On the Composability of Concurrent Systems 163
6 Mailbox
The capabilities in our system are of two kinds. There is a slit capability and there is
also a mailbox capability. As it was already mentioned, the attributes store the mailbox
capability–they refer to some mailbox. The mailbox capability gives its holder a
possibility to create a slit at the end of the mailbox. The slit capability, on the other
hand, makes it possible for the holder to either create a new slit before a given slit
which is held or to insert a message before a slit which is held. Note that in this way it
is possible to operate only on those parts of the mailbox to which we have capabilities.
One activity may be operating on the beginning, other on the middle and another
unrelated activity perhaps on the end. The mailbox is a total ordering of the slits and
mailboxes which belong to that mailbox. The mailboxes play the crucial role in the
synchronization rules enforced by the programming environment. When a programmer
utilizes a slit to send a mail, the slit not only determines the mailbox (and therefore also
the actor) to which a given mail will be inserted. Because mailbox is total ordering of
items it contains and because of the enforced rules on the operation which can be done
with mailbox and its items, the slit determines also the state of the receiver actor on
which the sender of that mail can count on. If for example the sender reveals some
state of another actor, then thanks to the capabilities it holds, it can utilize these
capabilities to act appropriately without the threat of interference. No other actor can
jump into and interfere. Other actors operate on other part of the actor in question. This
is the vital property of our system.
The programmer does not operate on the mailboxes and slits explicitly. What is to
be done with the capabilities he holds is expressed in the code indirectly,
comprehensively and conveniently. The manipulation of the capabilities drove the
design of the semantics of the language.
The actors live in parallel with each other. That is, they could process the
messages contained in their mailbox, to which they listen to, concurrently. Sometimes
some actor needs a result computed by a method of some different actor and he wants
to use this result in the method. In sequential programming we did not have any
problem because the result of the computation appeared on the stack of the process.
The elegant solution of this problem in the Actors paradigm was proposed number of
years in the past by the fathers of the Actors paradigm [4]. They have proposed the
abstractions called future. The future is, as we understand it in our system, a mailbox
which does not belong to any actor, i.e. no actor listens to it, no actor fetches mails
from it. This future, however, enables its creator to pre-post the mails to the not yet
computed result, to whose mailbox this future will be included, once the result is
established. This enables the creator of the future to proceed with computation even
though some things were not yet computed. It sends those mails to the not yet
computed result which it has to send and does not care about when and who will
process them. The support of futures is built into the language, their creation is
automatic.
164 Matej Košík
Fig. 1. An example of a mailbox. There are slits and mails inside it. More about the
mailbox, slits and messages can be found in [5].
7 Methods
Methods specify the behavior of an actor when it receives a mail with a selector under
which a given method is stored in the actor. Each method, when compiled from the
source code into “machine code“, is internally stored as a sequence of commands. We
have a language in which the activity can be specified conveniently. That language has
a syntax very similar to the syntax of Smalltalk. The semantics of the sentences written
in this language is, however, very different. The compiler turns a textual source code
into internal representation. Each block is internally represented as a sequence of
commands. There are two kind of commands. We have a mail-sending command and
primitive command. Mail-sending command simply denotes a mail which has to be
sent when that command is executed. Most of the commands in the system are exactly
of this type. Each mail-sending command holds three different pieces of information: a
mailbox capability, a selector and slit capabilities (the parameters of that mail). The
mailbox capability makes it possible to include the future in the place (before proper
slit) of a mailbox which was computed to be the result of the invoked method.
8 Primitive Statements
Primitive statements are here to implement such actions, which cannot be further
decomposed into mail-sending. The system itself contains only a limited number of
these primitive commands and they are usually wrapped in some methods. The
programmer himself will not use these primitives directly. There is also finite set of
primitives sprinkled throughout the system in appropriate methods of appropriate
classes. Most of the commands are message-passing commands.
Actions such as addition, subtraction of integers, cloning of an actor, or doing
nothing (but including a given future to our mailbox) are so primitive, that they cannot
be further expressed by sending other mails and relying on the functionality of simpler
methods.
9 Composability
We are confident about the general-purpose usability of the proposed programming
environment. It seems to be able to handle all the problems and with the same ease,
which were able to do in Smalltalk. The computation is performed differently, the
language we have proposed has different semantics, the proposed computational
environment could take advantage of the parallel nature of the Internet (whereas
On the Composability of Concurrent Systems 165
Smalltalk couldn’t. Or better to say, Smalltalk could take advantage of the Internet and
do parallel programming as badly as it is possible in any other sequential programming
environment.) We are not confident whether the proposed programming can be ranked
among composable environment (to which Smalltalk and any other normal sequential
programming environment certainly belong.) The classical parallel programming
environment based on sequential communicating processes are not composable. This
property is best exhibited when something goes wrong in the whole system. In
sequential system, when it has proper architecture, the time to locate the problem is log
N where N is number of all elements in the system. You start from the root of the
functionality tree and end in some of the leafs (primitive actions). The system itself
may be composed of huge number of elements, but the path from the root of the tree to
any of its leaves is relatively short.
That is not the case of the classical parallel systems. There, everything effects
everything else. It could be compared to the sequential programming with GOTO
statement. If sequential programming were done with direct jumping into some other
functionality, adding of new elements to the system would be hard because you would
need to re-think the whole system (who could jump into the newly added elements and
to which other elements newly added should jump). You need to reconsider the whole
every time it is enriched with new elements. That makes this development method
suitable only for small problems. It was replaced by the procedural programming.
When the programmers learned these new notions, they were suddenly capable to
produce sequential systems of yet unseen. Now it might seem weird, but there were
times when the implementors of the programming languages took care to implement
procedure calls effectively enough in order not to demotivate the users of those
compilers (us, programmers) to use procedures instead of wild goto statements [6].
Parallel-programming expressed as coarse-grained sequential communicating
processes is like sequential programming with the GOTO statement. It can be done
only in small scale and the result is inflexible. Just look around how many sequential
programmers do you know and how many parallel programmers do you know. There is
so few of them because doing parallel programming is not for normal people. It is so
because we do not have proper abstractions.
deterministically and perhaps also propose its automatic resolution. We would like to
show on examples demonstrating the way how parallel activities can operate on the
shared object known to all of them. We would like to exhibit the composability. That
is, when we have a whole composed of parts, then detection of malfunction is
logarithmic function of the number of the elements from which the whole is composed
of. As it was the case in the procedural-programming and object-oriented programming
with passive objects.
11 Conclusions
We have got the idea about the advantage of total ordering of mails sent to a single
actor in May 2004. This idea gradually matured and soon it will be examined. In the
meantime we realized the importance of the security [2] and ways how to deal with it.
We are very far from the final solution. Lot of the problems (load-balancing, security,
distributed garbage-collection, distributed persistence) are not yet solved and their
solution seems to be conflicting. Also, maybe it is possible to solve each of them in
isolation but it is questionable whether it is possible to combine those solutions
together. But that is beyond our current horizon.
Acknowledgement: This work has been partially supported by the Grant Agency of
Slovak Republic grant No. VG1/0162/03.
References
1. Hewitt, C.: Offices are open systems. ACM Transactions on Information Systems,
Vol. 4, No. 3 (1986), 271-287.
2. Stiegler, M.: A PictureBook of Secure Cooperation. Hewlett-Packard, 2005.
http://www.skyhunter.com/marcs/SecurityPictureBook.ppt
3. Andrews, G. R.: Concurrent Programming. Principles and Practice. The Benjamin/
Comings Publishing Company, Inc., 1991.
4. Agha, G.: Concurrent Object-Oriented Programming. Communications of the
ACM, Vol. 33, No. 9 (1990), 125-141.
5. Košík. M.: V2. 2005. http://altair.dcs.elf.stuba.sk/~kosik/V2.pdf
6. Hoare, C.A.R.: The Emperor's Old Clothes.
http://www.braithwaite-lee.com/opinions/p75-hoare.pdf
7. Miller, M.: E, Open-Source Distributed Capabilities. http://www.erights.org
8. Košík, M.: Programming Constructs in Actors Computational Model. Faculty of
Informatics and Information Technology. Slovak University of Technology in
Bratislava, May 2004. http://altair.dcs.elf.stuba.sk/~kosik/V1.pdf
Extensional and Intensional Semantics
of pUML Objects
Miroslav LÍŠKA∗
Slovak University of Technology
Faculty of Informatics and Information Technologies
Ilkovičova 3, 842 16 Bratislava, Slovak republic
miroslav_liska@formal-analysis.com
1 Introduction
Software specification is necessary but not sufficient condition for developing proper
solution. Even final system is without errors, does it really realize customer
requirements?
Software specificators use many different techniques to create specification.
Specifications are written in natural or in artificial language. These artificial languages
can be formal or semiformal. Formal language architecture is specified in precise way,
i.e. well-formed architecture, i.e. syntax mapped into semantics using mathematical
language. When the language is not defined formally, but its architecture maps syntax
into semantic weakly using natural language, we can call this language as semiformal
(e.g. UML).
∗
Supervisor: doc. Ing. Jana Minárová, PhD., Institute of Informatics and Software
Engineering, Faculty of Informatics and Information Technologies STU in Bratislava
2 Formal language
Language in common implies that syntax is mapped into semantic domain, where the
meaning of syntactic elements is, strictly speaking, just those mapping functions.
Syntax in common is semiotic discipline which studies symbols, language elements,
without pointing on theirs meaning. The simple word, in syntactic point of view, has n
elements, has some grammatical properties. But the meaning is not important. What is
very important and also interesting property of syntax is proofness [1].
Semantics, on the contrary, primary studies the meaning of words (i.e. meaning of
syntactic elements). But the question is, how can be used this in software development
process?
The goal of this article is to use mathematical and analytical philosophy
techniques in PUML for respond to previous question. Firstly it is necessary to specify
mathematical language and its properties as theories, proofness, formulas, language
realizations, correctness, completeness [2].
The most common mathematical languages are based on predicate logic. Syntax
of this language consist of infinite many symbols for variables, logical symbols,
functional symbols, predicate symbols, symbols for quantifiers and additional symbols.
Syntax of language also defines formal system for this language. Formal system
contains axioms, proofness, theorems [2].
Semantics of this predicate language studies thruthness of syntactic formulas.
Formula is not proposition in common, what results that is not possible say, if the
formula is true or false. For example, let’s define predicate P as property of some
element to be positive integer. Then the formula
∀x ∈ X : F ( x) (1)
4 UML imperfections
Many articles about this topic were written. Before I will continue also with this trend,
I would like to say few words about UML perfections. Language UML is standard
modeling notation in software development domain. UML did great progress into
software systems development. Concept of use cases (e.g.) is very powerful and
interesting, what finally brought new generation into specification, realization and
documentation of software systems. In today’s world, there are many great software
technologies as Microst.NET, Java, Oracle, Lotus etc. But only the technology can’t
alone bring the right solution, even the technology has brilliant, modern architecture.
There must be some abstract research discipline, to enable fully use these power, e.g.
through correctness. And finally UML brought irreversible step toward here. What
a great step.
But even UML improve this positively, there are still too many lacks, what
language UML after all also brought. The main imperfection of UML is lack of
precision in its well-formned architecture, i.e. weakly defined semantics.
170 Miroslav Líška
The previous image depicts abstract syntax of use case diagram from UML 2
Superstructure specification. The well formed rules and semantics is written in natural
language. What is wrong with this access? Syntax and semantics are written in
different languages (class metamodel and natural language) but what is more
important, semantics is defined from precision point of view very controversially, what
can results in endless discussion, which semantics is proper and which is not. Syntax of
UML doesn’t have also build-in calculus for proofness. And also, the lacks of weakly
defined semantics finally implies the fact, that UML can’t use theorems of correctness
and completeness between specification and realization (i.e. between theories and
model of theories).
The existence of this fact is simple. Specifications written in UML are more
understandable as in math, and it doesn’t requires knowledge of formal methods.
Extensional and Intensional Semantics of pUML Objects 171
5 Precise UML
PUML is an international group of researchers and practitioners who share the goal of
developing UML as precise (formal) modeling language. PUML is written in Z, where
this language is precise language in mathematical point view, it is based on predicate
logic [5]. It enables every concept of precise defined language as theory, model of
theories, proofness, correctness, completeness … etc. Let’s give simple example of
PUML, where the semantic of classifier will be show. Note this example is only
shortening preview of classifier specification. A classifier has a name, and a set of
attributes:
Abstract syntax is then defined as set of classifiers. For exact definitions please
refer to [2]. In order to give meaning to classifiers, values must be assigned. PUML
interpretation of UML object is then:
Sentences John is great student and John wrote great research paper have
evidently different syntax. The first two sentences are the same extensions of word
John, because they simply talk about John. But they also want to refer, that John is
great student and also John wrote great research paper. So these sentences are
different intensions of the word John also [6].
In extensional view class state extension defines the set of all existing class
objects, and a mapping between objects atoms and their state intentions:
(e.g. Z/EVES tool). Analyst could write theorems based on its specification and to
verify them to improve his specification.
7 Conclusions
Question is how it can be usefully implemented in development process? It is to
difficult imagine, that software analysts will write their specification only using formal
methods in real, big commerce projects. But in near future, we can’t exclude
application of this method for some complex part of theirs specification. On the other
hand, actual usability’s of formal methods are applied in improving model
infrastructures (e.g. UML), and also in enhancement of proofness capability in case
tools.
Acknowledgement: This work has been partially supported by the Grant Agency of
Slovak Republic grant No. VG1/ 0162/03.
References
1. Amálio, N., Stepney, S., Polack, F.: Formal Proof from UML models, Department
of Computer Science, University of York.
2. Cmorej, P.: An Introduction into logical syntax and semantics.
3. Evans, A., France, R., Lano, K., Rumpe, B.: The UML as formal modeling
notation, Computer Standarts & Interfaces, 1998.
4. OMG: Unified Modelling Language 2: Superstructure, Final adopted version, 03-
08-02
5. Spivey, J.M.: The Z Notation: A reference manual. Prentice Hall, Englewood
Cliffs, NJ, Second Edition, 1992.
6. Peregrin, J.: An Introduction into theoretical semantics, Masaryk University of
Brno, 1994.
Using UML with OCL as ADL
Matúš NAVARČIK∗
Slovak University of Technology
Faculty of Informatics and Information Technologies
Ilkovičova 3, 842 16 Bratislava, Slovakia
navarcik@fiit.stuba.sk
1 Introduction
Recent decade highlighted the problem of large-scale systems in context of their
analysis, design, integration, modification and so forth. Consequently, the notion of
software architecture is in the focus of software engineering research. The research in
software architectures started by identifying architecture patterns which has been
adapted to architectural styles. Contemporarily, a lot of effort has been provided to
formalization and specification. Formalizing architectures can lead to their strong
acceptance by industrial practitioners and hence even industrial but just academic
usage of knowledge of software architectures can be applied.
Software architecture formalization has been embodied by formal languages for
architecture specification or description, commonly called Architecture Description
Languages (ADLs). However, as well as there is no common single definition of
software architecture, there is no consensus upon what an ADL is. A lot of studies have
been appearing to introduce, improve ADLs, many works have tried to identify the
common features of ADLs to conclude the definition.
Along with software architecture research the industry enforced appearance of
common language for modeling during analysis and design phases. Resulting Unified
∗
Supervisor: prof. Ing. Pavol Návrat, PhD., Institute of Institute of Informatics and Software
Engineering, Faculty of Informatics and Information Technologies STU in Bratislava
Modeling Language (UML) has matured to formal language with graphical notation
and nowadays, UML is de facto industrial standard in software engineering.
Within this paper, we would like to briefly summarize current considerations on
ADLs and provided overview on recent approximations of UML to ADL. Anyway,
omitting Object Constraint Language (OCL) as integral part of UML degrades UML
far away from ADLs.
The paper is organized as follows. Section 2 introduces ADLs and tries to
uncover distinction between ADLs and other languages; section 3 discusses UML as
language capable to describe and model software architecture; section 4 deals with
UML embedded OCL as powerful tool for modeling of and reasoning on software
architectures emphasizing profiling UML; and finally, section 5 concludes the paper.
2 ADL
[1] defines Architecture Description Language (ADL) as “a language (graphical,
textual, or both) for describing a software system in terms of its architectural elements
and the relationship among them”.
In other words, ADL is a languages enabling formalization, description,
specification, modeling and reasoning on software architectures. Each of these features
should be fulfilled by language that is proclaimed to be ADL.
The number of languages generally considered ADLs is about 20. [11] introduces
15 of them. To the list belong languages as Wright, ACME, C2 and others. These
languages differ in features, possibilities, and mathematical background, however.
3 UML
Unified Modeling Language (UML) [10] is formal graphical language considered a de
facto industrial standard. Although the language has been created as graphical language
firstly to support object-oriented software analysis and design, the language has been
revised couple times and today, it is a general formal language capable to describe
a software system The UML has well defined formal syntax and semantics and can be
machine checked and processed.
UML 2.0 enriched support to modeling architectural issues of the software system.
Among the most important features count enriched interfaces, ports, refined
components and connectors.
Interfaces can be fully defined in a protocol statements and interface state
variables. The explicit distinguish between provided and required interfaces avail.
However, one must count on three different ways to capture interface in UML.
Consequently, the assembly element appeared as a handshake of required and provided
interfaces.
Port is a new concept to UML. It is very close to interface but that each port is
a distinct interaction point of its classifier. Anyway, port may have interfaces defined.
Components and connectors can provide internal viewing with embedding even
another internal components and connectors. Hence one can model lower system
structures as appear in real solutions: as there is no clear difference in among
component and e.g. classes, the hierarchical composition of system in modeling should
be included.
The significance of UML as wide spread language supported by industry has been
attracting research attention for a long time ([3], [5], and [1]). However, plain UML
has never been identified strong enough to be considered ADL. The position of plain
UML is fairly the position of documenting language.
Anyway, [3] discussed 5 possible strategies in using UML for architecture
description. Basically, they supposed the architecture described by types and their
instances. The strategies of architecture transcription are summarized in Tab. 1.
178 Matúš Navačik
Interpreter
ProgramReader
«Filter» Source
Sink Grep
Sink1
«Pipe» «Pipe»
«Filter» Source1 «Filter»
Splitter MergeAndSort
[6] suggested profiling based on OCL defined stereotypes to map particular ADLs to
UML. This approach seems to be very promising. UML profile is a set of elements,
usually focused on particular business domain. Creating a profile does not influence
the language
Bellow an OCL definition of stereotype WrightGlue suggested by [6]. The
stereotype defines a glue element of Wright ADL.
self.stateMachine -> size = 1 and self.stateMachine ->
forAll(sm | sm.stereotype = WrightStateMachine)
This is the principal question. Although the UML embedded OCL provides all features
expected from ADL, we tend to answer rather no, as well as software architecture
community still does. The problem that appears is the fact, that UML + OCL >> ADL.
The concepts of UML are clear, can be fully refined to conform to the most of ADLs.
Using OCL, even non trivial reasoning on the system is available. However,
considering UML as ADL narrows the capabilities of the language. And consequently,
UML is tending to be used improperly as ADL. The best practice should be gained by
using specialized UML profile, possibly profile mapping particular ADL to UML.
On the other hand, UML must be considered as an alternative to ADLs when
modeling and reasoning on software architectures. UML is fairly the industrial
description language No. 1 for software architectures.
Using UML with OCL as ADL 181
5 Conclusions
UML is widely accepted language by practitioners. UML is capable to describe and
model even software architectures. The most promising way of mapping software
architectures to UML is using profiles on UML such that those profiles are derived as
mappings of ADLs. This approach leads to fully sound modeling language capable to
cover all requirements on ADLs. Recent versions of UML, in addition, reduce the
problem area of profiles. UML 2.0 has introduced some new concepts and refined
some other in a way that UML 2.0 is now almost software architectures conformant.
Embedding UML with OCL allows further reasoning on architectures. OCL
armed language shall be able to capture even dynamical aspects of the architecture.
Enabling this, the UML overtakes the most of ADLs.
However, UML is not a fair ADL. UML is capable to follow modeling of other
levels of detail, allows modeler to deal with tasks far away from ADLs. This great
power rooted in generality of the UML is the reason for exempting UML from ADLs.
The UML has no mechanisms to prevent user from misusing concepts. This can not be
avoided by simple profile. This is a mater of using UML.
References
1. Clements, P. et al.: Documenting Software Architectures. Views and beyond.
Addison-Wesley, Boston, MA, USA, 2002.
2. Garlan, D., Kompanek, A. J.: Reconciling the Needs of Architectural Description
with Object-Modeling Notations. In: Proc. of the 3rd Intl. Conf. on the Unified
Modeling Language - «UML» 2000. York, UK (2000)
3. Garlan, D., Monroe, R. T., Ivers, Wile, D.: ACME: Architectural Description of
Component-Based Systems. In: Foundations of Component-Based Systems.
Cambridge University Press (2000), 47-68.
4. Garlan, D.: Software Architecture. In: Encyclopedia of Software Engineering. John
Wiley & Sons, Inc., USA, 2002.
5. Ivers, J., et. al.: Documenting Component and Connector Views with UML 2.0.
Technical report CMU/SEI/2004-TR-008, ESC-TR-2004-008. Carnegie Mellone,
SEI, 2004. http://www.sei.cmu.edu/pub/documents/04.reports/pdf/04tr008.pdf
6. Medvidovic, N. et. al.: Modeling Software Architectures in the Unified Modeling
Language. ACM Transactions on Software Engineering and Methodology, Vol. 11,
No. 1 (2002), 2-57.
7. Medvidovic, N., Taylor, R. N.: A Classification and Comparison Framework for
Software Architecture Description Languages. ACM Transactions on Software
Engineering and Methodology, Vol. 26, No. 1 (2000)
8. Navarčik, M., Polášek, I.: Object Model Notation. To appear in: Proc. of 8th Intl.
Conf. ISIM’05. Marq, Ostrava, Czech rep. (2005)
182 Matúš Navačik
1 Introduction
Programming in any language involves the usage of constructs. Each of these
constructs, like for example iteration, message send, conditional execution or
expression evaluation, have their own syntax and semantics. The knowledge of the
semantics, which has usually nothing in common with the syntax, enables the
programmer to express his or her thoughts. The knowledge of syntax, on the other
hand, is an essential requirement for the ability to write down the thoughts already
expressed in the semantics of the particular programming language. The syntax of a
construct departs from its semantics in the sense that the syntax of the construct can be
chosen almost at will, the only mandatory constraint being the existence of some kind
of separate places or slots for the arguments of the construct. Thus, syntax of a
∗
Supervisor: doc. Ing. Martin Šperka, PhD., Institute of Applied Informatics, Faculty of
Informatics and Information Technologies STU in Bratislava
construct plays a role equivalent to a symbol here, which has the consequence that
there exists a magnitude of programming languages with almost identical constructs
from a semantic point of view but which are being typed in numerous different ways
[1]. Although this article is not meant to reconcile this problem, it seems rational that if
programming languages were designed in a way that allows to change the look of their
constructs and to seamlessly add new constructs into the language as they are needed
or invented, there would exist at least a hope for the different syntaxes with the same
semantics to converge into (ideally) one nice syntactic element so that competition
between different languages becomes to be based on the ability of the language to
express thoughts and to be less based on the ability to learn the subtle differences in
syntaxes with the same meaning. This however does not mean that there would be no
competition on the syntactic level.
An extensible programming language can have an advantage over a language
defined by a fixed set of grammatical rules because it can respond more rapidly to
changes. For example, a new syntax for an already existing construct could be tested to
see how it performs and feels in respect to the already existing syntax and adopted if it
performs well. New constructs (that is: new semantic elements) could be added to the
language to extend its capabilities so that a change does not require to design a
completely new programming language but only to extend an already existing one.
As evolution proceeds by creating new entities which replace some of the already
existing ones not fit enough to survive, it is necessary that a programming language
capable of evolution has the ability to get rid of constructs which are considered
inferior. However, the present state of affairs in the style of development of new
programming languages and of modification of existing ones makes this idea almost
insane because almost all programming languages take for granted to retain all of their
existing constructs if they are to be modified.
The next section introduces a model of concurrent object-based computation
which is then in section 3 used as a basis for building new constructs. Section 4 gives a
short overview of the graphical user interface allowing the user to program by direct
insertion of objects, some of which are programmatic constructs, into program's code.
The next section discusses the implementation of new constructs in Java and shows
example constructs. This is followed by a comparison of programming in our
environment with other approaches to extensible programming.
The notion of a rule is similar to the notion of a rule of a Turing machine [2] or of
a production system [8] - the only difference is that at most one rule gets executed per
received message. Each rule has a condition-part and an action-part which executes
only if the condition-part is satisfied. The rules are examined in the order in which they
are listed and the examination stops when a rule with a satisfied condition-part is
found.
The condition-part is a list of conditions which are checked (in the order in which
they are listed) whether they are satisfied in the current context of object's state and
received message. The condition-part can be empty in which case it is treated as being
always satisfied. The action-part is a list of actions which are sequentially executed in
the listed order. The customization points of the programming language are the
conditions and the actions.
Object's state consists of a boolean value indicating whether the object currently
processes a message. Because it is expected that many programming constructs will
use variables, the state also contains structures for global and local variables. The local
variables are ordered into a stack of frames each holding variable values for a rule.
Object's global variables have the ability to survive over time while local variables
cease to exist after message processing finishes.
As there already exist numerous programming languages, the model is not
implemented from scratch but is designed and implemented in an already existing
language and environment, namely Java. The design of classes in Java is based on the
specification given in previous paragraphs. For example, a message sent
asynchronously from one object to another is an instance of a Java class. A message
186 Ján Žiak
can be any object of the implementation language, although it is typically a list of Java-
objects. Object's response to a message is based on the analysis of the content of this
message.
By default, messages sent to the object performing the send (i.e. to itself) are
processed synchronously. This is similar to a method call in ordinary object-oriented
programming languages. It should be noted that it impossible to known in advance
whether an object is sending a message to itself or not. An object could receive a
reference to itself in some message, store it in a variable and try to send a message to
this received object. It is ensured that this always results into a synchronous message
processing. This uses the stack of local variable frames to store information about
values of variables when a rule is calling another rule.
It should be noted that the idea of extensible programming presented in this article
would have been impossible without the existence of this graphical environment for
manipulation with objects.
Figure 2 shows two sample rules. The condition-part is in the top and action-part
in the bottom. Variables are in bold, syntax of constructs is in italics, words in regular
style designate message parts and the boxed text represents a symbol for a Java-class.
Design and Prototype Implementation of an Evolutionary Environment... 189
The first rule in the figure uses these constructs: message send, evaluation
whether a variable is a global variable, declaration of a global variable, assignment,
expressions which evaluates to the received message and reference to the receiver, and
finally a send operation. The semantics of the rule says that its action-part is executed
when variable state is not a global variable. The actions declare two variables as
global (i.e. „static“), perform two assignments and then send the just-received message
to the object itself for further processing.
The second rule is simple in its actions which just perform two message sends. Its
condition part contains construct called a selector which is able to determine whether
the received message looks like the specified list of objects, in this case as a list of
strings finished by an object which is assigned to the variable aCollection. The
object assigned to aCollection is then checked for its conformance with a Java-
interface. The condition-part of this rule simulates the checks which are performed
when one invokes a method in Java. The main difference between this rule and Java is
that Java uses static binding of method names rather than dynamic ones.
Some of the constructs which can be used to build programs are summarized in
table 1. The last construct enables to process a specified message by a specified
behavior on the behalf of the current object. This enables the programmer to represent
patterns similar to inheritance.
7 Conclusions
This article described a method of extending a concurrent programming language with
new constructs. The initial programming language is minimal. New constructs with
new capabilities can be added to the language in order to extend it. The syntax of
constructs is specified mainly by their graphical appearance and need not to be
represented by text only.
The suggested method should enable the system to survive over a long period of
time because new constructs with new meanings can be added to the language. The
system does not initially contain constructs (except the constructs for simple message
send and subexpression evaluation), so the set of constructs is in fact initially empty.
Old-fashioned constructs which are no longer being used by programmers should be
those that loose the struggle for survival among various different constructs with
different semantics.
It should be noted that this article presented the implementation in an idealistic
way and omits a precise description of the implementation.
There remains a lot of work which should be done in the future. First of all, the
environment has not been tested in practice in a community of programmers. However,
the odds that it would keep its promise of being evolutionary seem to be high. The
environment should be populated with numerous new constructs – which would surely
entail the necessity for some changes in the current prototypical implementation.
References
1. Hodge, R., Kress, G.: Social Semiotics. Cornell University Press, Ithaca, 1988.
2. Turing, A.M.: On Computable Numbers, with an Application to the Entscheidungs
Problem. In: Proceedings of the London Mathematical Society, Vol. 42, No. 2
(1937), 230-265.
3. Ungar, D., Smith, R.B.: SELF: The Power of Simplicity. Lisp and Symbolic
Computation: An International Journal, Vol. 4, No. 3 (1991)
4. Agha, G.: Concurrent Object-Oriented Programming, Communications of the
ACM, Vol. 33, No. 9 (1990), 125-141.
5. Bachrach, J., Playford, K.: The Java Syntactic Extender. In: Proceedings of
OOPSLA’01, Tampa, Florida (2001), 31-42.
6. Getting Started with the Annotation Processing Tool (apt)., Sun Microsystems,
2005. http://java.sun.com/j2se/1.5.0/docs/guide/apt/GettingStarted.html
7. Wilson, G.V.: Extensible Programming Systems for the 21st Century, ACM Queue
(2004), http://www.third-bit.com/~gvwilson/xmlprog.html
8. Russell, S.J., Norvig, P.: Artificial Intelligence: A Modern Approach. Prentice
Hall, New Jersey, 1995.
9. The Homepage of Squeak, http://www.squeak.org
10. Eckel, B.: Thinking in Java (3rd Edition). Prentice Hall, 2002.
Web Technologies
and
Information Systems
Spot-it – Going Beyond the Vision Loss
Boundaries
Martin ADAM, Michal BARLA
Peter SIVÁK , Michal TVAROŽEK ∗
Slovak University of Technology
Faculty of Informatics and Information Technologies
Ilkovičova 3, 842 16 Bratislava, Slovakia
csidc@atrip.sk
1 Introduction
Nowadays, vast amounts of information are available to many people all around the
world. What is more, the volume of available information is growing daily and it thus
becomes increasingly difficult to organize, search and access this information. The
problem of information processing will become even more severe when people from
currently less developed countries start using and adding to this information on a scale
comparable to developed countries.
In order to respond to the challenge of present and future information processing
needs we devised a system, which allows for organizing and finding relevant
information related to a particular environment quickly and efficiently. Moreover, it is
able to supply this information to people who need it, at places where they need it and
at the exact time they need it – to anyone anywhere and anytime. In this way, it eases
∗
Supervisor: doc. Ing. Mária Bieliková, PhD., Institute of Informatics and Software
Engineering, Faculty of Informatics and Information Technologies STU in Bratislava
off the threat of excess information, and thus goes a step beyond the current boundaries
of information processing capabilities.
2 System overview
The ultimate purpose of the SPOT-IT system is to provide an alternative way of
information acquisition for visually impaired people. To accomplish this goal the
system utilizes different components (see Fig. 1.).
RFID tags are used to tag various objects or information. During operation the
user carries a mobile device (e.g., a PDA or a Smartphone equipped with additional
add-ons) with the corresponding application software. The input is gathered by an
RFID reader, which searches for RFID tags near the user and forwards the acquired
data to the mobile device for further processing. Depending on the actual data, the
system retrieves additional information from RNS (RFID Name Service) and RTS
Spot-it – Going Beyond the Vision Loss Boundaries 197
(RFID Tag Service) servers over the Internet. When all data retrieval and processing is
complete, the results are presented to the user by means of a synthesized voice, which
is transmitted to headphones either via a wired or a wireless personal area network.
Each RFID tag contains data, which uniquely identify a message that is presented
to the user when a tag is detected nearby. If an RFID tag contains only a reference to
the data and not the actual data, then the SPOT-IT system uses a distributed group of
RNS and RTS servers to interpret the reference into meaningful information, which is
presented to the user. The conversion is a two-stage process, in which first the RTS
server, which contains the actual tag data is identified by means of the RNS web-
service. Thereafter the data is downloaded onto the mobile device for further
processing from the respective RTS server.
The SPOT-IT system software is based on client-server architecture. The client
side comprises the mobile device software developed using an object-oriented
approach, whereas the server side comprises the RNS and RTS web-services, which
use a service-oriented architecture (SOA) [1]. Both the RNS and the RTS web-services
feature two different interfaces. The default web-service interface allows for direct
access from other applications (e.g., the mobile device), whereas an additional web
interface facilitates access to data associated with RFID tags and allows for its simple
modification by RFID tag owners (e.g. changing the contents of a message). System
administrators can use the web interface to manage system settings (e.g., adding a new
RTS server).
The client software’s purpose is to find and identify RFID tags near the user,
retrieve the associated data and determine whether the message should be presented to
the user. Finally, the software should present the message and allow the user to affect
its playback by means of a simple user interface. This would include skipping, pausing
or replaying the message, replaying it at a slower pace or even replay it letter by letter.
To accommodate this functionality we opted for modular software architecture, with
modules reflecting the described functions of the system. This approach also allowed
for independent development of the individual modules and easier extensibility.
After evaluating the available possibilities, we decided to associate entities with RFID
tags, because they can store data unique to each such entity [4]. Thus the SPOT-IT
system introduces a new possible utilization of the RFID technology as compared to its
present commercial use where it is meant to replace barcodes for tracking goods,
animals or even people.
RFID tags can be very small, cheap and easy to use, with the only condition being
that the user must be in visible proximity of the RFID tag. The SPOT-IT system
employs high frequency passive tags, which do not require their own power source and
thus need no maintenance. These tags comply with the ISO 15693 standard and offer
enough flash memory for user data.
The memory itself is divided into 4-byte blocks with a total of 64 blocks. Every
time data are read from or written to memory, they have to be read or written in these
198 M.Adam, M.Barla, et al.
4-byte blocks. This fact has affected the data format in which the SPOT-IT system
stores data in RFID chips.
In addition to identifying an object with a unique code, we also decided to use the
chip’s memory to store data about what kind of object it is (in the category field) and in
some cases even to provide all necessary information without obtaining any further
data from a server in the Internet. The SPOT-IT system needs at least 16 bytes of the
chip’s memory, which result in exactly 4 blocks of memory (see Fig. 2).
• Version determines the version of the SPOT-IT tag data format for future
format extensions.
• OwnerID is a unique code for a person or an organization, which can
distribute SPOT-IT tags. This code is used in RNS server queries.
• ChipID is a code, which determines which message is associated with the tag.
This code is used in RTS server queries.
• Category is a code, which identifies what kind of message is associated with
the SPOT-IT tag.
• Checksum is computed from the contents of a SPOT-IT tag and has two
functions – error checking and distinguishing of SPOT-IT tags from tags of
other systems.
• Reserved – reserved for future use.
• Length is the length of additional data contained directly in the RFID tag,
which are associated with the chip; (from 0 to 64K).
• Data – if length is greater than zero, this contains the additional information.
The SPOT-IT system stores messages on RTS servers, which enables us to incorporate
additional features focusing on the message content. The usage of dynamic instead of
static content is one such feature. To achieve this we developed a novel way of
dynamic content representation – Contextual Information Description Language
(CIDL).
CIDL is a simple, yet powerful XML based general-purpose description language
for the representation of additional contextual information about real-world objects. It
makes possible for example that the actual message associated with a single entity can
Spot-it – Going Beyond the Vision Loss Boundaries 199
vary depending on the current time or date. The main idea is to encapsulate
information represented by other XML-based languages into a single message
associated with an entity. Each part is independent and is distinguished with a
namespace. This allows for the development of new devices which will be able to
process additional information (represented by different sections, which use a new
namespace) while not affecting existing devices.
Since one of our aims is to maximize the reusability and adaptability of the server side
of SPOT-IT system we decided to implement it using a service-oriented architecture
(SOA). To fulfill the key requirements of SOA we used a web service implementation
provided by the Microsoft .NET Framework. There are two types of services in the
system: RFID Name Service (RNS) and RFID Tag Service (RTS), which are accessed
by mobile devices through an Internet connection and by chip owners.
The RTS server is designed to provide CIDL encoded messages associated with
an RFID tag, which are described by an ownerID and a chipID. Since a list of usable
CIDL namespaces can be included in each request, the RTS server returns only the
appropriate sections, which use these namespaces. The requirement to use namespaces
in queries together with the nature of the stored data suggest that a native XML DBMS
would offer a more flexible query engine compared to a relational DBMS.
In order to allow anyone to run an RTS server we designed the RFID Name
Service – RNS. This service allows clients to determine which RTS server stores
messages associated with RFID tags. It is a simple service, which requires the ownerID
from the RFID tag and returns the URL address of the desired RTS server, where the
information associated with the RFID tag is stored. The RNS server also has a web
interface used for management.
Both services require a database for data storage. While RNS uses a standard
relational database, we opted for a native XML database for RTS, which is fully
extensible and allows us to make use of all advantages of CIDL.
To maximize the processing speed RNS uses procedures stored on the database
server to query the database. This solution saves bandwidth and brings better
performance, because stored procedures are compiled and stored in executable form on
the database server itself.
3 Conclusions
The proposed system brings several major benefits to society. For one it offers a novel
way of organizing, sorting and acquiring information, which can also be based on user
location. Our implementation in the form of the SPOT-IT system is targeted primarily at
blind or severely visually impaired people whom it offers a unique way to acquire
contextual information about their surroundings. The resulting benefits it provides to
these people in terms of increased independence, self-sufficiency and quality of life are
immense.
200 M.Adam, M.Barla, et al.
Furthermore, the SPOT-IT system itself is only one example of the system’s
overall capabilities. The concepts and ideas described in this paper can be applied to a
whole family of systems designed for a particular application domain targeted at
sighted people thus providing new possibilities of information acquisition and
processing.
To fulfill its design objectives the SPOT-IT system makes use of several vital
innovations:
• Using RFID tags to tag entities (be it objects or information) with the purpose
of providing people with contextual information. Amongst others, this
provides the blind with an alternative way to detect (i.e., “to see”) the entities.
• A way of communication with the visually impaired by means of a fully
featured text-to-speech engine, while using only the limited computing
resources of a mobile device.
• A novel approach to wireless data transfer in a PAN via data transmission
through the human body.
• Open architecture based on the Microsoft .NET platform, which allows for
easy extensibility of the system.
• Using SOA to develop a set of Web-services, which provide the required
functionality to a broad audience of users. SOA keeps the interface and
functionality separated thus allowing anyone to implement his own interface.
• The use of an XML database to store data associated with RFID tags.
From an implementation standpoint, we have successfully designed, developed
and tested the main components of the system. Their implementation proves the
viability of the proposed concept, which is based on the novel usage of RFID tags
aimed at supplying relevant contextual information anywhere and anytime.
Consequently, the project is in the state of system integration and testing.
References
1. Barry, D.K.: Web Services and Service-Oriented Architecture. Morgan Kaufmann
Publishers, San Francisco 2003.
2. Kačmář, D.: Programming .NET applications. Computer Press, Prague 2001. (in
Czech)
3. Prosise, J.: Programming Microsoft ® .NET. Microsoft Press, Redmond 2002.
ISBN 0-7356-1376-1.
4. Stanford, V.: Pervasive Computing Goes the Last Hundred Feet with RFID
Systems. In IEEE Pervasive Computing [online]. Vol. 2, No. 2 (2003) 9-14.
http://csdl.computer.org/comp/mags/pc/2003/02/b2toc.htm (2005-04-07)
Diablo 2 Tools
Pavol HLUCHÝ∗
Slovenská technická univerzita
Fakulta informatiky a informačných technológií
Ilkovičova 3, 842 16 Bratislava, Slovenská republika
hluchy@fa.stuba.sk
1 Úvod
Diablo 2 [3] je počítačová hra od firmy Blizzard [1]. Bola vydaná 24. júna 2000 ako
nasledovník hry Diablo a 26. júna 2001 bol k nej vydaný datadisk Lord of Destruction.
Napriek tomu že je relatívne staršia, je stále veľmi obľúbená a intenzívne hraná.
Veľkým problémom pri hraní tejto hry býva skutočnosť že hráč počas hrania
získa množstvo herných objektov – predmetov ktoré aktuálne pri danej postave
nepotrebuje ale využije ich neskôr alebo pri inej postave, pričom prenos týchto
predmetov medzi postavami je pomerne problematický. Ako riešenie slúži modul
na načítavanie predmetov v D2I (Diablo2Item) formáte (natívny formát hry, ktorý
používajú na export predmetov aj rôzne editory postáv), ich spracovanie, zatriedenie
v databáze a uchovanie. Následne je možné v takto vytvorenej databáze vyhľadávať
podľa kritérií a uložené predmety potom použiť pri tvorbe inej postavy.
Ďalšia požiadavka je získanie obrázkov z hry pre účely ďalšieho spracovania.
Keďže však hra používa vlastný formát, treba na to vytvoriť nástroj na konverziu
do štandardných formátov.
∗
Vedúci práce: Ing. Branislav Steinmüller, Ústav aplikovanej informatiky, Fakulta informatiky
a informačných technológií STU v Bratislave
2 D2I databáza
D2I databáza slúži na vytváranie prehľadných záznamov o predmetoch,
ich kategorizáciu a jednoduché získavanie pre účely neskoršieho použitia. Preto prístup
do takejto databázy je vhodné obmedziť na registráciu, pri ktorej používateľ musí
odsúhlasiť určité pravidlá jej používania, ako napr. zákaz vkladania predmetov ktoré
boli upravované. K tomu je vhodné použiť už nejaký existujúci systém, v rámci
ktorého by mali byť implementované aj niektoré ďalšie veci, ako napr. uľahčenie
tvorby stránok v ucelenom dizajne a pod. Ako dobrá voľba sa ponúka PHP-Nuke
systém [6], ktorý poskytuje všetko potrebné a navyše umožnňuje použiť rôzne
databázové systémy. Preto aj modul D2Idb bol vytvorený pre tento systém. Takže bolo
potrebné len navrhnúť a vytvoriť databázu vyhovujúcu zadanému účelu a nad tou
vybudovať celú administratívu.
Súbor D2I sa člení na niekoľko častí. Prvá časť obsahuje len najzákladnejšie
informácie o predmete. Predmety ktoré majú len túto časť sa nazývajú Basic items.
Sú to napr. kľúče, zvitky, lekváre a pod. Tieto informácie sú uložené v samostatnej
tabuľke. K tomu ešte tabuľka Basic vlastností predmetu obsahuje už niektoré
predpripravené hodnoty ako je napr. zobrazované meno predmetu, minimálne
požiadavky na postavu ktorá môže predmet používať alebo aj odkaz na tabuľku
s informáciami o používateľovi ktorý tento predmet do databázy vložil.
Po Basic časti nasleduje čast popisujúca umiestnenie predmetu na postave.
S ohľadom na fakt, že predmety sa ukladajú do databázy bez akejkoľvek nadväznosti
na postavy, je táto časť ignorovaná.
Ďalej nasleduje časť, ktorá definuje presnejšie typ predmetu a jeho kvalitu, t.j. či
ide o unikátny predmet, magický a pod. a tzv. „level“ predmetu. Následne ešte
obsahuje niektoré doplňujúce informácie špecifické pre určité typy predmetov, napr.
niektoré magické vlastnosti vzácnych predmetov definované pomocou magických
prefixov a sufixov. Táto časť sa tiež ukladá do samostatnej tabuľky.
Po tejto časti nasledujú už údaje špecifické pre každý typ predmetu. Pre zbrane
je to napr. rozsah poškodenia ktoré spôsobujú, pre brnenia zase ich celková výdrž
a aktuálna, t.j. nakoľko sú už poškodené. Následne potom popis všetkých magických
vlastností predmetu. Tejto časti je tiež určená jedna samostatná tabuľka.
Aby sa do týchto troch tabuliek vkladalo čo najmenej informácií, pričom
množstvo z nich sa často opakuje, sú vytvorené rôzne indexové tabuľky. V nich
sú zoznamy hodnôt ktoré prislúchajú jednotlivým indexom používaným v D2I
súboroch. Vďaka tomu je potom aj oveľa jednoduchšie a hlavne rýchlejšie
vyhľadávanie podľa kritérií. Sú to napríklad zoznamy magických prefixov a sufixov
s ich magickými účinkami, zoznamy zbraní aj s ich špecifickými parametrami,
zoznamy drahokamov a ďalšie.
Diablo 2 Tools 203
3 Konverzia grafiky
Súbor palety má vždy veľkosť 768 bajtov. Je to dané tým, že každá farba má 3 zložky
pričom každá zložka je zapísaná 1 bajtom. Takže je k dispozícii 256 farieb v 24 bitovej
farebnej hĺbke. Samotné farby sú potom uložené postupne podľa indexov pričom každá
farba má zložky uložené v poradí modrá, zelená, červená.
Diablo 2 Tools 205
DC6 a DAT súbory sa spracúvajú spoločne. Najprv sa vždy načíta súbor palety
a následne sa načíta DC6 súbor. Pri jeho načítavaní a konverzii sa používa
GD knižnica [2], ktorá poskytuje podporu pre formáty GIF, PNG a JPG. Postupne
ako sa načítava blok s jedným obrázkom, je vykresľovaný do štruktúry obrázka
v GD knižnici. Takto načítaný obrázok je potom možné uložiť do niektorého
z formátov podporovaných GD knižnicou. Jeho rozmery sú vždy rovnaké ako bolo
určené v hlavičke príslušného bloku. Ak je potrebné získať obrázky pre vygenerovanie
animácie, treba prepočítať rozmer výslednej animácie pomocou veľkosti a posunutia
každého obrázku ako je definované v ich príslušných blokových hlavičkách. Tak isto
potom je potrebné spočítať výslednú veľkosť obrázkov v prípade spájania obrázkov
postavy a „aury“ do výsledných obrázkov.
Samotné spájanie obrázku tela a „aury“ sa potom vykoná tak, že obrázok tela
sa skopíruje do výsledného prázdneho obrázku na správnu pozíciu a následne sa bod
po bode sčítaním farby bodu tela a „aury“ spočítajú nové body vo výslednom obrázku.
Výsledné obrázky sa potom získavajú v podobe ukazovateľa na štruktúru GD
knižnice reprezentujúcej požadovaný obrázok. Tým je zabezpečené že v programe,
ktorý použije knižnicu je možné určiť výsledný formát obrázku.
4 Implementácia
Moduly boli naprogramované v OS Linux. Nemal by však byť problém sprevádzkovať
ich aj na Windows kedže sa nepoužívajú žiadne špecifické vlastnosti alebo funkcie.
Funkčný D2I databázový modul je sprevádzkovaný na slovenskej internetovej
stránke s názvom „Lolec“ [5] ktorá má za cieľ vytvoriť čo najväčšiu databázu
predmetov používaných v hre. Modul je naprogramovaný v PHP rovnako ako celý
PHP-Nuke systém pre ktorý je určený. Aktuálne prebieha jeho testovanie a odladenie
pred umožnením jeho používania väčšiemu počtu ľudí.
DC6 knižnica je programovaná vo vývojovom prostredí Eclipse [4], ktoré je
dostupné pre OS Linux aj Windows. Táto knižnica má rozhranie v jazyku C čo
umožňuje vytvoriť jej nadstavby a rozhrania pre iné programovacie jazyky ako je napr.
C++, Perl a iné. Je použitá na tvorbu php_ext modulu, ktorý sa dá použiť v rámci
internet stránok tvorených pomocou PHP. Tento modul má objektové rozhranie pričom
knižnica samotná má rozhranie len v jazyku C.
5 Záver
Cieľom tejto práce bolo vytvoriť základné nástroje pre uľahčenie tvorby internetových
stránok zaoberajúcich sa problematikou hry Diablo2. Uvedené moduly by mali
umožniť zvládnutie aspoň najzákladnejších operácií pri ich tvorbe. Kedže však tvoria
len časť potrebných nástrojov, je naplánované pridanie podpory pre ďalšie formáty
súborov ktoré sa v hre používajú, napr. D2S, DT1, DS1 a iné. Rovnako sa pripravuje
aj umožnenie konverzie obrázkov do DC6 formátu pre potreby vytvárania rôznych
206 Pavol Hluchý
modifikácií hry. Pre uľahčenie používania bude následne vytvorené vhodné grafické
rozhranie ktoré umožní prezrieť si obrázky pred ich skonvertovaním a uložením na
disk. Tým sa zaistí, že sa nebudú zbytočne generovať súbory, ktoré nie sú potrebné.
Použitá literatúra
1. Blizzard Entertainment. http://www.blizzard.com
2. Boutell.Com, Inc.: gd 2.0.33. A graphics library for fast image creation.
http://www.boutell.com/gd/manual2.0.33.html
3. Diablo 2. http://www.blizzard.com/diablo2
4. Eclipse.org. http://www.eclipse.org
5. Lolec – Lopo’s online LoD equipment library. http://lolec.losys.sk
6. PHP-Nuke open source professional portal system. http://www.phpnuke.org
7. Siramy, P.: COF, D2, DC6, DS1, DT1, TBL File format. phrozenKEEP Forums,
http://phrozenkeep.it-point.com/forum/viewtopic.php?t=724.
8. Trevin Beattie: Diablo II Item Format for Diablo II v1.09 and the Diablo II
Expansion Set: Lord of Destruction. 2003.
http://www.xmission.com/~trevin/DiabloIIv1.09_Item_Format.shtml
Annotation
Diablo 2 Tools
The aim of this work is to create software tools to simplify creation of internet pages devoted
to this game. One module implements database for storing game items in D2I format. Items can
be browsed and searched by various criteria. Module is implemented as PHP-Nuke module.
Other module is a shared library for linux OS. The library allows conversion of graphics from
DC6 format, used in the game, to GIF, PNG or JPG format inteded for web page design.
SecuFORM – webform PHP Framework
Ján ŠARMÍR∗
Slovak University of Technology
Faculty of Informatics and Information Technologies
Ilkovičova 3, 842 16 Bratislava, Slovakia
jan.sarmir@sorudan.sk
1 Úvod
Spracovanie užívateľských vstupov v oblasti webových aplikácií patrí medzi kľúčové
momenty návrhu a implementácie. Užívateľovi treba ponúknuť rovnakú intuitívnosť
ovládania, interaktivitu a komfort, aké by mu ponúkla aplikácia bežiaca priamo na jeho
počítači. Navyše si treba uvedomiť, že výsledný kód stránky je dostupný priamo
v čitateľnom texte a preto treba dbať na zvýšenú bezpečnosť spracovávania vstupných
dát.
V súčasnosti existuje niekoľko frameworkov, ktoré sú určené, alebo môžu byť
použité na spracovávanie vstupných dát webovými aplikáciami. Väčšina z nich je
určená pre platformu Java (Struts) a nešpecializuje sa len na vytváranie webových
formulárov, ale má širšie a komplexnejšie využitie. Jedným z úzko špecializovaných
frameworkov pre spracovanie webových formulárov je framework Blueshoes, ktorý je
určený pre skriptovací jazyk PHP. Hlavnou výhodou tohoto nástroja je dlhodobý vývoj
a stabilita, na druhej strane sa potýka s nedostatkom flexibility a ťažkopádnosťou
nasadenia. Existuje ešte niekoľko podobných riešení, no s ohľadom na rozšírenosť
jazyka PHP v malých a stredne veľkých webových aplikáciách a stále narastajúci počet
nasadení je toto množstvo a hlavne kvalita nedostatočná. Tento problém sa snaží
vyriešiť framework SecuFORM.
∗
Supervisor: Ing. Ivan Kapustík, Institute of Informatics and Software Engineering, Faculty of
Informatics and Information Technologies STU in Bratislava
2 Charakteristika systému
Framework SecuFORM sa stal odpoveďou na potrebu vytvorenia nástroja, ktorý by
bolo možné použiť na spracovanie rozsiahlych formulárových systémov s vysokým
stupňom bezpečnosti a integrity v prostredí skriptovacieho jazyka PHP. Potreba
vznikla v procese návrhu a implementácie aplikácií v tíme, ktorého som súčasťou
a ktorý ma poveril vývojom tohoto frameworku.
Hlavnou myšlienkou systému SecuFORM je jednoduché použitie z hľadiska
nasadenia v aplikáciách pri zachovaní maximálnej miery flexibility a znovu
použiteľnosti.
12: …
13: #}
14: <input type=”submit” value=”Submit the form”>
15: </form>
kontrolu nad systémom, kedykoľvek si môže zistiť stav, v ktorom sa systém nachádza
a urobiť potrebné kroky.
Vytvorenie objektu SecuFORM( pripojenie šablóny,predanie handle na
databázu, názvu tabuľky a identifikátora riadka. Načítanie vstupných
premenných (POST) 1
Je Vygeneruj vnútorné
nastavený nie Je v DB nie štruktúry a prázdy
správny digitálny záznam pre formulár
podpis? daný ID?
3
2
áno áno
2.6 Bezpečnosť
3 Záver
Framework SecuFORM prináša kompletné riešenie v oblasti spracovania webových
formulárov v prostredí skriptovacieho jazyka PHP. V súčasnej dobe je nasadený
v niekoľkých intranetových aplikáciách a v rozsiahlej internetovej aplikácii (počet
212 Ján Šarmír
4 Použitá literatúra
1. Atkinson, L.: Core PHP Programming. 3rd Edition, Prentice Hall PTR, 2003.
2. Converse, T., Park J., Morgan C.: PHP5 and MySQL Bible. Wiley Publishing, Inc.,
2004.
3. Hernandez, J.M.: DB Design for Mere Mortals - A Hands On Guide. Addison
Wesley, 2003.
4. Horn, J.V.: MySQL Essential Skills. McGraw-Hill/Osborne, 2004.
Annotation
1 Introduction
Preserving the cultural heritage of landscapes and regions is interdisciplinary and
complex mission, driven by professionals specialized in several ways. The Smart
History project [1] was developed in the field of four disciplines: environmental
design, agriculture and forestry, tourism and economy, communication and education.
Our contribution concerns the area of communication and education, preferably the
question: „How can communication technology contribute to preservation of cultural
heritage and responsible tourism development in the Cinque Terre [2] area“.
Our work can be divided to two parts. Firstly there is effort to provide general
guideline to design of information system independent on specific conditions related to
park. This recommendations model should be applicable to any national park, which
cultural heritage has to be protected. Second part of contribution is related to specific
∗
Supervisor: Ing. Ivan Kapustík, Institute of Informatics and Software Engineering, Faculty of
Informatics and Information Technologies STU in Bratislava
Change in park
Initial park requirements and
requirements Research, discover priorities
strategy
New
possibilities of
Educate involved education
people
Make a summary
of results achieved
Initial step deals with collecting requirements and defining their priority related to
importance for park. Using these requirements it is possible to build general strategy
for park - to specify important, concrete directions and visions for park achievable by
an information system. So the process contains gathering the applicable information
from many resources. We can mention investigation of the tourist’s profile, involving
local community in the process of collecting information specifically about their
cultural heritage, or organizing workshops to address and evaluate problems reviewed
from third parties. Essential information can be also gathered by partnerships with
various universities or scientific centers specialized to certain discipline related to
park’s heritage (e.g. forestry, agriculture) or to essential activities (economy,
marketing).
216 M.Gregor, O.Mikita
Second step is to identify essential information and extract them from gathered
resources. This can be achieved by many approaches, e.g. using data mining techniques
can be advantage. With respect to strategy of park, defined in previous step,
researchers should concentrate on specific areas of information. For example if one of
important aims is to build better prosperous park using a communication technologies,
then there is a demand to reveal new economically progressive services for visitors. It
is hardly realized without analysis of tourist’s profiles and needs. The meaningful
information that is found can be categorized in many ways, and also exchanged with
partners (parks, universities, specialists, international organizations, etc.).
There are many reasons for importance of educating involved people. It is essential to
inform local people influenced by this process about the decisions being taken,
especially inhabitants and park personnel, but it is not stand-alone satisfactory activity.
Correct attitude combines education and getting feedback from involved people, their
opinions and suggestions to the process of park development. Main purpose of this
phase is to help inhabitants, park’s employees and visitors to build their attitude in
harmony with the park's strategy for development. This can be realized by creating
belief of inhabitants to share their cultural heritage, extending their knowledge about
their past and the vision of their future. In order to improve quality of services,
extensive education of park personnel is important, e.g. by increasing their language
skills. Finally it is necessary to provide visitors with sources of educational material in
specific form in order to establish the responsible attitude to park.
process and comparison with expected results. Process should be adapted according to
results of the evaluation. After first process iteration, information system development
may start continuously with coordination following iterations.
virtual guides. Nowadays camera system monitors coastline places, which can be seen
using local cable TV. Inform visitors utilizing often updated website is easy way how
to spread interest of new potential visitors. E-learning courses comprise volumes on
environmentally related subjects, including agriculture, architecture, history,
technology, health, tourism, economics, and alternative energy, intended to raise level
of responsible tourism, used by tourists, professionals or locals who want to refresh
their knowledge in a particular field. The Cinque Terre Card gives the possibility to
subscribe all of the principal services, for certain period of time and number of persons.
This is the way how it is possible to count number of visitors. Park is trying to use new
technologies to support education of tourists. One of progressive ways is to utilize
Pocket PC - showing actual position of tourist on display also with some additional
information about the surrounding objects (points of interest). Multimedia points
should show interactive information about landscape and alternative tourist paths near
their positions. Last subpart is proposal of Management Support System as a computer
aided integration for better communication and cooperation between nature
management, agriculture and tourist organization. Data of this system should be
connected in GIS environment.
4 Conclusions
Participating on Smart History project provides experience of real-world project with
all of its difficulties. Project analysis shows fundamental problem in implementing
information system (preferably Pocket PC part) without solid base of requirements.
Due to these circumstances our contribution was concentrated on problem of designing
the information system with help of requirements gathering, specifying strategy and
finding relevant information.
Acknowledgement: This work was supported by the Smart History project members
from University of Firenze (Italy), Hogeschool Antwerpen (Belgium), Poland Open
University Cracow (Poland) and we would like to thank them this way. Also we would
like to thank the EU committee and coordinators, this project would never succeed
without their effort.
References
1. Smart History Project, http://www.smarthistory.it
2. Cinque Terre National Park Official Website, http://www.parconazionale5terre.it
3. Bieliková, M.: Softvérové inžinierstvo: Princípy a manažment. STU Bratislava,
2000. ISBN 80-227-1322-8.
Spatial Planning Support
Marek GREGOR, Ondrej MIKITA∗
Slovak University of Technology
Faculty of Informatics and Information Technologies
Ilkovičova 3, 842 16 Bratislava, Slovakia
marek.gregor@gmail.com
1 Introduction
Spatial planning is one of the most important processes nowadays. It is connected with
almost all kinds of human activities starting with urbanization and ending with
economy. It takes a lot of information to come up with a good spatial plan. This
information includes geographical as well as non-geographical data. What are non-
geographical data in this process? For example we are dealing with the laws,
economical data, demographical data etc.
These information were collected for many years and the problem therefore is to
find the relevant data in this amount of information. In global European point of view
this becomes even more important, because every country may have a lot of
information. The information is stored and maintained in Geographical Information
Systems (GIS). Unfortunately these information are stored in different databases, in
different formats and with different onthologies. Today, when Europe is trying to unite
it is no surprise that the cooperation is needed in the area of spatial planning. One of
∗
Supervisor: Ing. Ivan Kapustík, Institute of Informatics and Software Engineering, Faculty of
Informatics and Information Technologies STU in Bratislava
the projects that deals with this cooperation is called Central European GIS [4] and
together with Faculty of Architecture of Slovak University of Technology we were
taking part in it.
In our work we tried to identify possible ways of the spatial planning support and
to analyze their possible solutions. Afterwards we picked one of them, analyzed it
thoroughly and now we have started to design a solution for it. We identified and
analyzed following problem areas.
First problem we identified was the problem of unifying the heterogeneous
environments of different geographical information data stores within the CEGIS
project. This project’s main goals are aimed on solving the ontological heterogeneity of
national GIS systems and on providing centralized information service for spatial
planning purposes available on the Internet.
Second problem we identified is the problem of interactive map creating. The idea
is to offer a tool for users which they would use for generating layered maps on
demand. It means that a user requests a map with certain geographical features like
roads, railways, rivers, demography, temperatures etc. within certain geographical area
and server will create this map for him from the information data store it owns or has
access to. This map is extended with non-geographical data about these geographical
features which helps user of such map to interpret data provided by it. In our opinion
this technology offers a very good support for spatial planning and that is why we
decided to work on this idea.
After analyzing status quo in this area we found out that there has been a lot of
work put into it by OpenGIS consortium. They developed a series of de-facto standards
based on XML that are used widely in area of GIS. First of them is called Geography
Markup Language (GML) and it is used for creating application schemes describing
geographical features. Then there are Web Feature Service (WFS [2]), Web Mapping
Service (WMS [1]) and Styled Layer Description (SLD [3]) standards. These standards
describe services used to generate and distribute maps. You can imagine a system
based on these standards like a standard 3 tier system where data layer is provided by
WFS server, application layer by WMS server and presentation layer by clients. There
are several implementations of these services and we chose to use one of them and
improve it’s functionality in order to provide an integrated solution for spatial planning
support purposes. The implementation we chose is an open source project called
GeoServer. It implements WFS and WMS with SLD and in next chapters we will
describe our new features.
Nowadays many desktop applications implement the client side of WMS, but
there is lack of WMS clients on mobile devices like PDA or smart phones. Our
contribution is aimed on creating a WMS client on PDA device. Due to limited
memory and computational power we decided to implement client part which obtains a
map generated at the server side. Client will be implemented in Java Personal Profile,
connection to server is wireless via HTTP protocol. Supported maps formats are raster
formats png, jpeg and vector format svg. Conceptual diagram of complete system is
shown on Fig. 1.
seems to be to use the GIS enabled relational database. Nowadays almost all major
SQL Server providers offer a GIS enabled solution. What does GIS enabled mean?
This kind of database supports special kind of tables and functions that provide special
data types for storing geographical features. Every geographical feature type (road,
bridge, building etc.) is represented by a table in a database and every feature of given
type is represented by a row in a table.
Geographical feature is described by its geographical location and on the map
even by its shape. For example road is described by some kind of polyline, lake is a
polygon etc. Location can be represented in many different coordinate systems.
Therefore the GIS enabled database has special data types to store information about
shapes and coordinates. In addition it provides function, that enable user to write SQL
statements that directly search for largest city, longest road, etc. This functionality
gives such a database a big advantage over simple database. The GeoServers WFS can
take advantage of this performance, but in order to be able to do so, it needs a data
source that supports these features. As we mentioned before there are some GIS
enabled databases available. One of them is also an open source project and it is based
on Postrgre SQL. It is called PostGIS and it is implicitly supported by GeoServer.
Once we identified the proper data source for WFS server, we need to feed all the
collected data into it. This seems to be a major problem, because the data collecting
could take a lot of years and the formats in which they are stored can be different.
Again, we think it is necessary to unify the data formats, because it is much easier and
cheaper to maintain only one data source. In further work we would like to concentrate
on this problem.
Objective is to build an application that would act like a data converter from
different formats to a database. In addition it must provide an interface that would
support plug-ins for new data types to be converted so it is easy to extend its
capabilities. On the other end of this data converter there should be an interface that
would connect to any data source that user specifies in order to be compatible with
most of the database servers or other data stores. Fig. 2 shows this architecture.
The WFS server maintains even a database of styles for every feature type. Style
describes the visual outlook of the feature. For example road can be represented as a
black line with the width of 4 pixels. That means that the data converter should provide
also a user friendly interface for registering a new style for new feature type. After user
selects the outlook of a feature type, the application creates an XML file that is
compatible with mentioned format SLD and registers it in WFS server.
4 Conclusions
This paper is a brief look into our solutions to spatial planning support. We are
currently working on a GIS system that could be a prototype solution for information
sharing and distributing on PDA mobile devices. The advantage of this solution is that
it is based on well specified open formats and on open source projects. This enables us
to deliver a first prototype that covers the whole area of map generating in relatively
short time. It is also a solution that is widely supported by the geographical community
and therefore it is highly probable that work on this system will continue in the future
and that it will deliver solution that will fulfill the needs of spatial planning in central
European territory.
References
1. Open Geospatial Consortium: Web Map Service Specification
http://portal.opengis.org/files/?artifact_id=5316 (5.4.2005)
2. Open Geospatial Consortium: Web Feature Service Specification
http://portal.opengeospatial.org/files/?artifact_id=7176 (5.4.2005)
3. Open Geospatial Consortium: Styled Layer Description
http://www.opengeospatial.org/docs/02-070.pdf (5.4.2005)
4. Central European Geographical Information System MetaDataBase project
http://gis.cvut.cz/index.php?id=101&lang=cz (5.4.2005)
Modules of Content Management Systems
and their Reusability
Michal JAKUBÍK∗
Slovak University of Technology
Faculty of Informatics and Information Technologies
Ilkovičova 3, 842 16 Bratislava, Slovak republic
michal.jakubik@ae-design.sk
1 At the beginning
In the context of reusability we should distinguish reusability in websystems and
websites. When you are creating website, first thing you have to create for your
customer is a graphic layout. In this phase your client says “OK, start working”. Now
begins phase of your developers.
There are two possible views of reusable templates. Graphic template and its
reusability is a little bit hard to reuse, because every costumer wants to have original
layout and original styling of his website or intranet websystem.
∗
Supervisor: RNDr. Valéria Šimáková, Institute of Informatics and Software Engineering,
Faculty of Informatics and Information Technologies STU in Bratislava
2 Templates
2.1 Programming template
Programming template is something different. Here are modules that are always used
and you can use this template every time and on every project.
For example let’s talk about menu. In every application there have to be menu.
Without menu is the application and especially websystem unusable. Concerning to the
website, simply said, the menu is listing of all available and accessible sites and
subsites of your web.
When you have more languages in your web, alternation of sites-listing in levels
is required. When you created a complex template for creating the sitemenu you won.
Because if in your complex template you separated generating front-end part (HTML
code) and logical part - database queries and their processing, reusability of this
module is finished. When you want to reuse this module you just copy logical part and
front-end part will be changed and styled another way.
The next example that is in CMS systems used very often. This module is news
content part. The logical functionality is here nearly every time the same. Here is valid
the first rule of reusability of modules – separate front-end part from logical part. In
modules like news or events there are sometimes needs to change logical or database
part, because every costumer wants to store another data or a little bit other
functionality. But mostly changes are not bigger than add one column into database
and generate this column on front-end.
226 Michal Jakubík
On every CMS site there you can always find module called sitemap. This
module generates list of structured names of sites and subsites.
In default language there are names in default language – in this case there is
German. But most of sites there are more than one – default languages. On this site
there are two languages. The second one is English.
This case is very similar to the module menu. The same is logical functionality,
different is only HTML code. What will happen when we use the same module to
generate menu and sitemap? The answer, in this case, is nothing. When our menu
Modules of Content Management Systems and their Reusability 227
module is done really completely, you have to create only a HTML class that calls
logical part (classes) of module implementation. So the reusability of module is here
completed twice. Because there are two functionalities in one project for nearly zero
costs (the costs of reuse development).
And what about development of graphical template of a website? The whole website in
most cases we can shift into 4 parts. The top, menu (mostly on left site), the content
part and footer. In the top there is a transcription image. When in the top part there is
defined functionality then it is mostly only an image changer. The menu part is
described by its name – menu part. In the content we can find all information of the
website and the footer is some kind of menu which is not included in menu part. This is
word described graphic template of most websites. This is easy to implement in HTML
with place holders of functionality.
3 Conclusions
Finaly the result is that the well made template is useable every time. Possibly one
template is useable in one project twice or more times. Functionality of one module
can be used more than once. The best case is when the template is made complex and
universal and the possibility of resell to another costumer is high. Difference between
programming template and graphical template is only in multitude of usability. You
cannot use one graphical template in one project more than once.
So why don’t we reuse components by websystems too? It spares time and
money.
References
1. Cohen, M.: Typo3 Template Basics. 2003.
2. Skårhøj, K.: Modern Template Building (Part 1). 2003.
http://typo3.jweiland.net/uploads/media/Modern_Template_Building__Part_1.pdf
3. Skårhøj, K.: Modern Template Building (Parts 2 and 3). 2003.
http://typo3.jweiland.net/uploads/media/Modern_Template_Building__Part_2-
3.pdf
4. Skårhøj, K.: TypoScript reference. 2002.
http://www.mgwebservice.de/uploads/media/TSref.pdf
Recommender System for Adaptive
Hypermedia Applications
Andrej KRIŠTOFIČ∗
Slovak University of Technology
Faculty of Informatics and Information Technologies
Ilkovičova 3, 842 16 Bratislava, Slovakia
kristofic@zoznam.sk
1 Introduction
Adaptive hypermedia systems have become popular in last few years in many applica-
tion areas such as educational hypermedia, on-line information systems or information
retrieval hypermedia [1]. Adaptive hypermedia application in the field of educational
systems is natural, as each student generally has different characteristics related to
learning, so an adaptation to the student’s characteristics can help the student to master
topics more effectively.
However, it is quite difficult for an author of the course to develop appropriate
adaptation model. This requires respectable knowledge of students’ behavior to create
such adaptation rules, which will result into an effective adaptation of presented
knowledge together with appropriate navigation in the course information space. We
propose to use knowledge extracted from educational adaptive hypermedia system by
means of knowledge discovery for the adaptation model improvement.
∗
Supervisor: doc. Ing. Mária Bieliková, PhD., Institute of Informatics and Software
Engineering, Faculty of Informatics and Information Technologies STU in Bratislava
Recommender
System Data Mining
Knowledge Knowledge
Database
Base Presentation
Author
Wrapper
Authoring
Adaptive Hypermedia System
Tool
data flow
User Author
Recommender
AH System
User System Author
action
(e.g. display concept)
A log
action
preprocess data
B
find and store
patterns
display knowledge
display stored
patterns
D
modify course content
stores all their actions (e.g., logins, logouts, concept visits) (see part A in figure). When
scheduled, the recommender system retrieves usage data, preprocesses it and stores it
into database. Data mining algorithms are executed on stored usage data and usage pat-
terns are discovered and stored in the knowledge base (see part B in figure).
With knowledge base filled up, the recommender system can recommend a se-
quence of relevant concepts for particular user, when asked to do so. An adaptive hy-
permedia system provides the recommender system with the user identification and his
current session and the recommender system returns recommended sequence of con-
cepts, which the user should visit next. The adaptive hypermedia system may annotate
concepts in the sequence according to suitability evaluation provided by the recom-
mender system (see part C in figure).
When author of the content decides to improve it, visualization of discovered
knowledge can help to decide which modifications should be made. The author can
also compare historical records and evaluate the effect of his previous changes to the
adaptive hypermedia system content (see part D in figure).
4 Experiments
To verify our approach to knowledge discovery in adaptive web-based hypermedia we
developed a prototype of the recommender system. We implemented three data mining
algorithms for pattern discovery (traversal patterns, sequential patterns and association
rules) suitable for educational hypermedia applications.
Results of the knowledge discovery are markedly dependent on source data. We
chose the ALEA educational adaptive hypermedia system [2] for our experiments since
we have had available usage logs gathered during 3 years of its usage in the Functional
and logic programming course. At time of experiments the database contained 1 170
sessions.
Experimenting with the ALEA data, we found out that even though algorithms
find some patterns in the data, these patterns have quite low support (around 15%). To
outline this fact, we analyzed and visualized visits of individual concepts as well as the
navigation between them. We discovered that all visits are almost equally distributed
between all concepts. There were only slight trails of increased navigation between
certain concepts. This issue may be caused by the restricted way the ALEA system was
used. The primary goal of students was not to master whole domain but to prepare
themselves for a programming test. The second reason may be the existence of a guid-
ance that the ALEA system already offers. We suppose that direct guidance imple-
mented in the ALEA system (by means of the “Next” button) influenced such students’
behavior and was proved in this way as appropriate.
5 Conclusions
The adaptation in most of current educational adaptive hypermedia systems is driven
by a fixed set of rules. The construction of such rules is a complex task and the author
may not be able to completely assess all intricacies found in different learning styles of
234 Andrej Krištofič
students. Techniques for data mining can provide knowledge needed either to recom-
mend students concepts according to their characteristics or to assist the author of the
course to improve the structure of the domain.
Main contribution of this paper is proposal of the recommender system, which is
based on an idea of adaptation model development using data mining techniques. It
connects the process of knowledge discovery with on-line recommendation of concepts
based on discovered knowledge. The architecture of system allows using different un-
derlying adaptive hypermedia systems, enabling us to share common knowledge (not
specific to certain adaptive hypermedia system and its content). The architecture also
incorporates the module for visualization of discovered knowledge helping the author
of the course to prepare modification to the content.
In our approach, association rules, sequential patterns and traversal patterns repre-
sent automatically generated knowledge about students’ behavior. Based on a student’s
current learning session and discovered patterns, the recommender system is able to
recommend a sequence of concepts, which the student should study next.
Future development of the recommender system will focus on enhancing the set
of data mining algorithms, e.g., to use clustering techniques in order to discover user
clusters according their learning style. We plan to evaluate quality of recommendations
carried out by our recommender system using data produced by other educational hy-
permedia systems. The evaluation will be based on a feedback from students as well as
on results of the recommendation performed on a testing set of data.
References
1. Brusilovsky, P.: Adaptive hypermedia. User Modeling and User-Adapted Interac-
tion Ten Year Anniversary Issue, 11, 1/2 (2001), 87-110.
2. Kostelník, R. - Bieliková, M.: Web-based environment using adapted sequences of
programming exercises. In: Proc. of Int. Conf. on Information Systems Implemen-
tation and Modelling, M. Beneš, Ed. (2003), 33-40.
3. Krištofič, A. - Bieliková, M.: Improving adaptation in web–based educational hy-
permedia by means of knowledge discovery. Submitted to: HT 2005 – Sixteenth
ACM Conference on Hypertext and Hypermedia.
4. Mobasher, B. - Cooley, R. - Srivastava, J.: Automatic personalization based on
web usage mining. Communications of the ACM 43, 8 (2000), 142-151.
5. Mobasher, B. - Dai, H. - Luo, T. - Nakagawa, M.: Using sequential and non-
sequential patterns in predictive web usage mining tasks. In: Proc. of the IEEE Int.
Conf. on Data Mining (2002), 669-672.
Improving Adaptive Hypermedia by
Adding Semantics
Anton ANDREJKO∗
Slovak University of Technology
Faculty of Informatics and Information Technologies
Ilkovičova 3, 842 16 Bratislava, Slovak republic
andrejko@fiit.stuba.sk
Abstract. Recently the Web and its services have changed the way of
thinking about them; hereby expectations have changed, too. While in
recent times users have been satisfied with presentation of generic
information, nowadays they are asking for personalized information,
which are adapting to them. This kind of presentation is not sufficient
in the information acquiring from databases on the Web. It is needed
to append metadata to this information. Metadata express semantics
and makes the information easier for computer processing. This paper
presents models for adaptive and semantic Web and shows how to
improve adaptive presentation with semantics.
1 Introduction
On the Web is the huge amount of the information, which are distributed and
structured in various levels. The user can get lost very easy in this environment or
he/she spends too much time browsing among information with not very essential
value. For this reason is needed to append a new element to hypermedia systems –
adaptation.
By adaptive hypermedia systems we mean all hypertext and hypermedia systems,
which reflect some features of the user in the user model and apply this model to adapt
various visible aspects of the system to the user. In other words, the system should
satisfy three criteria: it should be a hypertext or hypermedia system, it should have a
user model, and it should be able to adapt the hypermedia using this model [4].
Probably the most used way for accessing the information are catalogs and full-
text search engines. These only generate a result from database, which is based on
∗
Supervisor: doc. Ing. Mária Bieliková, PhD., Institute of Informatics and Software
Engineering, Faculty of Informatics and Information Technologies STU in Bratislava
query given by the user. The search engines do not understand the presented content
and do not take care of the language flexion and context in which was the query given
by user. Ontologies are the way how to overcome differences between queries and
search results. Moreover these results could put more exactly by using adaptive
hypermedia techniques described in [4]. In next sections we describe models used in
adaptive and semantic Web. The understanding of the models is very important for
next research. The aim of this paper is to propose a new adaptive model with added
semantics. We try to find an appropriate place in adaptive model for including
semantics.
The Hypertext Abstract Machine (HAM) was the first try to make a common system
usable for various hypertext applications. HAM is hierarchical model based on five
objects [5]: graphs, contexts, nodes, links and attributes. A graph is the higher-level
object. A graph contains information about a topic and consists from one or more
contexts. Each context has one parent context and zero or more child contexts. The
context consists of nodes and links. Nodes contain arbitrary data. These data are
conducted by links. A link defines relationship between source node and destination
node in both directions. Attributes (strings, numbers, and user’s types) can be attached
to contexts, nodes and links. Attributes give semantics to HAM objects.
The Dexter reference model is the result of two workshops. The model is an attempt to
capture, further develop, and formalize the results of these discussions. Also it tries to
find common terminology for hypertext field. Dexter model divides hypertext systems
into three layers: run-time, storage and within-component [8]. The run-time layer
describes mechanism the user’s interaction with hypertext. The within-component
layer covers the content and structures within hypertext nodes. The range of the content
or structure is not restricted. Dexter model has become the base for developing others
hypertext systems therefore it will be explained in more details.
The main focus is on storage level, which models nodes/links of the network
structure that are the base for hypertext. The storage layer describes “database” that is
composed of hierarchy of data-contained components interacted by relational links. In
different hypertext systems can be used for nodes terms as cards, frames, documents or
Improving Adaptive Hypermedia by Adding Semantics 237
articles. Dexter model generalizes the term node. Instead of the node is used the term
component. Component can consist from text, graphics, pictures or animation that
makes the main content. This layer does not distinguish between text component and
graphical component. The layer distinguishes atomic components and composite
component. Atomic components are usually nodes in hypertext systems and their
structure is the concern of the within-component layer. Composite components are
constructed from atomic components.
Run-time layer
Presentation specifications
Storage layer
Anchoring
Within-Component layer
In the adaptive hypermedia systems (AHS) are watched preferences and knowledge
about domain. These records are stored in the user model that helps to direct user to the
relevant information. AHS do that by dynamic adaptation links and content. AHS are
adaptive. The user can adjust some preferences explicit.
In Dexter model component covers both nodes and links. In Adaptive
Hypermedia Application Model (AHAM) [6] the central term are concept and concept
relationships. AHAM extends Dexter model with adaptation based on user model. In
this model (see figure 2), Domain model corresponds (roughly) to the storage layer in
Dexter model. The domain model comprises of the concepts. The user model describes
of which information about the user AHAM keeps a permanent record. The teaching
model consists of the rules which define how the domain model and user model are
combined to perform the adaptation.
238 Anton Andrejko
Run-time layer
Presentation specifications
Teaching model
Domain User
model model
Anchoring
Within-component layer
This model is based on Dexter model and formally described by UML (Unified
Modeling Language). The Munich model [10] keeps three-layers structure and appends
rule-based adaptation for user aspects. The run-time layer is responsible for interaction
with the user.
Storage layer
Domain Adaptation
Meta-Model Meta-Model
User
Meta-Model
The adaptation meta-model is appended within storage layer (see figure 3). The
adaptation meta-model consists of a set of rules that implement the adaptive
Improving Adaptive Hypermedia by Adding Semantics 239
Presentation
Presentation layer
Application layer
Semantic layer
Content
1
Hera, http://wwwis.win.tue.nl/~hera/
240 Anton Andrejko
The presentation layer specifies the layout of the presented content, application
layer specifies the navigation view over the conceptual data and consists from slices
that specify the structure of navigation nodes. The core of the semantic layer is
conceptual model describing the semantics of the data content. This model is expressed
in terms of RDFS.
The two upper layers can be found in AHS. If we compare Dexter model as a
headstone for AHS to the semantic model, the run-time layer would include the
presentation layer and slices from the application layer liken to the components in the
storage layer. But models mentioned in the section 2 miss the semantics that is in
semantic layer.
Before we add the semantic layer into the adaptive model, we should note that
Hera uses personalized presentation by user preferences in application model. To
achieve adapting in Hera is used conditional inclusion of slices (fragments) and
navigation (links) hiding [9]. In adaptive hypermedia are more techniques for adapting
content and navigation [4]. Therefore we prefer adding semantics to the AHS to adding
adaptive aspects to the semantic model. This seems to be easier way to fulfill the goal –
personalized presentation with the use of semantics.
In our approach we insert the semantic layer between storage and within-
component layer (see figure 5). This layer specifies the data content. It also defines the
integration process that gathers the data from different sources.
Run-time layer
Storage layer
Semantic layer
Within-Component layer
The layer creates an interface between layers and according to the user query (for
instance in Web search) by using ontology takes into account semantics of the content
and offers that content sensitive result from within-component layer to the user. The
layer expresses the semantics of the content. For describing the semantics we can use
one from ontology languages for instance RDF, RDF Schema or OWL. Any of them
seems to be useful. The selection of the appropriate language and inner structure design
is the goal for the following research.
4 Conclusions
In this paper we have described hypermedia models and adaptive hypermedia models.
We have focused on Dexter reference model that is the base for other AHS. In our
research we try to add semantics into AHS and improve the current systems. The
semantics layer proposed in this paper connects personalized adaptive hypermedia with
Improving Adaptive Hypermedia by Adding Semantics 241
Semantic Web initiative. Semantic layer improve accuracy in Web search and is useful
in navigation of Web sites. In following research we are planning deeply describe inner
structure of the semantic layer. We are also planning to experiment our approach in
prototype.
Acknowledgement: This work has been partially supported by the Grant Agency of Slovak
Republic grant No. VG1/ 0162/03.
References
1. Antoniou, G., Van Harmelen, F.: A Semantic Web Primer. MIT Press, Cambridge,
2004.
2. Barna, P. et al.: Semantical Descriptions of Models for Web Design. In: Workshop
on Application Design (2004)
3. Bieliková, M.: Presentation of Adaptive Hypermedia on the Web. In: Proc. of
DATAKON, L. Popelínský (Eds.), Brno (2003), 72-91.
4. Brusilovsky, P.: Methods and Techniques of Adaptive Hypermedia. User
Modeling and User-Adapted Interaction, Vol. 6 (1996), 87-129.
5. Cambell, B., Goodman, J.: HAM: A General Purpose Hypertext Abstract Machine.
Communications of the ACM, Vol. 31, No. 7 (1998), 856-861.
6. De Bra, P., Houben, G. J., Wu, H.: AHAM: A Dexter-based Reference Model for
Adaptive Hypermedia. In: Proceeding of the ACM Conference on Hypertext and
Hypermedia (1999), 147-156.
7. Dolog, P., Bieliková, M.: Hypermedia systems modeling framework. Computers
and Informatics. Vol. 21, No. 3 (2002), 221-239.
8. Halasz, F., Schwartz, M.: The Dexter Hypertext Reference Model.
Communications of the ACM, Vol. 37, No. 2 (1994), 30-39.
9. Houben, G. et al.: Hera: Development of Semantic Web Information Systems. In:
International Conference on Web Engineering, Lecture Notes in Computer
Science, Vol. 2722, Springer (2003), 529-538.
10. Koch, N., Wirsing, M.: The Munich Reference Model for Adaptive Hypermedia
Applications. In: Proceedings of Second International Conference on Adaptive
Hypermedia and Adaptive Web-based Systems, Springer Verlag (2002), 213-222.
An Overview of RDF Model
Representation Formats
Vladimír GRLICKÝ∗
Slovak University of Technology
Faculty of Informatics and Information Technologies
Ilkovičova 3, 842 16 Bratislava, Slovakia
grlicky@fiit.stuba.sk
1 Introduction
RDF – the Resource Description Framework – is a foundation for processing metadata;
it provides interoperability between applications that exchange machine-
understandable information on the web. Although World Wide Web Consortium
(W3C) recommended as a normative representation of RDF model the RDF/XML
format, this one is not the only one representation of RDF model. In this paper we
briefly mention four currently mostly used formats for RDF model representation
(namely RDF/XML, Notation 3, N-Triples, and TriX). To demonstrate some of
features of these formats we will try to encode following two sentences: “Full name of
a person identified by http://semweb.grlicky.info/vgrlicky is Vladimir
Grlicky. The name of this person consists of given name Vladimir and family name
Grlicky“.
On this simple example we show that the same model can be represented not only
by RDF/XML, but by other alternative formats that have minimally the same
∗
Supervisor: prof. Ing. Pavol Návrat, PhD., Institute of Informatics and Software Engineering,
Faculty of Informatics and Information Technologies STU in Bratislava
2 Basics of RDF
RDF (Resource Description Framework) is a standardized way how to describe
resources located on the web as well as real-world objects (e.g. a paper book, a car)
that are not directly accessible via the services of the Internet. Until 2003 RDF was
specified by only one document – Model and Syntax (M&S) Specification [10]. The
RDF M&S specification defined an abstract data model (the “Model” part of the
specification). The model is abstract because it is defined in terms of abstract
mathematical structures such as triples and sets. This specification also defined how to
represent data conforming to this data model in XML (the “Syntax” part of the
specification). RDF/XML – the XML serialization recommended by W3C is
a representation of the abstract model. However, it is important to distinguish between
the abstract data model and its representations. The specifications define constraints
which apply to the abstract data model as a whole. As the abstract model is infinite,
representations of the abstract data model may be finite and incomplete. Since
February 2004 the RDF specification (revised version) is defined by a “set of six”,
what stands for the set of six documents composed of Primer [11], Concepts (and
Abstract Syntax) [9], Syntax [2], Semantics [8], Vocabulary (RDF Schema) [5], and
Test Cases [7].
RDF data model is based on linguistically inspired construction composed of
a triple of the form subject – predicate – object, often called a statement or an
assertion. Universal element of RDF is a resource that is unambiguously identified by
its URI (Uniform Resouce Identifier). A resource in a statement can appear in the role
of both a subject and an object. Predicates correspond to properties of subjects, objects
refer to values of these properties. Object can have also the form of a literal, i.e
primitive data type (Fig. 1).
constructions. On the other side the reification can reasonably complicate formal
features of RDF model.
Other capabilities of RDF (typed literals, support for containers, collections,
entailment etc.) are not described here but can be found in the “set of six” that is
mentioned in above paragraphs.
Abstract data model of RDF does not specify particular representation. In case of
its graphical form a data model can be depicted as a graph; speaking more preciselly, it
is directed edge-labeled graph where subjects and objects are nodes, properties are
drawn as arcs between nodes. Fig. 2 depicts the set of free text sentences, introduced as
the example in section 1, represented by this type of graph. When we need the model to
be represented textually, we can use RDF/XML, or one of its alternative formats
briefly described in following sections.
3 RDF/XML
An RDF graph can be considered a collection of paths of the form node-predicate arc-
node which cover the entire graph. In order to encode the RDF graph in XML, the
nodes and predicates have to be represented in XML terms – element names, attribute
names, element contents and attribute values. Therefore, in RDF/XML these turn into
sequences of elements inside elements which alternate between elements for nodes and
predicate arcs. This has been called a series of node/arc stripes. The node at the start of
the sequence turns into the outermost element; the next predicate arc turns into a child
element, and so on. The stripes generally start at the top of an RDF/XML document
and always begin with nodes.
The following code presents aforementioned features of RDF/XML when
describing the RDF graph shown in Fig. 2.
An Overview of RDF Model Representation Formats 245
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:vcard="http://www.w3.org/2001/vcard-rdf/3.0#">
<rdf:Description
rdf:about="http://semweb.grlicky.info/vgrlicky">
<vcard:N rdf:parseType="Resource">
<vcard:Given>Vladimir</vcard:Given>
<vcard:Family>Grlicky</vcard:Family>
</vcard:N>
<vcard:FN>Vladimir Grlicky</vcard:FN>
</rdf:Description>
</rdf:RDF>
4 Notation 3
Notation 3 [3, 4], more commonly known via its abbreviation “N3”, is a shorthand
non-XML serialization of RDF, designed with human-readability in mind. According
to the Notation 3 Specification [3], it was created as an experiment in optimizing the
“expression of data and logic in the same language”. N3 has been well received for its
“scribblability”, because it is much more compact and readable than RDF/XML, and
because it forms a good introduction into many key principles of the Semantic Web.
The code below represents RDF model, depicted in Fig. 2, encoded using N3.
@prefix : <#> .
<http://semweb.grlicky.info/vgrlicky>
<http://www.w3.org/2001/vcard-rdf/3.0#FN>
"Vladmir Grlicky" ;
<http://www.w3.org/2001/vcard-rdf/3.0#N>
[ <http://www.w3.org/2001/vcard-rdf/3.0#Family>
"Grlicky" ;
<http://www.w3.org/2001/vcard-rdf/3.0#Given>
"Vladimir" ] .
As its current disadvantages we can mention the long term stability of N3, which
is not known, there are some internationalization issues, and a notable lack of analogies
for various features of N3 in RDF/XML.
5 N-Triples
As stated in [1], N-Triples is a line-based, plain text format for representing the correct
answers-statements for RDF. This format was designed to be a fixed subset of N3
(briefly described in section 4), hence all tools, which currently work with N3, can
seamlessly work with it, too. Each triple must be written on a separate line, and
consists of a subject specifier, a predicate specifier, then an object specifier, followed
246 Vladimír Grlický
by a period. One or more spaces or tabs separate subject from predicate, and predicate
from object.
_:BN01
<http://www.w3.org/2001/vcard-rdf/3.0#Given>
"Vladimir" .
<http://semweb.grlicky.info/vgrlicky>
<http://www.w3.org/2001/vcard-rdf/3.0#N>
_:BN01 .
_:BN01
<http://www.w3.org/2001/vcard-rdf/3.0#Family>
"Grlicky" .
<http://semweb.grlicky.info/vgrlicky>
<http://www.w3.org/2001/vcard-rdf/3.0#FN>
"Vladimir Grlicky" .
The source code above represents exemplary RDF graph model (Fig. 2) using N-
Triples format. Because of its plain text line-oriented nature N-Triples is simple and
very easy machine-processable RDF representation format.
6 TriX
TriX (Triples in XML) [6] is a serialization for named graphs. Its creators tried to
provide a highly normalized and consistent XML representation of RDF model (i.e.
graphs), which allows the effective use of generic XML tools as XSLT, XQuery and
others. The RDF model (Fig. 2) represented in TriX is shown below:
<trix xmlns="http://www.w3.org/2004/03/trix/trix-1/">
<graph>
<uri>http://semweb.grlicky.info/graph1</uri>
<triple>
<id>BN01</id>
<uri>http://www.w3.org/2001/vcard-rdf/3.0#Given</uri>
<plainLiteral>Vladimir</plainLiteral>
</triple>
<triple>
<uri>http://semweb.grlicky.info/vgrlicky</uri>
<uri>http://www.w3.org/2001/vcard-rdf/3.0#N</uri>
<id>BN01</id>
</triple>
<triple>
<id>BN01</id>
<uri>http://www.w3.org/2001/vcard-rdf/3.0#Family</uri>
<plainLiteral>Grlicky</plainLiteral>
</triple>
<triple>
An Overview of RDF Model Representation Formats 247
<uri>http://semweb.grlicky.info/vgrlicky</uri>
<uri>http://www.w3.org/2001/vcard-rdf/3.0#FN</uri>
<uri>Vladimir Grlicky</uri>
</triple>
</graph>
</trix>
One of the main advantages in Trix over RDF/XML is the ability to name graphs,
syntactic extensibility, direct processing with XML tools (XSLT, XQuery, XPath)
while still satisfying the well-formedness and validity of XML documents.
7 Conclusions
In this paper we tried to show that a set of sentences, modeled using RDF, can be
represented not only by RDF/XML but also by other RDF representation formats. We
briefly described some of alternatives to RDF/XML (N3, N-Triples, and TriX). These
formats can encode RDF model without any loss of information, when compared with
RDF/XML. However, it is important to say that this overview provided no formal
proof of assertions stated here. When choosing “the right” RDF representation format,
one should pay attention especially to its application support and capabilities to share
and exchange ontologies modeled by RDF and represented by this format.
References
1. Beckett, D.: N-Triples. W3C RDF Core WG Internal Working Draft. Cambridge,
MA, USA: W3C, 2001. http://www.w3.org/2001/sw/RDFCore/ntriples/
2. Beckett, D., McBride, B. (eds.): RDF/XML Syntax Specification (Revised). W3C
Recommendation 10 February 2004, Cambridge, MA, USA: W3C, 2004.
http://www.w3.org/TR/rdf-syntax-grammar/
3. Berners-Lee, T.: Notation 3: An RDF language for the Semantic Web. Cambridge,
MA, USA: W3C, 2001. http://www.w3.org/DesignIssues/Notation3.
4. Berners-Lee, T.: Primer: Getting into RDF & Semantic Web using N3. Cambridge,
MA, USA: W3C, 2004. http://www.w3.org/2000/10/swap/Primer.html
5. Brickley, D., Guha, R., McBride, B. (eds.): RDF Vocabulary Description
Language 1.0. RDF Schema. W3C Recommendation 10 February 2004.
Cambridge, MA, USA: W3C, 2004. http://www.w3.org/TR/rdf-schema/
6. Carroll, J., Stickler, P.: RDF Triples in XML. Bristol: Digital Media Systems
Laboratory, HP Laboratories, Technical Report HPL-2003-268, 2004.
http://www.hpl.hp.com/techreports/2004/
HPL-2004-56.pdf
248 Vladimír Grlický
7. Grant, J., Beckett, D., McBride, B. (eds.): RDF Test Cases. W3C Recommendation
10 February 2004. Cambridge, MA, USA: W3C, 2004. http://www.w3.org/TR/rdf-
testcases/
8. Hayes, P., McBride, B. (eds.): RDF Semantics. W3C Recommendation 10
February 2004. Cambridge, MA, USA: W3C. 2004. http://www.w3.org/TR/rdf-
mt/
9. Klyne, G., Carroll, J., McBride, B. (eds.): Resource Description Framework
(RDF): Concepts and Abstract Syntax. W3C Recommendation 10 February 2004.
Cambridge, MA, USA : W3C, 2004. http://www.w3.org/TR/rdf-concepts/
10. Lassila, O., Swick, R.: Resource Description Framework (RDF) Model and Syntax
Specification. W3C Recommendation 22 February 1999. Cambridge, MA, USA:
W3C, 1999. http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/
11. Manola, F., Miller, E., McBride, B. (eds.): RDF Primer. W3C Recommendation 10
February 2004, Cambridge, MA, USA: W3C, 2004. http://www.w3.org/TR/rdf-
primer/
Sharing a User Model between Several
Adaptive Hypermedia Applications
Jaroslav KURUC∗
Slovak University of Technology
Faculty of Informatics and Information Technologies
Ilkovičova 3, 842 16 Bratislava, Slovakia
kuruc@fiit.stuba.sk
1 Introduction
The aim of the adaptive hypermedia (AH) application is to reflect some features of the
user in a user model and use this model by adapting various visible aspects of the
system to the user. As described in reference models of adaptive hypermedia [1, 2], the
user model together with the domain model and the adaptation model are three basic
parts of every AH application. The role of the user model is to represent several users'
characteristics such as user's knowledge, preferences, interests, tasks or goals. It is also
considered as the source of the adaptation used in the adaptation model when adapting
information from the domain model.
The user model is often managed by the AH application itself, realized as the
internal part of the system, without any possibility to share this model between other
AH applications. This approach has several disabilities.
∗
Supervisor: doc. Ing. Mária Bieliková, PhD., Institute of Informatics and Software
Engineering, Faculty of Informatics and Information Technologies STU in Bratislava
One of the main problems when working with the user model is the initialization
of this model. To achieve effective personalization, AH application needs to know the
characteristics of the user as much as possible. When the user is using the system for
the first time, default values in the user model are used. As the user works with the
system more and more, the user model is more accurate and personalization more
effective. The problem is when the user uses more that one AH application and theses
applications do not cooperate in the task of modeling user characteristics. Initialization
phase is needed for every AH application, even they could use at least domain
independent characteristics which do not (or not often) change such as presentation
preferences, desired language, etc. Even better solution would be to collect the
knowledge about the user in a central knowledge base and use this knowledge by
different AH applications as appropriate. AH applications working on the same (or
similar) domain would cooperate on the same part of the user model.
Next problem is that the user doesn't have the control or the information what is
stored in the user model. AH application collects the information about the user
regarding the interaction with system and uses this information later for the adaptive
purposes. Collected information is often hidden to the user, what may cause in fear of
misuse of this information. The skepticism may lead to refusing to use such systems. A
solution to the problem of privacy would be to a transparent presentation of the
contents of the user model with a possibility to change it. Only few existing AH
applications support mechanism for inspecting/changing the state of user model by the
user itself, usually through a form based wizards. Therefore, a uniform way of
inspecting/changing the user model independent on the features of the AH application
is needed.
Regarding to the mentioned problems, an effort to separate the user model from
the AH applications itself is the meaningful way towards the cross-application
adaptation.
The paper is structured as follows. In section 2 we characterize the representation
of the user model in current AH applications, together with the mechanism for
updating this model and its utilization for the adaptation purposes. Next, in section 3,
we describe the architecture for sharing a user model between several AH applications
we proposed. Finally, we give conclusions and proposals for further work.
user. Attributes independent on the domain represent characteristics useful without any
consideration to the specific domain, e.g. desired language, preferred media, color
scheme used in the presentation, etc.
User model is considered also as an extension of the domain model, where it
extends the definition of the concepts with the definition of the domain dependent
attributes. One example of such system is the system AHA! [3]. The definition of the
user model lies in defining unique attributes for concepts. Values of the attributes can
be booleans, integer numbers or strings. For every user, an instance of the user model
is maintained and used for adaptation purposes.
From the maintenance point of view, following aspects should be covered when
working with the user model:
• initialization of the user model,
• user observation,
• processing of the observed information in form of updating user model,
• usage of the user model for the purposes of the adaptation.
Initialization of the user model might be realized by different techniques. The
definition of the attribute in system AHA! contains except the attribute identifier and
value type also default value. Thus, the presentation is same for all users who are
working with the system for the first time. Another solution is to classify users in
several user groups and assign default values for these groups. Some educational AH
applications require user to go through initial test to observe the user knowledge and
initialize her user model appropriately.
User observation consists of monitoring the user activity during the usage of the
AH application. System monitors the links user is following, items she is selecting
from the menu, time spent on particular pages, etc. Some AH applications prompt user
to enter some kind of information. Educational AH applications sometimes provide the
user with the possibility to enter whether she understands presented information.
The way observed information about the user is reflected in the user model, same
as the way the state of the user model influence the adaptation, is defined in the
adaptation model. Usually, it is realized by the rules. In system AHA!, the definition of
concept contains the rules evaluated when the page containing information fragments
corresponding with the particular concept is showed. The rules determine which
attribute values are changed, where new value is often a result of an expression.
<concept>
<name>de_koninck</name>
<desc>De Koninck Beer</desc>
<resource>de_koninck.xhtml</resource>
<req>beer.interest > 50</req>
<generateListItem isPropagating="true">
<req>beer.interest < 100</req>
<trueActions>
<action>
<concept>beer</concept>
<attribute>interest</attribute>
<expr>beer.interest + 10</expr>
</action>
...
</trueActions>
<falseActions>
...
</falseActions>
</generateListItem>
...
</attribute>
...
</concept>
In the previous code (adopted from [4], detailed explanation can be also found
in [5]) a sample fragment of domain/user model definition in system AHA! is shown.
Given code shows the definition of concept de_koninck representing information
fragment about the Belgian beer brand. The content of the information fragment is
defined in the page de_koninck.xhtml. The concept is considered to be suitable
when the expression beer.interest > 50 is fulfilled (which means that user is
interested in beers). Thus, the current value stored in the user model for the attribute
interest defined in the concept beer is considered. Since the value differs for
particular users, concept may be more or less suitable. This is the example of usage of
the user model for the purposes of adaptation.
The definition of concept includes also the definition of attribute access which
has associated rules (a set of generateListItem definitions) for updating user
model. When the page de_koninck.xhtml is shown, the value of attribute access
becomes temporarily true and the associated rules are evaluated. Every rule has defined
condition. When the condition is fulfilled, a set of actions (trueActions) is applied.
Otherwise, other set of actions (falseActions) is applied. In our case, when the
condition beer.interest < 100 is fulfilled, one action to be applied is showed.
This action changes the value of attribute interest inside the concept beer by
increasing its value by 10. Since the rule has specified isPropagating attribute as
true, by changing the value of attribute interest inside the concept beer, also the
rules associated with this attribute are evaluated. Showed mechanism observes the
pages user is selecting and updates the user model appropriately.
Presented approach of definition of user model in current AH applications assume
the implicit semantics of attributes and its values. Only the designer knows what
particular attribute stands for and what is the interpretation of its value. To use the user
model by more AH applications, an explicit definition of the user model semantics and
a separation of domain model and the user model is required.
Sharing a User Model between Several Adaptive Hypermedia Applications 253
To ensure a possibility for user to observe/change the state of the user model, web
service should provide appropriate interface for browsing the ontologies used for
representing user model and for changing the instances of these ontologies. Our
approach includes the Management interface used also for these purposes.
Proposed architecture is shown in Fig. 1. Particular AH applications communicate
with the User Model WS by SOAP (Simple Object Access Protocol) protocol over
http (Hypertext Transfer Protocol) protocol using SSL (Secure Socket Layer). Every
AH application has its own domain/adaptation model and uses User Model WS to
manage the user model. User accesses AH applications (by HTTP protocol using SSL)
via web interfaces they provide using assigned user accounts. Since AH applications
need to know how to access web service, they provide an interface for configuring
address of the web service server and credentials used for authentication/authorization
when accessing web service.
DB
JDBC
AH System 1
... HTTP/SSL
AH System N User
User creates an account for the AH system in the User Model WS through the
Management Interface, realized as a web interface using User Model WS internal API.
Management interface allows user to define the access for cooperating AH
applications, same as the privileges they have when accessing web service. In case of
RDF model, privileges definition includes the namespace in RDF model and particular
access rights (a set of rules, where rule determines wheather accessing application is
authorized/denied to read/write from/to specified namespace).
Since some of the information stored in the user model has permanent character, a
serialization mechanism is needed. Our approach uses relational database accessed via
JDBC for storage permanent data.
Sharing a User Model between Several Adaptive Hypermedia Applications 255
4 Related Works
Similar architecture for sharing a user model is a Personis server [256]. It is also based
on the web services technology, and provides cooperating adaptive applications with
the functionality for retrieving stored data and for updating it. Stored data is based on
component-evidence-source triplets, where component represents the attribute of the
user model, evidence its value and source is the origin adaptive application which
stored the information. The main focus is on the user control and scrutability of the
user model. The main difference between this approach and approach we proposed is
in the representation of the stored data. In the personis server, no explicit definition of
the semantics is considered, what limits the usage of stored information by other
adaptive application and overall cross-application adaptivity.
5 Conclusions
In this paper, we have described architecture for sharing user a model between several
adaptive hypermedia applications we approached. Our approval is based on using
separating user model from the domain model and explicit definition of the semantics
of information stored in the user model.
The main contribution of this approach is a possibility to share the knowledge
about the user collected by one AH application and use it by other AH applications.
This feature can help AH applications to solve the problem with initialization of the
user model. Besides that, central storage gives user an opportunity to explore the stored
information and to change it. Furthermore, user characteristics stored in user model are
represented using ontologies, what gives us a possibility to discover new knowledge.
In the future, we plan to implement the prototype of the proposed architecture.
We want to create the following subsystems:
• User Model Web Service managing user model storage, providing interface
for AH applications to obtain the stored information and to update it,
• sample AH application using User Model WS for managing user model and
• Management Interface allowing user to define access rights for cooperating
AH applications and an interface for observing/updating user model.
References
1. De Bra, P. Houben, G.-J., Wu, H.: AHAM: A Dexter-based reference model for
adaptive hypermedia. In: Proc. of the tenth ACM Conference on Hypertext and
hypermedia: Returning to our diverse roots, Darmstadt, Germany (1999), 147-156.
2. Koch, N., Wirsing, M.: The Munich reference model for adaptive hypermedia
applications. In: Proc. of Internation Conference on Adaptive Hypermedia and
256 Jaroslav Kuruc
1 Motivation
RoboCup is an international joint project to promote artificial intelligence, robotics and
information technologies. It is an attempt to advance AI and intelligent robotics study
and research by providing an ordinary problem where wide range of technologies can
be integrated and examined. RoboCup chose to use soccer game as a central topic of
research, with the ultimate goal of the RoboCup project – by 2050, develop a team of
fully autonomous humanoid robots that can win against the human world champion
team in soccer.
In order for a robot team to actually perform a soccer game, various technologies
must be incorporated, including design principles of autonomous agents, multi-agent
collaboration, strategy acquisition, real-time reasoning, robotics, and sensor-fusion.
RoboCup is a task for a team of multiple fast-moving and skilled robots under a
dynamic environment. It also offers a software platform for research on the software
aspects. RoboCup is divided into three main fields: RoboCup Soccer – directed to the
original soccer area, RoboCup Rescue – intended to do search and rescue in large scale
disaster and RoboCup Junior – aimed to children education and motivation.
From our point of view, the main goal of RoboCup is to promote research in areas
of artificial intelligence and information technologies, especially in the area of multi-
agent systems. This is a benefit for the students, making their studies more interesting
and attractive. Students can meet with robotic soccer in courses like Artificial
Intelligence, Team Project and others. Students are facing an interesting problem,
which demands invention as well as use of modern artificial intelligence approaches.
Teams of students have the possibility to directly compare their results in tournaments.
This encourages the students to even higher effort and motivates them for better
results. More fundamentally, achieving progress requires tackling serious open
research problems in artificial intelligence, such as planning of cooperation of multiple
agents etc. That is why this area is of interest also for our doctorate students.
We have been organizing this tournament regularly for several years. Starting as a
local event in 2000, it has grown to a regional contest under the official RoboCup
authorization. Our Faculty organizes tournaments in the simulated category only,
however we are planning to include other categories, too. Every our contest has two
parts. First part is a tournament, where students try to make their players win. Second
part is an exhibition of participating teams, including the most impressive parts of the
matches and presentations of the players, innovative ideas and methods the teams used.
2 Results presentation
For this student conference we decided to hold such an exhibition and present both the
way RoboCup simulated league is played and also the progress of current students
research in this field.
Students’ main research is aimed to team tactics. It covers team formations and
planning, player communication and use of a team coach. Each of these topics has also
its specific themes. Formation can be static and dynamic and contain subformations for
particular situations. Formation and team play can be also changed by plans, developed
by any player through the game. Plans are distributed by permitted communication.
But communication also allows players to react on immediate situation and direct team
play. Similarly, the role of a coach is irreplaceable in modern soccer. Artificial coach
can assess the game situation in progress and send appropriate tactical information to
players or even alternate players.
We hope that this exhibition will attract many present and future students and
give them motivation for their study and research work.
More information about our contests, can be found on the web page
http://www.fiit.stuba.sk/robocup/2005/eng/turnaj_menu.htm
Author Index
Adam, Martin, 195 Lekavý, Marián, 49
Andrejko, Anton, 235 Líška, Miroslav, 167
Angelovič, Peter, 27 Mesjar, Peter, 77
Backo, Tomáš, 90 Mikita, Ondrej, 213, 219
Bagala, Adrian, 96 Mostafa, Hossam el-ddin, 103
Barla, Michal, 195 Navarčik, Matúš, 175
Bartalos, Peter, 69 Návrat, Pavol, 261
Bott, Roland, 96 Ölvecký, Tomáš, 1
Buno, Juraj, 90 Pullman, Peter, 90
Burák, Jozef, 90 Semančík, Radovan, 116
Dysko, Igor, 128 Sivák, Peter, 195
Frivolt, György, 35 Slavkovský, Adrián, 134
Gregor, Marek, 213, 219 Sýkora, Miloš, 146
Grlický, Vladimír, 242 Sýkora, Peter, 14
Hluchý, Pavol, 201 Šarmír, Ján, 207
Jakubík, Jaroslav, 151 Šípka, Miloslav, 140
Jakubík, Michal, 224 Tomša, Marek, 8
Jarábek, Branislav, 108 Trebatický, Peter, 57
Kapustík, Ivan, 261 Tvarožek, Michal, 195
Katana, Daniel, 90 Veselý, Richard, 8
Koprla, Marek, 90 Vozár, Oto, 8
Košík, Matej, 159 Zajac, Jaroslav, 22
Krištofič, Andrej, 229 Zálešák, Vladislav, 21
Kubík, Michal, 84 Zaťko, Tomáš, 83
Kuruc, Jaroslav, 249 Žiak, Ján, 183
Lacko, Peter, 41
263
Mária Bieliková (Ed.)
263 pages
Print Vydavateľstvo STU Bratislava
2005