Upload
philomena-casey
View
226
Download
0
Embed Size (px)
Citation preview
Saint-PetersburgState University ITMO
Projects in SPb IFMO 1
Yartsev [email protected]
Computer Technology Department,
Saint-Petersburg State University ofInformation Technology, Mechanics and Optics.
Russia
Overview of the projects, developed by the students of SPb IFMO under the supervision of professor A.A.Shalyto
Saint-PetersburgState University ITMO
Projects in SPb IFMO 2
Projects in SPb IFMO
• Managed under the supervision of professor A.A.Shalyto
• Developed in the context of automata programming and open project documentation
• Are available from the Informatic Systems dept. site – http://is.ifmo.ru
Saint-PetersburgState University ITMO
Projects in SPb IFMO 3
Project development
• Students work at the projects in the third year of studies
• During the third course students regulary meet their scientific advisor A.A.Shalyto and discuss new ideas and documentation
• There are 45 projects, that have already been developed, they are available from the site
• All the documentation is written in russian language. There is an abstract in english.
Saint-PetersburgState University ITMO
Projects in SPb IFMO 4
Documentation structure
• Introduction• The formulating of the tasks• The description of the approach• Screenshots of the programs• Class diagrams• Automata documents• Conclusion• Source code
Saint-PetersburgState University ITMO
Projects in SPb IFMO 5
Automata documents
For each automata:• Verbal description (declaration of intent)• Scheme of automata connections
(automata interfaces)• State transition diagram• Code, isomorphic to the diagramFor the whole system:• Scheme of automata intercommunication
Saint-PetersburgState University ITMO
Projects in SPb IFMO 6
Overview of several projects
The most interesting and maniford
projects are presented here
Saint-PetersburgState University ITMO
Projects in SPb IFMO 7
Examples of the projects
• Traffic lights controller
• SMTP protocol implementation
• CodeRally project
• Robocode project
• Automata graph designer
• Translator between different Japanese alphabets
Saint-PetersburgState University ITMO
Projects in SPb IFMO 8
Traffic lights controller
• Developed by A. Distel and D. Kobak
• Demonstrates the simple critical object control program
• Handles the malfunctioning – automatically switches to blinking yellow
Saint-PetersburgState University ITMO
Projects in SPb IFMO 9
Traffic lights controller
Saint-PetersburgState University ITMO
Projects in SPb IFMO 10
Traffic lights controller
Saint-PetersburgState University ITMO
Projects in SPb IFMO 11
Traffic lights. Conclusions
• Automata approach can be used in critical objects control
Saint-PetersburgState University ITMO
Projects in SPb IFMO 12
SMTP protocol implementation
• K. Agafonov and D. Poroh implemented the SMTP protocol.
• Windows gui and command line client, Unix command line client and server
• Handles several exceptions – connect termination and server shutdown
Saint-PetersburgState University ITMO
Projects in SPb IFMO 13
SMTP protocol implementation
• The usage of logging• Standartized logging protocol for all the
classes• Three modes – silent, full, only open/close
connection events. Different automata can be logged
• Via logging, one can quickly find the place in the code, where the execution went wrong.
Saint-PetersburgState University ITMO
Projects in SPb IFMO 14
SMTP protocol implementation
Saint-PetersburgState University ITMO
Projects in SPb IFMO 15
SMTP protocol implementation
Saint-PetersburgState University ITMO
Projects in SPb IFMO 16
SMTP procotol implementation. Conclusions
• Automata approach can be used in server side programming
• Debugging of services is quite hard. Logging eases it
Saint-PetersburgState University ITMO
Projects in SPb IFMO 17
CodeRally
• Developed by gold-winner of ACM 2003 finals Eugene Yuzhakov
• The game created by Alphaworks company (IBM)
• Emulates the track for several little cars• Cars acquire points by passing through
checkpoints and shooting• The winner is the car with maximum points
at the end of the round.
Saint-PetersburgState University ITMO
Projects in SPb IFMO 18
Coderally
• In the documentation the author makes global strategy analysis, on which the code of the program is based.
• The analysis is supported by pictures, describing the way of movement as it is shown on the pictures
Saint-PetersburgState University ITMO
Projects in SPb IFMO 19
Screenshot from the game
Saint-PetersburgState University ITMO
Projects in SPb IFMO 20
Coderally
• Automata state transition diagram of the car controller.The states and events are named with short identificators
Saint-PetersburgState University ITMO
Projects in SPb IFMO 21
Events and states
• The explanation is given before the graph in the following form –
• z0 – choosing the optimal checkpoint
• z1 – choosing the optimal trajectory
• z2 – moving towards the refuelling station
• e3 – the car was hit by the bullet
• ... And so on
Saint-PetersburgState University ITMO
Projects in SPb IFMO 22
Coderally. Conclusions
• There was no open documentation available for this game
• The conclusion and the source code go at the end of the documentation.
• In the conclusion the author tells about the accomplishments and drawbacks of the project. The conclusion is created after the documentation has been written and the program has been developed
• The automata diagram for this project is simple, the main attention is paid to the mathematical aspect of the game
Saint-PetersburgState University ITMO
Projects in SPb IFMO 23
Robocode ver. 1 and 2
• The Robocode project is pretty much the same as the CodeRally. But on it’s example the ease of refactoring of the open source code and open documentation can be shown.
• Robocode is the Java game, created by Alphaworks company (IBM). The aim is to program the artificial intelligence of the tank
Saint-PetersburgState University ITMO
Projects in SPb IFMO 24
Robocode ver. 1 and 2
• Several tanks fight on the field
• They can shoot and move
• With radar they can scan the bullets and other tanks
• The winner is the tank, that destroys all other tanks.
Saint-PetersburgState University ITMO
Projects in SPb IFMO 25
Robocode ver. 1 and 2
• Originally it was developed by N. I. Tukkel and A.A. Shalyto
• Then Denis Kuznetcov, the gold-winner of the 2001 ACM finals, modified the original version
• The ease of modification proved the advantages of open project documentation and automata programming
Saint-PetersburgState University ITMO
Projects in SPb IFMO 26
Robocode ver. 1 and 2
Saint-PetersburgState University ITMO
Projects in SPb IFMO 27
The graph model for the ver. 1
Saint-PetersburgState University ITMO
Projects in SPb IFMO 28
The graph model for the ver. 2
Saint-PetersburgState University ITMO
Projects in SPb IFMO 29
Robocode. Conclusions
• To modify the logic of the program there is no need to look through the source codes
• Such approach eases the support of the software in the companies
• The time needed for the adaptation of the new member of the team decreases
Saint-PetersburgState University ITMO
Projects in SPb IFMO 30
Robocode. Conclusions
• Cynical was the best tank at the robocode competition for several weeks
• During the year it still remained in the top list of the tanks
• The authors aim was not the creation of the best tank in the world, they wanted to create the best technology in the world =)
Saint-PetersburgState University ITMO
Projects in SPb IFMO 31
Robocode. Conclusions. Javadoc and OPD
Saint-PetersburgState University ITMO
Projects in SPb IFMO 32
Robocode. Conclusions. Javadoc and OPD
Saint-PetersburgState University ITMO
Projects in SPb IFMO 33
Robocode. Conclusions. Javadoc and OPD
• Javadoc does not provide the enough information for the developer to understand the logic of the program
• However javadoc can be used as the supporting tool
Saint-PetersburgState University ITMO
Projects in SPb IFMO 34
Automata graph designer
• Developed by I. Anichkin
• Designed to work with automata graphs
• Faster and easier to use than Microsoft Visio and Rational software
Saint-PetersburgState University ITMO
Projects in SPb IFMO 35
Automata graph designer
Saint-PetersburgState University ITMO
Projects in SPb IFMO 36
Automata graph designer
Saint-PetersburgState University ITMO
Projects in SPb IFMO 37
Automata graph designer. Conclusions
• GUI applications can be programmed with automata approach
Saint-PetersburgState University ITMO
Projects in SPb IFMO 38
Japanese translator
• Developed by Ekaterina Lysenko and Pavel Skakov
• Four different system of written language in Japan
• The program makes the transliteration between the systems
Saint-PetersburgState University ITMO
Projects in SPb IFMO 39
Japanese translator
• This translator shows, how the automata can deal with the strings and lexemes.
Saint-PetersburgState University ITMO
Projects in SPb IFMO 40
Japanese translator
Saint-PetersburgState University ITMO
Projects in SPb IFMO 41
Japanese translator
Saint-PetersburgState University ITMO
Projects in SPb IFMO 42
Japanese translator. Conclusions
Saint-PetersburgState University ITMO
Projects in SPb IFMO 43
Conclusions
• Simplicity needs projection and good taste. L. Torvalds
• It is a mistake to think that programmers wares are programs. Programmers have to produce trustworthy solutions and present it in the form of cogent arguments. Programs source code is just the accompanying material to which these arguments are to be applied to. E. Dijkstra
Saint-PetersburgState University ITMO
Projects in SPb IFMO 44
Conclusions
• The introducted approach, as we think, satisfies the requirements given before.
Saint-PetersburgState University ITMO
Projects in SPb IFMO 45