Foundation for Open Project Documentation Anatoly Shalyto shalytomail

  • Slides: 35
Download presentation
Foundation for Open Project Documentation Anatoly Shalyto shalyto@mail. ifmo. ru Computer Technology Department Saint-Petersburg

Foundation for Open Project Documentation Anatoly Shalyto shalyto@mail. ifmo. ru Computer Technology Department Saint-Petersburg State University of Information Technology, Mechanics and Optics, Russia Foundation for Open Project Documentation

Project Documentation in the Real World (1) Foundation for Open Project Documentations — http:

Project Documentation in the Real World (1) Foundation for Open Project Documentations — http: //is. ifmo. ru 2

Project Documentation in the Real World (2) l Commercial Software l l l Critical

Project Documentation in the Real World (2) l Commercial Software l l l Critical Objects Control Software l Main — by standards l Extra — by customer needs Other l By customers requirements Non commercial software l l Educational l Good quality Other l By developers wishes Foundation for Open Project Documentations — http: //is. ifmo. ru 3

Hardware Documentation vs. Software Documentation l l Designers and manufacturers are different people Hardware

Hardware Documentation vs. Software Documentation l l Designers and manufacturers are different people Hardware Documentation l l Project Documentation Design Basis Verification Results User Guide l l Designers and manufacturers are same people Software Documentation l l l User Manual Developers Guide Source Code (for open source projects) Foundation for Open Project Documentations — http: //is. ifmo. ru 4

Open Project Documentation l Why Project Documentation? l l Software quality improvement Better verification

Open Project Documentation l Why Project Documentation? l l Software quality improvement Better verification Faster and safer modification Why Open Project Documentation? l l Open project documentation increases freedom Better project understandability Project design borrowing Educational purposes l For students l For specialists Foundation for Open Project Documentations — http: //is. ifmo. ru 5

Why Only Open Project Documentation? l l Open = Must be available for further

Why Only Open Project Documentation? l l Open = Must be available for further using and development Foundation for Open project Documentation is Free, but it is in different area comparing with Free Software Foundation or Open Source Foundation l Foundation results is applicable not only for free software, but also for commercial, secret and other kinds of software Foundation for Open Project Documentations — http: //is. ifmo. ru 6

Software Project Documentation l In engineering practice projects must be welldocumented l l l

Software Project Documentation l In engineering practice projects must be welldocumented l l l So on www. sourceforge. net there are not 76000 project, but much fewer The code must be based on the project documentation, not vice versa Project execution flow must be documented, not only final results Foundation for Open Project Documentations — http: //is. ifmo. ru 7

SWITCH-technology (Automata Programming) l l l Proposed in 1991 Based on states decomposition Model-driven

SWITCH-technology (Automata Programming) l l l Proposed in 1991 Based on states decomposition Model-driven development Usage scope – systems with complex behavior Applicable for different type of computing devices l l l Logic Controllers Programming Microcontrollers Microprocessors Foundation for Open Project Documentations — http: //is. ifmo. ru 8

SWITCH-technology guidelines l l Logic control State-based procedural programming State-based object-oriented programming Computational algorithms

SWITCH-technology guidelines l l Logic control State-based procedural programming State-based object-oriented programming Computational algorithms Foundation for Open Project Documentations — http: //is. ifmo. ru 9

SWITCH-technology Basics l l l l l State Set of states Input variables +

SWITCH-technology Basics l l l l l State Set of states Input variables + Events = Input Actions States + Input Actions = Automata With No Output + Output Actions = Automata States are encoded with multiple values Observation of the automata states Correlated automata systems Logging Project documentation Foundation for Open Project Documentations — http: //is. ifmo. ru 10

Automata in Automata Programming l l l Logic specification language Isomorphic mapping to source

Automata in Automata Programming l l l Logic specification language Isomorphic mapping to source code Program works and builds logs in terms of automata Foundation for Open Project Documentations — http: //is. ifmo. ru 11

Educational Experiment (1) l Computer Technology Department in University of Information Technology, Mechanics and

Educational Experiment (1) l Computer Technology Department in University of Information Technology, Mechanics and Optics, Saint Petersburg, Russia l l l Chosen students from the whole Russia International Olympiads in Informatics medalists ACM International Collegiate Programming contest medalists Foundation for Open Project Documentations — http: //is. ifmo. ru 12

Educational Experiment (2) l 1998 -2001 Common Teaching 1 l l 2001 -2002 Common

Educational Experiment (2) l 1998 -2001 Common Teaching 1 l l 2001 -2002 Common Teaching 2 l l Lectures, Course Works and Exams 2002 -2003 Experimental Teaching l l Lectures and Exams Lectures and Projects Project Documentation Verification More than 40 fully Developed and Documented Projects To be continued Foundation for Open Project Documentations — http: //is. ifmo. ru 13

Educational Experiment (3) l Project Contents l Project Documentation (at least 60 hours) l

Educational Experiment (3) l Project Contents l Project Documentation (at least 60 hours) l l l l l Problem Definition User Interface Description Justifications Automata and Classes Descriptions Automata and Classes Diagrams Verification Protocols References Source Code (at least 20 hours) Anatoly Shalyto spent approximately 10– 15 hours per project Foundation for Open Project Documentations — http: //is. ifmo. ru 14

Projects Examples l l l l Games Skeleton animation Controlling systems Graphical User Interfaces

Projects Examples l l l l Games Skeleton animation Controlling systems Graphical User Interfaces Parallel problems Transliteration Many others Foundation for Open Project Documentations — http: //is. ifmo. ru 15

Three Examples l Diesel-generator modeling l l Robo. Code Agent l l Procedural automata

Three Examples l Diesel-generator modeling l l Robo. Code Agent l l Procedural automata programming Object-oriented automata programming Visualization Framework l l Switch-technology based visualization of calculation algorithms Object-oriented realization of procedural algorithms Foundation for Open Project Documentations — http: //is. ifmo. ru 16

Diesel Generator Project Execution Flow l l l l Analysis Structuring (Automata Decomposition) Automata

Diesel Generator Project Execution Flow l l l l Analysis Structuring (Automata Decomposition) Automata Interaction Diagrams Automata Verbal Descriptions Automata Interface Definition Automata Transitional Graph Definition Isomorphic Source Code Generation Verification logs Foundation for Open Project Documentations — http: //is. ifmo. ru 17

Diesel-generator Automata Interaction Diagram Foundation for Open Project Documentations — http: //is. ifmo. ru

Diesel-generator Automata Interaction Diagram Foundation for Open Project Documentations — http: //is. ifmo. ru 18

Diesel-generator Automata Interface Diagram Foundation for Open Project Documentations — http: //is. ifmo. ru

Diesel-generator Automata Interface Diagram Foundation for Open Project Documentations — http: //is. ifmo. ru 19

Diesel-generator Automata Transition Graph Foundation for Open Project Documentations — http: //is. ifmo. ru

Diesel-generator Automata Transition Graph Foundation for Open Project Documentations — http: //is. ifmo. ru 20

Diesel-generator Isomorphic Source Code void A 0(int e, dg_t *dg) { int y_old =

Diesel-generator Isomorphic Source Code void A 0(int e, dg_t *dg) { int y_old = dg->y 0; switch(dg->y 0) { case 0: A 8(e, dg); if (x 220(dg)) dg->y 0 = 4; else if (dg->y 7 == 2) dg->y 0 = 7; else if (dg->y 8 == 2) dg->y 0 = 1; break; case 1: A 4(e, dg); A 3(e, dg); A 1(e, dg); if (dg->y 4 != 0) dg->y 0 = 6; else if (dg->y 7 == 2 || dg->y 7 == 4) dg->y 0 = 8; else if (dg->y 3 != 0) dg->y 0 = 5; else if (dg->y 1 == 0) dg->y 0 = 0; else if (dg->y 1 == 3) dg->y 0 = 7; … Foundation for Open Project Documentations — http: //is. ifmo. ru 21

Diesel-generator Verification Logs 11: 34: 02. 507{ 11: 34: 02. 507> 11: 34: 02.

Diesel-generator Verification Logs 11: 34: 02. 507{ 11: 34: 02. 507> 11: 34: 02. 507} 11: 34: 02. 507{ 11: 34: 02. 507> … 11: 34: 02. 517} DG 1: DG 1: DG 1: DG 1: A 20: A 71: x 320 x 330 A 71: A 72: x 220 A 72: A 73: x 220 A 73: A 74: x 430 x 440 started at state 2 with event e 10 started at state 0 with event e 10 – lubricting oil temperature less than Tmm - lubricting oil temperature greater than Tmpr stopped at state 0 started at state 0 with event e 10 – rotation frequency greater than RCV stopped at state 0 started at state 0 with event e 10 – water temperature less than Tvm - water temperature greater than Tvpr DG 1: A 20 stopped at state 0 Foundation for Open Project Documentations — http: //is. ifmo. ru 22

Robo. Code Agent http: //robocode. alphaworks. ibm. com Top Five 1. 2. 3. 4.

Robo. Code Agent http: //robocode. alphaworks. ibm. com Top Five 1. 2. 3. 4. 5. Glow. Blow. Melee 1. 1 Cigaret 1. 20 Cynical Glow. Blow Cynical_3 Foundation for Open Project Documentations — http: //is. ifmo. ru 23

Robo. Code Agent Project Execution Flow l l Analysis Structuring (Class Decomposition) Classes Diagram

Robo. Code Agent Project Execution Flow l l Analysis Structuring (Class Decomposition) Classes Diagram All the stages from diesel-generator project execution flow Foundation for Open Project Documentations — http: //is. ifmo. ru 24

Robo. Code Agent Classes Diagram Foundation for Open Project Documentations — http: //is. ifmo.

Robo. Code Agent Classes Diagram Foundation for Open Project Documentations — http: //is. ifmo. ru 25

Robo. Code Agent Class Structure Diagram Foundation for Open Project Documentations — http: //is.

Robo. Code Agent Class Structure Diagram Foundation for Open Project Documentations — http: //is. ifmo. ru 26

Robo. Code Agent Automata Interface Foundation for Open Project Documentations — http: //is. ifmo.

Robo. Code Agent Automata Interface Foundation for Open Project Documentations — http: //is. ifmo. ru 27

Robo. Code Agent Transition Graph Foundation for Open Project Documentations — http: //is. ifmo.

Robo. Code Agent Transition Graph Foundation for Open Project Documentations — http: //is. ifmo. ru 28

Robo. Code Agent Debugging through Protocols Foundation for Open Project Documentations — http: //is.

Robo. Code Agent Debugging through Protocols Foundation for Open Project Documentations — http: //is. ifmo. ru 29

Visualization Framework Malhotra, Kumar, Maheshwari network flow algorithm Foundation for Open Project Documentations —

Visualization Framework Malhotra, Kumar, Maheshwari network flow algorithm Foundation for Open Project Documentations — http: //is. ifmo. ru 30

Visualization Framework Visualizer Structure l Model l l View l l Interactive Automata System

Visualization Framework Visualizer Structure l Model l l View l l Interactive Automata System Automatically Generated by Algorithm’s XML–Description User Interface Based on Vizi Library Controller l Vizi Library Foundation for Open Project Documentations — http: //is. ifmo. ru 31

Visualization Framework Project Documentation (1) l l l l Annotation Introduction Chapter 1. Literature

Visualization Framework Project Documentation (1) l l l l Annotation Introduction Chapter 1. Literature Analysis Chapter 2. Algorithm Description Chapter 3. Algorithm Implementation Chapter 4. Data Model Definition Chapter 5. Implementation Transformation Chapter 6. User Interface Description Foundation for Open Project Documentations — http: //is. ifmo. ru 32

Visualization Framework Project Documentation (2) l l Chapter 7. Configuration Description Conclusions References Appendixes

Visualization Framework Project Documentation (2) l l Chapter 7. Configuration Description Conclusions References Appendixes l l l Algorithm Implementations Source Code Transformed Implementation Visualizer XML–description Generated Source Codes User Interfaces Source Codes Foundation for Open Project Documentations — http: //is. ifmo. ru 33

Visualized Algorithms l l l l l Malhotra, Kumar, Maheshwari network flow algorithm Dinic’s

Visualized Algorithms l l l l l Malhotra, Kumar, Maheshwari network flow algorithm Dinic’s network flow algorithm Hopcroft–Karp Bipartite Matching algorithm Chu–Liu shortest arborescence of a directed graph Algorithms on 2– 3 threes Bitonic salesman problem Ukkonen suffix tree construction algorithm Prim minimum spanning tree algorithm Simple strings and de Bruin cycles construction algorithms Foundation for Open Project Documentations — http: //is. ifmo. ru 34

Links l Project Examples l l l http: //is. ifmo. ru/? i 0=projects –

Links l Project Examples l l l http: //is. ifmo. ru/? i 0=projects – Projects Documentation (Russian) http: //is. ifmo. ru/? i 0=projects_en – Projects Annotations (English) http: //is. ifmo. ru/? i 0=works – Articles (Russian) http: //is. ifmo. ru/? i 0=english – Articles (English) http: //unimod. sourceforge. net/ – Uni. Mod Project Foundation for Open Project Documentations — http: //is. ifmo. ru 35