├── AdaML.puml ├── COPYING ├── README.md ├── diagram ├── deep-thought-02.aml └── self-AdaML-01.aml ├── doc ├── .gitignore ├── AdaML.org ├── AdaML.pdf ├── AdaML.puml ├── Makefile ├── README.md ├── appendix.org ├── beamerthemeAdaML.sty ├── introduction.org ├── make-AdaML.el ├── make-figures.el ├── notes.org ├── packages.org ├── reference.org └── types.org └── examples ├── .gitignore ├── floyd_tuner ├── AdaML.puml ├── README.org └── floyd_tuner.aml └── tts ├── AdaML.puml ├── README.org ├── components.aml └── old.org /AdaML.puml: -------------------------------------------------------------------------------- 1 | ' -------------------------------------------------------------------------- ' 2 | ' ' 3 | ' AdaML - Ada-tailored UML modeling Language - 0.1.2 ' 4 | ' Copyright (C) 2019, 2020 Francesc Rocher ' 5 | ' ' 6 | ' This program is free software; you can redistribute it and/or modify ' 7 | ' it under terms of the GNU General Public License as published by ' 8 | ' the Free Software Foundation, either version 3 of the Licende, or ' 9 | ' (at your option) any later version. ' 10 | ' ' 11 | ' This program is distributed in the hope that it will be useful, ' 12 | ' but WITHOUT ANY WARRANTY; without even the implied warranty of ' 13 | ' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ' 14 | ' GNU General Public License for more details. ' 15 | ' ' 16 | ' You should have received a copy of the GNU General Public License ' 17 | ' along with this program. If not, see . ' 18 | ' ' 19 | ' -------------------------------------------------------------------------- ' 20 | 21 | 'Skin parameters 22 | skinparam { 23 | arrowColor black 24 | arrowThickness 0.8 25 | boxpadding 0 26 | classAttributeIconSize 10 27 | classBackgroundColor white 28 | classBorderColor black 29 | classBorderThickness 1.3 30 | classFontSize 14 31 | classFontName CMU Bright SemiBold 32 | classHeaderBackgroundColor #dadada 33 | classHeaderBackgroundColor<< object >> #ffd700 34 | classHeaderBackgroundColor<< protected object >> #ffd700 35 | circledCharacterFontName CMU Bright SemiBold 36 | circledCharacterFontSize 12 37 | circledCharacterRadius<< access >> 5 38 | circledCharacterRadius 10 39 | componentStyle uml2 40 | defaultFontName CMU Bright Roman 41 | defaultFontSize 12 42 | genericDisplay true 43 | handwritten false 44 | monochrome false 45 | NoteBackgroundColor #ffff99 46 | NoteBorderColor #333333 47 | NoteBorderThickness .88 48 | NoteFontColor #222222 49 | NoteFontName CMU Bright Regular 50 | NoteFontSize 10 51 | NoteShadowing true 52 | NoteTextAlignment left 53 | objectBorderThickness 0.8 54 | packageBackgroundColor #f6f6f6 55 | packageStyle frame 56 | packageFontName CMU Bright Bold 57 | packageFontStyle regular 58 | packageFontSize 14 59 | padding 2 60 | shadowing false 61 | } 62 | 63 | 'Generic config 64 | allow_mixing 65 | hide empty attributes 66 | hide empty methods 67 | hide <> circle 68 | hide <> stereotype 69 | set namespaceSeparator . 70 | 71 | 'Entities Configuration 72 | !abstract_char = "A" 73 | !abstract_color = "#ff33f0" 74 | !abstract_stereotype = "" 75 | !access_association = "all" 76 | !access_char = "a" 77 | !access_color = "#f0f0f0" 78 | !access_stereotype = "access" 79 | !access_suffix = "_Access" 80 | !interface_char = "I" 81 | !interface_color = "#aaccff" 82 | !interface_stereotype = "" 83 | !package_char = "P" 84 | !package_color = "#ffff33" 85 | !package_stereotype = "" 86 | !protected_char = "#" 87 | !protected_color = "#aaccff" 88 | !protected_stereotype = "protected" 89 | !subtype_char = "S" 90 | !subtype_color = "#ffccaa" 91 | !subtype_stereotype = "" 92 | !task_char = "t" 93 | !task_color = "#9fcfbf" 94 | !task_stereotype = "" 95 | !type_char = "T" 96 | !type_color = "#ff6666" 97 | !type_stereotype = "" 98 | !subprogram_char = "s" 99 | !subprogram_color = "#99aaff" 100 | !subprogram_stereotype = "" 101 | !variable_char = "v" 102 | !variable_color = "#f0f099" 103 | !variable_stereotype = "" 104 | 105 | 'Other Configuration 106 | !depends_stereotype = "use" 107 | !array_association = "of" 108 | 109 | 'Private global variables 110 | !__mod__ = 0 111 | !__enum__ = 0 112 | !__with__ = 0 113 | !__range__ = 0 114 | !__generic__ = 0 115 | !__private__ = 0 116 | !__draw_lines__ = 0 117 | !__attr_line__ = 0 118 | !__case_line__ = 0 119 | !__method_line__ = 0 120 | !__subprogram_line__ = 0 121 | !__task_line__ = 0 122 | !__type_line__ = 0 123 | !__elements_level__ = 0 124 | !__in_package_spec__ = 0 125 | !__note_counter__ = 0 126 | 127 | '------------------------------------------------------------------------------ 128 | ' 129 | ' PRIVATE FUNCTIONS 130 | ' 131 | '------------------------------------------------------------------------------ 132 | 133 | !function __get_default(value, default_value) 134 | !if (%strlen(value) == 0) 135 | !return default_value 136 | !else 137 | !return value 138 | !endif 139 | !endfunction 140 | 141 | !function __get_visibility(name) 142 | !_ichar = %substr(name, 0, 1) 143 | !if (_ichar == "-" || _ichar == "+" || _ichar == "#") 144 | !_ichar = "" 145 | !else 146 | !if (__private__ == 0) 147 | !_ichar = "+" 148 | !else 149 | !_ichar = "-" 150 | !endif 151 | !endif 152 | !return _ichar 153 | !endfunction 154 | 155 | !function __replace(string, text, replace) 156 | !_result = string 157 | !_pos = %strpos(string, text) 158 | !if (_pos >= 0) 159 | !_result = %substr(string, 0, _pos) + replace + %substr(string, _pos + %strlen(text)) 160 | !endif 161 | !return _result 162 | !endfunction 163 | 164 | !function __str_guard(string) 165 | !_result = __replace(string, "<>", "//<>//") 166 | !return _result 167 | !endfunction 168 | 169 | !procedure __reset() 170 | !__mod__ = 0 171 | !__enum__ = 0 172 | !__with__ = 0 173 | !__range__ = 0 174 | !__generic__ = 0 175 | !__private__ = 0 176 | !__draw_lines__ = 0 177 | !__attr_line__ = 0 178 | !__case_line__ = 0 179 | !__method_line__ = 0 180 | !__subprogram_line__ = 0 181 | !__task_line__ = 0 182 | !__type_line__ = 0 183 | !__elements_level__ = 0 184 | !endprocedure 185 | 186 | !procedure __detail(line, name, spec) 187 | !if (line == 0) 188 | .. name .. 189 | !endif 190 | ** ** spec 191 | !endprocedure 192 | 193 | !procedure __attr_line() 194 | !if (__draw_lines__ == 1 && __attr_line__ == 0) 195 | !__attr_line__ = 1 196 | -- 197 | !endif 198 | !endprocedure 199 | 200 | !procedure __case_line() 201 | !if (__case_line__ == 0) 202 | !__draw_lines__ = 1 203 | !__case_line__ = 1 204 | !__attr_line__ = 1 205 | !__method_line__ = 0 206 | .. case .. 207 | !endif 208 | !endprocedure 209 | 210 | !procedure __method_line() 211 | !if (__draw_lines__ == 1 && __method_line__ == 0) 212 | !__method_line__ = 1 213 | -- 214 | !endif 215 | !endprocedure 216 | 217 | !procedure __subprogram_line() 218 | !if (__subprogram_line__ == 0) 219 | !__draw_lines__ = 1 220 | !__subprogram_line__ = 1 221 | -- subprograms -- 222 | !endif 223 | !endprocedure 224 | 225 | !procedure __task_line() 226 | !if (__task_line__ == 0) 227 | !__draw_lines__ = 1 228 | !__task_line__ = 1 229 | -- tasks -- 230 | !endif 231 | !endprocedure 232 | 233 | !procedure __type_line() 234 | !if (__type_line__ == 0) 235 | !__draw_lines__ = 1 236 | !__type_line__ = 1 237 | -- types -- 238 | !endif 239 | !endprocedure 240 | 241 | !procedure __declare_entity(char, color, name, stereotype="", pre="", post="") 242 | __reset() 243 | !if (%strlen(char) == 0) 244 | hide name circle 245 | !if (%strlen(stereotype) == 0) 246 | pre class name post 247 | !else 248 | pre class name <> post 249 | !endif 250 | !else 251 | pre class name <<(char, color) stereotype>> post 252 | !endif 253 | !endprocedure 254 | 255 | !procedure __begin_entity(char, color, name, stereotype="", pre="", post="") 256 | __reset() 257 | !__elements_level__ = 1 258 | !if (%strlen(char) == 0) 259 | pre class name <> post { 260 | !else 261 | pre class name <<(char, color) stereotype>> post { 262 | !endif 263 | !endprocedure 264 | 265 | !procedure __check_type(name) 266 | !if (%strpos("types:Ada.Character,Ada.Boolean,Ada.Integer,Ada.Natural,Ada.Positive,Ada.String", name) > 0) 267 | !if (%not(%variable_exists("__type_" + name))) 268 | %set_variable_value("__type_" + name, 1) 269 | __declare_entity("T", type_color, name) 270 | !endif 271 | !endif 272 | !endprocedure 273 | 274 | !procedure __type_new(type1, type2, comment="", note="") 275 | __reset() 276 | !if (%strlen(comment) == 0) 277 | type1 ^-- type2 278 | !else 279 | type1 ^-- type2 : comment 280 | !endif 281 | !endprocedure 282 | 283 | !function __check_array(name, stereotype) 284 | !if (%variable_exists("__array_" + name)) 285 | !if (%strlen(stereotype) == 0) 286 | !stereotype = "array" 287 | !else 288 | !stereotype = "array " + stereotype 289 | !endif 290 | !endif 291 | !return stereotype 292 | !endfunction 293 | 294 | '------------------------------------------------------------------------------ 295 | ' 296 | ' PUBLIC FUNCTIONS 297 | ' 298 | '------------------------------------------------------------------------------ 299 | 300 | !procedure begin_package_spec(name, stereotype="") 301 | !__in_package_spec__ = 1 302 | !stereotype = __get_default(stereotype, package_stereotype) 303 | !$p_name_is = "package " + name + " is" 304 | !if (%strlen(stereotype) == 0) 305 | package "$p_name_is" { 306 | !else 307 | package "$p_name_is" <> { 308 | !endif 309 | !endprocedure 310 | 311 | 'Component view functions 312 | !procedure package(name, stereotype="") 313 | !stereotype = __get_default(stereotype, package_stereotype) 314 | __declare_entity(package_char, package_color, name, __str_guard(stereotype)) 315 | !endprocedure 316 | 317 | !procedure abstract(name, stereotype="") 318 | !stereotype = __get_default(stereotype, abstract_stereotype) 319 | __declare_entity(abstract_char, abstract_color, name, __str_guard(stereotype)) 320 | !endprocedure 321 | 322 | !procedure interface(name, stereotype="") 323 | !stereotype = __get_default(stereotype, interface_stereotype) 324 | __declare_entity(interface_char, interface_color, name, __str_guard(stereotype)) 325 | !endprocedure 326 | 327 | !procedure subtype(name, stereotype="") 328 | !stereotype = __get_default(stereotype, subtype_stereotype) 329 | __declare_entity(subtype_char, subtype_color, name, __check_array(name, __str_guard(stereotype))) 330 | !endprocedure 331 | 332 | !procedure task(name, stereotype="") 333 | !if (__elements_level__) 334 | __task_line() 335 | !if (%strlen(stereotype) == 0) 336 | __get_visibility(name) {method} name 337 | !else 338 | __get_visibility(name) {method} name : stereotype 339 | !endif 340 | !else 341 | !stereotype = __get_default(stereotype, task_stereotype) 342 | __declare_entity(task_char, task_color, name, __str_guard(stereotype)) 343 | !endif 344 | !endprocedure 345 | 346 | !procedure type(name, stereotype="") 347 | !if (__elements_level__) 348 | __type_line() 349 | !if (%strlen(stereotype) == 0) 350 | __get_visibility(name) name 351 | !else 352 | __get_visibility(name) name : stereotype 353 | !endif 354 | !else 355 | !stereotype = __get_default(stereotype, type_stereotype) 356 | __declare_entity(type_char, type_color, name, __check_array(name, __str_guard(stereotype))) 357 | !endif 358 | !endprocedure 359 | 360 | !procedure type_access(type, suffix="", stereotype="") 361 | !suffix = __get_default(suffix, access_suffix) 362 | !stereotype = __get_default(stereotype, access_stereotype) 363 | !type_access = type + suffix 364 | __declare_entity(access_char, access_color, type_access, __str_guard(stereotype)) 365 | !if (%strlen(access_association) == 0) 366 | type <.. type_access 367 | !else 368 | type <.. type_access : access_association 369 | !endif 370 | !endprocedure 371 | 372 | !procedure type_new(type, name, stereotype="", comment="", note="") 373 | !stereotype = __get_default(stereotype, type_stereotype) 374 | __check_type(type) 375 | __declare_entity(type_char, type_color, name, __check_array(name, __str_guard(stereotype))) 376 | __type_new(type, name, comment, note) 377 | !endprocedure 378 | 379 | !procedure type_protected(name, stereotype="") 380 | !stereotype = __get_default(stereotype, protected_stereotype) 381 | __declare_entity(protected_char, protected_color, name, __str_guard(stereotype)) 382 | !endprocedure 383 | 384 | !procedure type_task(name, stereotype="") 385 | !stereotype = __get_default(stereotype, task_stereotype) 386 | __declare_entity(task_char, task_color, name, __str_guard(stereotype)) 387 | !endprocedure 388 | 389 | !procedure object_protected(name, stereotype="") 390 | !stereotype = __get_default(stereotype, protected_stereotype) 391 | __declare_entity("", "", name, "object") 392 | !endprocedure 393 | 394 | 'Code view functions 395 | !procedure begin_package(name, stereotype="") 396 | !stereotype = __get_default(stereotype, package_stereotype) 397 | __begin_entity(package_char, package_color, name, __str_guard(stereotype)) 398 | !endprocedure 399 | 400 | !procedure begin_abstract(name, stereotype="") 401 | !stereotype = __get_default(stereotype, abstract_stereotype) 402 | __begin_entity(abstract_char, abstract_color, name, __str_guard(stereotype), "abstract") 403 | !endprocedure 404 | 405 | !procedure begin_interface(name, stereotype="") 406 | !stereotype = __get_default(stereotype, interface_stereotype) 407 | __begin_entity(interface_char, interface_color, name, __str_guard(stereotype)) 408 | !endprocedure 409 | 410 | !procedure begin_subtype(name, stereotype="") 411 | !stereotype = __get_default(stereotype, subtype_stereotype) 412 | __begin_entity(subtype_char, subtype_color, name, __check_array(name, __str_guard(stereotype))) 413 | !endprocedure 414 | 415 | !procedure begin_type(name, stereotype="") 416 | !stereotype = __get_default(stereotype, type_stereotype) 417 | __begin_entity(type_char, type_color, name, __check_array(name, __str_guard(stereotype))) 418 | !endprocedure 419 | 420 | !procedure begin_type_new(type, name, stereotype="", comment="", note="") 421 | !stereotype = __get_default(stereotype, type_stereotype) 422 | __check_type(type) 423 | __type_new(type, name, comment, note) 424 | __begin_entity(type_char, type_color, name, __check_array(name, __str_guard(stereotype))) 425 | !endprocedure 426 | 427 | !procedure begin_type_protected(type, name, stereotype="", comment="", note="") 428 | !stereotype = __get_default(stereotype, protected_stereotype) 429 | __check_type(type) 430 | __type_new(type, name, comment, note) 431 | __begin_entity(protected_char, protected_color, name, __check_array(name, __str_guard(stereotype))) 432 | !endprocedure 433 | 434 | !procedure begin_object_protected(name, stereotype="") 435 | !stereotype = __get_default(stereotype, protected_stereotype) 436 | hide name circle 437 | __begin_entity("", "", name, "protected object") 438 | !endprocedure 439 | 440 | !procedure end() 441 | !__elements_level__ = 0 442 | !__in_package_spec__ = 0 443 | } 444 | !endprocedure 445 | 446 | 'Details, attributes, constants and objects 447 | 'use access=0 for 'private', access=1 for 'public' 448 | !procedure mod(spec) 449 | __detail(__mod__, "mod", spec) 450 | !__mod__ = 1 451 | !__draw_lines__ = 1 452 | !endprocedure 453 | 454 | !procedure enum(spec) 455 | ' __detail(__enum__, "enum", "(" + spec + ")" ) 456 | __detail(__enum__, "enum", spec) 457 | !__enum__ = 1 458 | !__draw_lines__ = 1 459 | !endprocedure 460 | 461 | !procedure with(spec) 462 | __detail(__with__, "with", spec) 463 | !__with__ = 1 464 | !__draw_lines__ = 1 465 | !endprocedure 466 | 467 | !procedure range(spec="<>") 468 | __detail(__range__, "range", __str_guard(spec)) 469 | !__range__ = 1 470 | !__draw_lines__ = 1 471 | !endprocedure 472 | 473 | !procedure generic_with(spec) 474 | __detail(__generic__, "generic with", spec) 475 | !__generic__ = 1 476 | !__draw_lines__ = 1 477 | !endprocedure 478 | 479 | !procedure case(spec="") 480 | !if (spec == "") 481 | .... 482 | !else 483 | __case_line() 484 | when spec => 485 | !endif 486 | !endprocedure 487 | 488 | !procedure private() 489 | !__private__ = 1 490 | !endprocedure 491 | 492 | !procedure public() 493 | !__private__ = 0 494 | !endprocedure 495 | 496 | !procedure attribute(name, type, defval="") 497 | __attr_line() 498 | !if (%strlen(defval) == 0) 499 | __get_visibility(name) {field} name : type 500 | !else 501 | __get_visibility(name) {field} name : type := defval 502 | !endif 503 | !endprocedure 504 | 505 | ' variable function can be used in code and component views 506 | ' code view: argv1 => type, argv2 => defval="" 507 | ' comp. view: argv1 => stereotype="" 508 | !procedure variable(name, argv1="", argv2="") 509 | !assert (__elements_level__ == 0 || argv1 != "") : "type cannot be empty" 510 | !if (__elements_level__) 511 | attribute(name, argv1, argv2) 512 | !else 513 | !stereotype = __get_default(argv1, variable_stereotype) 514 | __declare_entity(variable_char, variable_color, name, __str_guard(argv2)) 515 | !endif 516 | !endprocedure 517 | 518 | !procedure constant(name, type, value, aliased=0) 519 | !__attr_line() 520 | !if (aliased == 1) 521 | !als_str = "aliased" 522 | !else 523 | !als_str = "" 524 | !endif 525 | !if (%strpos(type, "String") >= 0) 526 | __get_visibility(name) {field} name : constant als_str type := "value" 527 | !else 528 | __get_visibility(name) {field} name : constant als_str type := value 529 | !endif 530 | !endprocedure 531 | 532 | !procedure protected_object(name) 533 | __get_visibility(name) {field} name 534 | !endprocedure 535 | 536 | !procedure subprogram(name, stereotype="") 537 | !if (__in_package_spec__ == 1) 538 | !stereotype = __get_default(stereotype, type_stereotype) 539 | __declare_entity(subprogram_char, subprogram_color, name, __str_guard(stereotype)) 540 | !endif 541 | !endprocedure 542 | 543 | !procedure procedure(name, args="") 544 | __method_line() 545 | !if (%strlen(args) == 0) 546 | __get_visibility(name) {method} name 547 | !else 548 | __get_visibility(name) {method} name (args) 549 | !endif 550 | !endprocedure 551 | 552 | !procedure function(name, args, return) 553 | __method_line() 554 | !if (%strlen(args) == 0) 555 | __get_visibility(name) {method} name : return 556 | !else 557 | __get_visibility(name) {method} name (args) : return 558 | !endif 559 | !endprocedure 560 | 561 | 'Associations 562 | !procedure has(owner, element) 563 | owner --> element 564 | !endprocedure 565 | 566 | !procedure owns(owner, element) 567 | owner *--> element 568 | !endprocedure 569 | 570 | !procedure is(object, type) 571 | object -- type 572 | !endprocedure 573 | 574 | !procedure depends(client, supplier, stereotype="") 575 | !stereotype = __get_default(stereotype, depends_stereotype) 576 | !arrow = "" 577 | !len = %strlen(stereotype) 578 | !if (len < 2) 579 | client ..> supplier 580 | !else 581 | !len = len - 2 582 | !arrow = %substr(stereotype, len, 2) 583 | !if (arrow != " >") && (arrow != " <") 584 | client ..> supplier : stereotype 585 | !else 586 | client .. supplier : stereotype 587 | !endif 588 | !endif 589 | !endprocedure 590 | 591 | !procedure array(array_type, element_type, association=array_association) 592 | %set_variable_value("__array_" + array_type, 1) 593 | !if (%strlen(association) == 0) 594 | array_type +--> element_type 595 | !else 596 | array_type +--> element_type : association 597 | !endif 598 | !endprocedure 599 | 600 | 'Notes 601 | ' 602 | 'Behaviour depending on the number of parameter supplied 603 | ' arg1 --> floating note, arg1=Comment 604 | ' arg1+2 --> note on an entity arg1=Entity, arg2=Comment 605 | ' --> new note created if arg1 is numeric 606 | !procedure note(arg1, arg2="") 607 | !if (%strlen(arg2) == 0) 608 | !__note_counter__ = __note_counter__ + 1 609 | !cntr = "__note__" + __note_counter__ 610 | note "arg1" as cntr 611 | !else 612 | note arg1 : arg2 613 | !endif 614 | !endprocedure 615 | 616 | !procedure note_numbered(note, number) 617 | !note_name = "Note_" + number 618 | note "note" as note_name 619 | !endprocedure 620 | 621 | !procedure link(arg1, arg2) 622 | arg1 .. arg2 623 | !endprocedure 624 | 625 | 'Geometry hints 626 | !procedure left_right(obj0, obj1, obj2="", obj3="", obj4="", obj5="", obj6="", obj7="", obj8="", obj9="") 627 | obj0 -[hidden]right- obj1 628 | !if (%strlen(obj2) > 0) 629 | obj1 -[hidden]right- obj2 630 | !endif 631 | !if (%strlen(obj3) > 0) 632 | obj2 -[hidden]right- obj3 633 | !endif 634 | !if (%strlen(obj4) > 0) 635 | obj3 -[hidden]right- obj4 636 | !endif 637 | !if (%strlen(obj5) > 0) 638 | obj4 -[hidden]right- obj5 639 | !endif 640 | !if (%strlen(obj6) > 0) 641 | obj5 -[hidden]right- obj6 642 | !endif 643 | !if (%strlen(obj7) > 0) 644 | obj6 -[hidden]right- obj7 645 | !endif 646 | !if (%strlen(obj8) > 0) 647 | obj7 -[hidden]right- obj8 648 | !endif 649 | !if (%strlen(obj9) > 0) 650 | obj8 -[hidden]right- obj9 651 | !endif 652 | !endprocedure 653 | 654 | !procedure top_down(obj0, obj1, obj2="", obj3="", obj4="", obj5="", obj6="", obj7="", obj8="", obj9="") 655 | obj0 -[hidden]down- obj1 656 | !if (%strlen(obj2) > 0) 657 | obj1 -[hidden]down- obj2 658 | !endif 659 | !if (%strlen(obj3) > 0) 660 | obj2 -[hidden]down- obj3 661 | !endif 662 | !if (%strlen(obj4) > 0) 663 | obj3 -[hidden]down- obj4 664 | !endif 665 | !if (%strlen(obj5) > 0) 666 | obj4 -[hidden]down- obj5 667 | !endif 668 | !if (%strlen(obj6) > 0) 669 | obj5 -[hidden]down- obj6 670 | !endif 671 | !if (%strlen(obj7) > 0) 672 | obj6 -[hidden]down- obj7 673 | !endif 674 | !if (%strlen(obj8) > 0) 675 | obj7 -[hidden]down- obj8 676 | !endif 677 | !if (%strlen(obj9) > 0) 678 | obj8 -[hidden]down- obj9 679 | !endif 680 | !endprocedure 681 | -------------------------------------------------------------------------------- /COPYING: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | Copyright (C) 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Quick Introduction 2 | 3 | ### AdaML Diagram 4 | This AdaML diagram describes AdaML itself, including relationships between 5 | PlatUML, UML and Ada *packages*. This diagram has been generated, in turn, with 6 | AdaML. See below the AdaML source code. 7 | 8 |

9 | 10 |

11 | 12 |
13 | AdaML Source Code   — click to expand 14 |
 15 | !include https://raw.github.com/rocher/AdaML/release/0.1.2/AdaML.puml
 16 | scale 600 width
 17 | 
 18 | package("AdaML")
 19 | package("PlantUML")
 20 | package("Ada")
 21 | package("UML")
 22 | 
 23 | owns("AdaML", "PlantUML")
 24 | depends("AdaML", "Ada", "tailored")
 25 | depends("AdaML", "UML", "draws")
 26 | 
 27 | note("AdaML draws Ada-tailored\nUML diagrams based on\nPlantUML")
 28 | 
 29 | left_right("PlantUML", "UML")
 30 | left_right("UML", "Ada")
 31 | 
32 |
33 | 34 | ### Doc 35 | For more information and examples, download 36 | [AdaML.pdf](https://raw.github.com/rocher/AdaML/release/0.1.2/doc/AdaML.pdf) or 37 | [read online](https://github.com/rocher/AdaML/blob/release/0.1.2/doc/AdaML.pdf) 38 | in GitHub. 39 | 40 | # Introduction 41 | 42 | ### What is AdaML? 43 | - UML tailored for Ada 2012 programming language 44 | - A modeling language to draw UML diagrams, implemented in PlantUML 45 | - An easy way to learn Ada through the use of UML and OOP concepts 46 | 47 | ### Features 48 | - UML tailored to use and show particular Ada language characteristics 49 | - Coherent set of functions to design software components for Ada 50 | - Generates high quality drawings (ps, eps) easy to embedded in other docs 51 | - Easy to learn by example, both AdaML and Ada language 52 | 53 | ### What is /not/ AdaML? 54 | - A model-based tool to generate Ada code 55 | - A reverse engineering tool to draw UML diagrams from Ada code 56 | - An interactive UML modeling or drawing tool 57 | 58 | # Local Usage 59 | AdaML must be used locally to get quality graphics. You can generate diagrams in 60 | `eps` format that can be embedded in LaTeX docs. 61 | 62 | ### Requirements 63 | - [PlantUML](https://plantuml.com) installed and working in your system 64 | - The AdaML files, check [AdaML](https://github.com/rocher/AdaML) installation 65 | instructions 66 | - Your favorite text editor, preferably with PlantUML support (e.g. Emacs) 67 | - Check the list of [supported editors](http://plantuml.com/running) 68 | - For better visualization and integration with LaTeX, [computer 69 | modern](https://www.fontsquirrel.com/fonts/computer-modern) fonts 70 | 71 | # Online Usage 72 | ### Online Version - Quick Start 73 | - Open [PlantUML Previewer](http://sujoyu.github.io/plantuml-previewer) or 74 | [PlantText](https://www.planttext.com/) editor 75 | - Remove default lines and paste the following code: 76 | 77 | ``` 78 | !include https://raw.github.com/rocher/AdaML/release/0.1.2/AdaML.puml 79 | scale 300 width 80 | 81 | begin_type("Pan_Dimensional") 82 | procedure("Ask_The_Question", "in out Natural") 83 | end() 84 | 85 | begin_package("Deep_Thought") 86 | function("Answer_The_Question", "", "Natural") 87 | private() 88 | variable("The_Answer", "Natural", 42) 89 | end() 90 | 91 | depends("Pan_Dimensional", "Deep_Thought", "ask >") 92 | ``` 93 | 94 | ### Embed Diagrams in GitHub 95 | This is an example of the AdaML documentation: 96 | 97 |

98 | 99 |

100 | 101 | - Check the [raw version](https://raw.github.com/rocher/AdaML/develop/README.md) 102 | of this `README.md` file to see the image link used (plus how to easily center 103 | images in GitHub) 104 | - The AdaML source code can be found in GitHub: 105 | [deep-thought-02.aml](https://raw.github.com/rocher/AdaML/develop/diagram/deep-thought-02.aml) 106 | 107 | # ChangeLog 108 | ### Release 0.1.2 109 | 110 | + Adapt to new PlantUML interface 111 | 112 | ### Release 0.1.1 113 | 114 | + Scaled images of `REAME.md` file 115 | + AdaML file extension changed to `*.aml` 116 | 117 |
118 | Older Releases   — click to expand 119 | 120 | ### Release 0.1.0 121 | 122 | + First public release 123 | 124 |
125 | -------------------------------------------------------------------------------- /diagram/deep-thought-02.aml: -------------------------------------------------------------------------------- 1 | @startuml 2 | 3 | !include https://raw.github.com/rocher/AdaML/master/AdaML.puml 4 | scale 300 width 5 | 6 | begin_type("Pan_Dimensional") 7 | procedure("Ask_The_Question", "in out Natural") 8 | end() 9 | 10 | begin_package("Deep_Thought") 11 | function("Answer_The_Question", "", "Natural") 12 | private() 13 | variable("The_Answer", "Natural", 42) 14 | end() 15 | 16 | depends("Pan_Dimensional", "Deep_Thought", "ask") 17 | 18 | @enduml 19 | -------------------------------------------------------------------------------- /diagram/self-AdaML-01.aml: -------------------------------------------------------------------------------- 1 | @startuml 2 | 3 | !include https://raw.github.com/rocher/AdaML/master/AdaML.puml 4 | scale 600 width 5 | 6 | package("AdaML") 7 | package("PlantUML") 8 | package("Ada") 9 | package("UML") 10 | 11 | owns("AdaML", "PlantUML") 12 | depends("AdaML", "Ada", "tailored") 13 | depends("AdaML", "UML", "draws") 14 | 15 | note("AdaML draws Ada-tailored\nUML diagrams based on\nPlantUML") 16 | 17 | left_right("PlantUML", "UML") 18 | left_right("UML", "Ada") 19 | 20 | @enduml -------------------------------------------------------------------------------- /doc/.gitignore: -------------------------------------------------------------------------------- 1 | auto/ 2 | _minted-AdaML/ 3 | *.tex 4 | *.tex~ 5 | *.pdf 6 | !AdaML.pdf 7 | *.eps 8 | .pdf-view-restore 9 | -------------------------------------------------------------------------------- /doc/AdaML.org: -------------------------------------------------------------------------------- 1 | #+TITLE: AdaML 2 | # -- version settings 3 | #+MACRO: gitbranch 0.1.2 4 | #+MACRO: version 0.1.2 5 | #+LATEX_HEADER: \newcommand{\AdaMLVersion}{ 0.1.2 } 6 | # -- subtitle settings 7 | #+LATEX_HEADER: \newcommand{\PDFSubtitle}{Ada tailored UML Modeling Language} 8 | #+LATEX_HEADER: \newcommand{\AdaMLSubtitle}{\vspace{.77cm}\ding{125}\ \textit{Ada-tailored UML\newline Modeling Language} \ding{126}\vspace{1cm}} 9 | # -- 10 | #+AUTHOR: Francesc Rocher 11 | #+EMAIL: francesc.rocher@gmail.com 12 | #+KEYWORDS: AdaML, Ada, UML, PlantUML 13 | #+LANGUAGE: en 14 | #+OPTIONS: H:2 num:t toc:nil \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t 15 | #+OPTIONS: TeX:t LaTeX:t skip:nil d:nil todo:t pri:nil view:nil ltoc:t mouse:underline buttons:0 16 | #+EXPORT_SELECT_TAGS: export 17 | #+EXPORT_EXCLUDE_TAGS: noexport 18 | #+LINK_UP: 19 | #+LINK_HOME: 20 | #+STARTUP: beamer 21 | #+LATEX_CLASS: beamer 22 | #+BEAMER_THEME: AdaML 23 | #+LATEX_HEADER: \usepackage{fancyvrb} 24 | #+LATEX_HEADER: \usepackage{minted} 25 | #+LATEX_HEADER: \usepackage{pifont} 26 | #+LATEX_HEADER: \newcommand{\insertdoctype}{Overview} 27 | #+LATEX_HEADER: \hypersetup{colorlinks=true,linkcolor=orange} 28 | #+LATEX_HEADER: \DefineVerbatimEnvironment{verbatim}{Verbatim}{fontsize=\scriptsize} 29 | #+LATEX_HEADER: \definecolor{ForestGreen}{HTML}{22AB22} 30 | #+LATEX_HEADER: \definecolor{Grey}{HTML}{808080} 31 | #+LATEX_HEADER: \definecolor{RubinRed}{HTML}{CB111E} 32 | #+LATEX_HEADER: \newcommand{\cmark}{{\color{ForestGreen}\ \ \ding{51}}\ }% 33 | #+LATEX_HEADER: \newcommand{\qmark}{{\color{Grey}\ \ \ding{93}}\ }% 34 | #+LATEX_HEADER: \newcommand{\xmark}{{\color{RubinRed}\ \ \ding{55}}\ \ }% 35 | #+COLUMNS: %40ITEM %10BEAMER_env(Env) %9BEAMER_envargs(Env Args) %4BEAMER_col(Col) %10BEAMER_extra(Extra) 36 | #+PROPERTY: header-args :eval never-export :cache yes 37 | 38 | \setminted{fontsize=\scriptsize} 39 | 40 | #+INCLUDE: "introduction.org" 41 | #+INCLUDE: "packages.org" 42 | #+INCLUDE: "types.org" 43 | #+INCLUDE: "notes.org" 44 | # TODO +INCLUDE: "associations.org" 45 | #+INCLUDE: "appendix.org" 46 | 47 | * Pending :noexport: 48 | #+INCLUDE: "reference.org" 49 | 50 | * Config :noexport: 51 | Local Variables: 52 | org-confirm-babel-evaluate: nil 53 | compile-command: "make AdaML.pdf" 54 | End: 55 | 56 | # export to pdf evaluating this: 57 | (org-beamer-export-to-pdf) 58 | -------------------------------------------------------------------------------- /doc/AdaML.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocher/AdaML/83353a57dff1603bea179c749d58f5aadb5c8fda/doc/AdaML.pdf -------------------------------------------------------------------------------- /doc/AdaML.puml: -------------------------------------------------------------------------------- 1 | ../AdaML.puml -------------------------------------------------------------------------------- /doc/Makefile: -------------------------------------------------------------------------------- 1 | PLANTUML_JAR_PATH = "/usr/local/bin/plantuml.jar" 2 | ORG_FILES = $(shell ls *org) 3 | FIGURES = $(shell sed -e '/begin_src.*plantuml/!D' -e '/begin_src.*plantuml/s/^.*:file //' *.org) 4 | FIGURE_DIRS = $(shell sed -e '/begin_src.*plantuml/!D' -e '/begin_src.*plantuml/s/^.*:file //' *.org | xargs -I{} dirname "{}" | uniq) 5 | 6 | all: all-figures AdaML.pdf 7 | 8 | AdaML.pdf: *.org *.sty 9 | @EMACSLOADPATH="$$PWD:" emacs --batch $< -l make-AdaML.el 10 | 11 | all-figures: $(FIGURE_DIRS:%=figures-%) 12 | 13 | figures-%: %.org 14 | @test -d $* || mkdir $*; \ 15 | EMACSLOADPATH="$$PWD:" PLANTUML_JAR_PATH="$(PLANTUML_JAR_PATH)" emacs --batch $< -l make-figures 16 | 17 | clean: 18 | $(RM) -rf _minted-AdaML auto $(FIGURE_DIRS) 19 | -------------------------------------------------------------------------------- /doc/README.md: -------------------------------------------------------------------------------- 1 | # Documentation 2 | 3 | Please read the `pdf` file in this directory. 4 | -------------------------------------------------------------------------------- /doc/appendix.org: -------------------------------------------------------------------------------- 1 | * Appendix 2 | ** Release 3 | *** Status 4 | + AdaML is available under the terms of the GPLv3 License 5 | + Current release is =0.1.2= 6 | 7 | *** ChangeLog 8 | + First public release including everything you see in this overview document 9 | 10 | ** TODO 11 | *** Static behavior 12 | + There are still a number of features to document and under development, like 13 | relationships, protected objects, task entries, arrays, etc.. 14 | 15 | *** Dynamic behavior 16 | + Next releases will include interaction diagrams like sequence diagrams, 17 | activity diagrams, state machine diagrams or timing diagrams 18 | 19 | ** Feedback Welcome 20 | + Send comments, feedback or suggestions using the issues page of the AdaML 21 | GitHub repository: [[http://github.com/rocher/AdaML/issues]] 22 | + Remember to specify the release number you are referring to in you 23 | comments\newline 24 | + Don't hesitate to contact the author in case you need help 25 | -------------------------------------------------------------------------------- /doc/beamerthemeAdaML.sty: -------------------------------------------------------------------------------- 1 | \DeclareOptionBeamer{compress}{\beamer@compresstrue} 2 | \ProcessOptionsBeamer 3 | 4 | \mode 5 | 6 | \useoutertheme[subsection=false,footline=authortitle]{miniframes} 7 | \usecolortheme{whale} 8 | 9 | \setbeamercolor{titlelike}{parent=structure} 10 | 11 | %% remove small circles of the headline 12 | %% 13 | %\setbeamertemplate{headline} 14 | %{% 15 | % \begin{beamercolorbox}[ht=3.5ex,dp=1ex,% 16 | % leftskip=.3cm,rightskip=.3cm plus1fil]{section in head/foot} 17 | % \insertsectionhead 18 | % \end{beamercolorbox}% 19 | %} 20 | 21 | \setbeamertemplate{footline} 22 | { 23 | \leavevmode% 24 | \hbox{% 25 | \begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.5ex,dp=1ex,center]{title in head/foot}% 26 | \usebeamerfont{title in head/foot}\insertshorttitle\ \ \textendash\ \AdaMLVersion 27 | \end{beamercolorbox}% 28 | \begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.5ex,dp=1ex,center]{author in head/foot}% 29 | \usebeamerfont{author in head/foot}\insertdoctype 30 | \end{beamercolorbox}% 31 | \begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.5ex,dp=1ex,right]{date in head/foot}% 32 | \usebeamerfont{date in head/foot}\insertshortdate{}\hspace*{2em} 33 | \insertframenumber{} / \inserttotalframenumber\hspace*{2ex} 34 | \end{beamercolorbox}}% 35 | \vskip0pt% 36 | } 37 | 38 | %% redefined commands 39 | %% original definitions at file beamerbasetitle.sty 40 | \renewcommand{\title}{\@dblarg\beamer@title} 41 | \long\def\beamer@title[#1]#2{% 42 | \def\inserttitle{\textbf{#2}}% 43 | \def\beamer@shorttitle{#1}% 44 | } 45 | \title{} 46 | 47 | \renewcommand{\subtitle}{\@dblarg\beamer@subtitle} 48 | \long\def\beamer@subtitle[#1]#2{% 49 | \def\insertsubtitle{\AdaMLSubtitle} 50 | } 51 | \subtitle{} 52 | 53 | 54 | \ifbeamer@autopdfinfo% 55 | \g@addto@macro\beamer@firstminutepatches 56 | { 57 | \begingroup 58 | \let\thanks=\@gobble% 59 | \hypersetup{pdftitle={\inserttitle\ifx\PDFSubtitle\@empty\else\ - \PDFSubtitle\fi}} 60 | \endgroup 61 | } 62 | \fi% 63 | 64 | %% redefined commands end 65 | 66 | %% inserts a shaded/highlighted outline at the beginning of sections 67 | %% 68 | % \AtBeginSection[]{ 69 | % \setbeamercolor{section in toc shaded}{use=structure,fg=structure.fg} 70 | % \setbeamercolor{section in toc}{fg=mycolor} 71 | % \setbeamercolor{subsection in toc shaded}{fg=black} 72 | % \setbeamercolor{subsection in toc}{fg=mycolor} 73 | % \setbeamercolor{subsubsection in toc shaded}{fg=black} 74 | % \setbeamercolor{subsubsection in toc}{fg=mycolor} 75 | % \frame{ 76 | % \frametitle{Outline} 77 | % \setcounter{tocdepth}{3} 78 | % \tableofcontents[ 79 | % sectionstyle=show/shaded, 80 | % subsectionstyle=show/show/shaded, 81 | % subsubsectionstyle=show/show/show/shaded 82 | % ] 83 | % } 84 | %} 85 | 86 | \mode 87 | 88 | -------------------------------------------------------------------------------- /doc/introduction.org: -------------------------------------------------------------------------------- 1 | * Introduction 2 | ** What is =AdaML=? 3 | - A modeling language to draw UML diagrams 4 | - UML tailored for Ada 2012 programming language 5 | - Small, extensible tool implemented on top of PlantUML 6 | 7 | ** What is /not/ =AdaML=? 8 | - A model-based tool to generate Ada code 9 | - A reverse engineering tool to draw UML diagrams from existing Ada code 10 | - An GUI-based UML modeling or drawing tool 11 | 12 | ** Features 13 | - Coherent set of functions to describe components 14 | - Syntax resembling Ada 15 | - High quality drawings (=eps=) to embed in other docs 16 | - =svg= graphics for additional editing (e.g., [[https://inkscape.org/][inkscape]]) 17 | - Online generated diagrams for online docs (e.g., GitHub) 18 | - Easy to learn by example, both =AdaML= and Ada language 19 | 20 | ** Online Version - Quick Start 21 | - Open [[http://sujoyu.github.io/plantuml-previewer][PlantUML Previewer]] or [[https://www.planttext.com/][PlantText]] editor 22 | - Remove default lines and paste the following code: 23 | 24 | #+begin_example 25 | !include https://raw.github.com/rocher/AdaML/release/0.1.2/AdaML.puml 26 | begin_type("Pan_Dimensional") 27 | procedure("Ask_The_Question", "in out Natural") 28 | end() 29 | 30 | begin_package("Deep_Thought") 31 | function("Answer_The_Question", "", "Natural") 32 | private() 33 | variable("The_Answer", "Natural", 42) 34 | end() 35 | 36 | depends("Pan_Dimensional", "Deep_Thought", "ask") 37 | #+end_example 38 | 39 | ** Online Version - Test Examples 40 | In case you want to test the examples in this doc 41 | 42 | - Visit one of the several available PlantUML online servers 43 | - Copy and paste the =AdaML= code shown in the examples 44 | - Replace the line '=!include AdaML.puml=' with\newline \newline 45 | \scriptsize{!include https://raw.github.com/rocher/AdaML/release/0.1.2/AdaML.puml} 46 | \newline 47 | *** Warning 48 | Depending on the PlantUML version used in the web site you can obtain different 49 | graphical results 50 | 51 | ** Local Version - Requirements 52 | In case you want to integrate results in your local docs 53 | 54 | - [[https://plantuml.com][=PlantUML=]] installed and working in your system 55 | - =AdaML.puml= file, check [[https://github.com/rocher/AdaML][=AdaML=]] releases 56 | - Your favorite text editor with =PlantUML= support (e.g. Emacs) 57 | - Check the list of [[http://plantuml.com/running][supported editors]] 58 | - For better visualization and integration with \LaTeX\_ and other formats, 59 | [[https://www.fontsquirrel.com/fonts/computer-modern][computer modern]] fonts 60 | 61 | ** Pros & Cons 62 | - Online Version :: 63 | \cmark Quick and easy to test\newline 64 | \cmark Same code can be embedded in online docs\newline 65 | \qmark Bitmap graphics; =svg= in PlantText\newline 66 | \xmark No file saved, no backups\newline 67 | \xmark PlantUML version may change without notice, affecting graphical results, layout, style or other incompatibilities\newline 68 | - Local Version :: 69 | \cmark Best graphical results to embed in other docs (=eps=)\newline 70 | \cmark Consistent graphical results over time, if no version changed\newline 71 | \xmark Requires PlantUML up and running 72 | 73 | ** Document Conventions 74 | In this document 75 | 76 | - Entities :: are /classifiers/, in UML terminology, that correspond to Ada 77 | packages, types, records, arrays, subtypes, tasks and protected 78 | objects 79 | 80 | - Elements :: are /features/, in UML terminology, that correspond to Ada record 81 | members, functions and procedures 82 | 83 | - Specifiers :: are Ada constructions, like type discriminant or range 84 | specifications (e.g, =range 1..1024=) that can appear in some 85 | entity diagrams 86 | 87 | ** OOP Support 88 | - =AdaML= supports both OOP and non-OOP approaches to software models 89 | - There is no explicit difference between them in =AdaML= 90 | - The final implementation in Ada is the last choice between the two options 91 | - This document and examples on it use OOP concepts as much as possible 92 | 93 | ** Abstraction Levels 94 | =AdaML= provides two main view levels, according to the [[https://c4model.com][C4 model]]: 95 | 96 | - Code view :: to show in detail how entity elements (attributes, methods) are 97 | implemented and the relationship they have with other 98 | entities\newline 99 | 100 | - Component view :: to show internal entity building blocks and the overall 101 | relationship with other entities\newline 102 | 103 | In some /code views/, Ada code is included. 104 | 105 | ** Deep Thought Example - Code View 106 | *** code :BMCOL:B_block: 107 | :PROPERTIES: 108 | :BEAMER_col: 0.65 109 | :END: 110 | _=AdaML=_ 111 | #+begin_example 112 | !include AdaML.puml 113 | begin_type("Pan_Dimensional") 114 | procedure("Ask_The_Question", "in out Natural") 115 | end() 116 | 117 | begin_package("Deep_Thought") 118 | function("Get_Answer", "", "Natural") 119 | private() 120 | variable("The_Answer", "Natural", 42) 121 | end() 122 | 123 | depends("Pan_Dimensional", "Deep_Thought", "ask") 124 | #+end_example 125 | 126 | *** figure :BMCOL:B_block: 127 | :PROPERTIES: 128 | :BEAMER_col: 0.45 129 | :END: 130 | _=UML=_ 131 | #+begin_src plantuml :file introduction/deep-thought-example.eps 132 | !include AdaML.puml 133 | begin_type("Pan_Dimensional") 134 | procedure("Ask_The_Question", "in out Natural") 135 | end() 136 | 137 | begin_package("Deep_Thought") 138 | function("Get_Answer", "", "Natural") 139 | private() 140 | variable("The_Answer", "Natural", 42) 141 | end() 142 | 143 | depends("Pan_Dimensional", "Deep_Thought", "ask") 144 | #+end_src 145 | 146 | #+RESULTS[7a22dc04a15ce1b7518d36e9ca62ab1251d2cf58]: 147 | [[file:introduction/deep-thought-example.eps]] 148 | 149 | ** Config :noexport: 150 | Local Variables: 151 | org-confirm-babel-evaluate: nil 152 | End: 153 | -------------------------------------------------------------------------------- /doc/make-AdaML.el: -------------------------------------------------------------------------------- 1 | ;; cannot be used, to be investigated 2 | (require 'org) 3 | (require 'ox-latex) 4 | (require 'ox-beamer) 5 | ;(require 'ob-plantuml) 6 | (defun org-babel-execute:ada (body params)) 7 | ;(setq org-plantuml-jar-path (getenv "PLANTUML_JAR_PATH")) 8 | ;(setq org-confirm-babel-evaluate nil) 9 | (org-beamer-export-to-pdf) 10 | -------------------------------------------------------------------------------- /doc/make-figures.el: -------------------------------------------------------------------------------- 1 | (require 'org) 2 | (require 'ob-plantuml) 3 | (defun org-babel-execute:ada (body params)) 4 | (setq org-plantuml-jar-path (getenv "PLANTUML_JAR_PATH")) 5 | (setq org-confirm-babel-evaluate nil) 6 | (org-babel-execute-buffer) 7 | -------------------------------------------------------------------------------- /doc/notes.org: -------------------------------------------------------------------------------- 1 | * Notes 2 | ** Introduction 3 | + Notes are usually needed to clarify some =UML= constructions 4 | + =AdaML= notes can be 5 | - /floating/, not associated to any entity 6 | - /linked/ to one entity, appeared some slides before 7 | - /named notes/ linked simultaneously to several entities 8 | - /notes on links/, associated to links between entities 9 | + =AdaML= supports geometry hints to specify relative position between the note 10 | and the entity 11 | 12 | ** Floating Notes 13 | + Not associated to any particular entity\newline 14 | 15 | *** code :BMCOL:B_block: 16 | :PROPERTIES: 17 | :BEAMER_col: 0.45 18 | :END: 19 | _=AdaML=_ 20 | #+begin_example 21 | 22 | 23 | 24 | 25 | !include AdaML.puml 26 | note("Stereotypes help clarify\nrelationhips, right?") 27 | type("Pan_Dimensional", "questioner") 28 | package("Deep_Thought", "responder") 29 | depends("Pan_Dimensional", "Deep_Thought", "ask") 30 | 31 | #+end_example 32 | 33 | *** figure :BMCOL:B_block: 34 | :PROPERTIES: 35 | :BEAMER_col: 0.55 36 | :END: 37 | _=UML=_ 38 | #+begin_src plantuml :file notes/floating.eps 39 | !include AdaML.puml 40 | note("Stereotypes helps clarify\nrelationhips, right?") 41 | type("Pan_Dimensional", "questioner") 42 | package("Deep_Thought", "responder") 43 | depends("Pan_Dimensional", "Deep_Thought", "ask") 44 | #+end_src 45 | 46 | #+RESULTS: 47 | [[file:notes/floating.eps]] 48 | 49 | ** Notes Linked to Latest Defined Entity 50 | + Notes are automatically associated to the latest defined entity 51 | + Must specify relative position with =‘top'=, =‘bottom'=, =‘left'= or =‘right'= 52 | keyword 53 | 54 | *** code :BMCOL:B_block: 55 | :PROPERTIES: 56 | :BEAMER_col: 0.4 57 | :END: 58 | _=AdaML=_ 59 | #+begin_example 60 | 61 | !include AdaML.puml 62 | type("Foo") 63 | note("left", "What is 'Foo'?") 64 | 65 | type("Bar") 66 | note("right", "What is 'Bar'?") 67 | 68 | depends("Foo", "Bar", "baz") 69 | #+end_example 70 | 71 | *** figure :BMCOL:B_block: 72 | :PROPERTIES: 73 | :BEAMER_col: 0.6 74 | :END: 75 | _=UML=_ 76 | #+begin_src plantuml :file notes/associated-automatic.eps 77 | !include AdaML.puml 78 | type("Foo") 79 | note("left", "What is 'Foo'?") 80 | 81 | type("Bar") 82 | note("right", "What is 'Bar'?") 83 | 84 | depends("Foo", "Bar", "baz") 85 | #+end_src 86 | 87 | #+RESULTS: 88 | [[file:notes/associated-automatic.eps]] 89 | 90 | ** Notes Linked to an Explicit Entity 91 | + Must specify relative position with =‘top of'=, =‘bottom of'=, =‘left of'= or 92 | =‘right of'= keyword, followed by the name of the entity 93 | 94 | *** code :BMCOL:B_block: 95 | :PROPERTIES: 96 | :BEAMER_col: 0.4 97 | :END: 98 | _=AdaML=_ 99 | #+begin_example 100 | 101 | 102 | !include AdaML.puml 103 | 104 | type("Foo_Bar") 105 | note("top of Foo_Bar", "W...?") 106 | note("right of Foo_Bar", "W...?") 107 | note("bottom of Foo_Bar", "W...?") 108 | note("left of Foo_Bar", "Why...?") 109 | 110 | 111 | #+end_example 112 | 113 | *** figure :BMCOL:B_block: 114 | :PROPERTIES: 115 | :BEAMER_col: 0.6 116 | :END: 117 | _=UML=_ 118 | #+begin_src plantuml :file notes/associated-explicit.eps 119 | !include AdaML.puml 120 | type("Foo_Bar") 121 | note("top of Foo_Bar", "What is 'Foo'?") 122 | note("right of Foo_Bar", "What is 'Bar'?") 123 | note("bottom of Foo_Bar", "What is 'Foo_Bar'?") 124 | note("left of Foo_Bar", "Why is 'Foo_Bar'\nso famous?") 125 | #+end_src 126 | 127 | #+RESULTS: 128 | [[file:notes/associated-explicit.eps]] 129 | 130 | ** Named Notes Linked to Several Entities 131 | + Specify a number, e.g. 42, to create the named note =‘Note_42'=, and then link 132 | the note to other entities\newline 133 | 134 | *** code :BMCOL:B_block: 135 | :PROPERTIES: 136 | :BEAMER_col: 0.7 137 | :END: 138 | _=AdaML=_ 139 | #+begin_example 140 | 141 | !include AdaML.puml 142 | type("Foo") 143 | type_new("Foo", "Bar") 144 | 145 | note(42, "Is 'Foo_Bar' in between?") 146 | link("Foo", "Note_42") 147 | link("Note_42", "Bar") 148 | 149 | #+end_example 150 | 151 | *** figure :BMCOL:B_block: 152 | :PROPERTIES: 153 | :BEAMER_col: 0.3 154 | :END: 155 | _=UML=_ 156 | #+begin_src plantuml :file notes/named.eps 157 | !include AdaML.puml 158 | type("Foo") 159 | type_new("Foo", "Bar") 160 | 161 | note(42, "Is 'Foo_Bar' in between?") 162 | link("Foo", "Note_42") 163 | link("Note_42", "Bar") 164 | #+end_src 165 | 166 | #+RESULTS: 167 | [[file:notes/named.eps]] 168 | 169 | ** Notes on Links 170 | + Automatically associated to the latest relationship defined 171 | + Must contain =‘on link'= keyword, optionally preceded by =‘top'=, =‘bottom'=, 172 | =‘left'= or =‘right'= keyword\newline 173 | 174 | *** code :BMCOL:B_block: 175 | :PROPERTIES: 176 | :BEAMER_col: 0.55 177 | :END: 178 | _=AdaML=_ 179 | #+begin_example 180 | 181 | 182 | !include AdaML.puml 183 | type("Pan_Dimensional") 184 | package("Deep_Thought") 185 | 186 | depends("Pan_Dimensional", "Deep_Thought", "ask") 187 | note("right on link", "hope..") 188 | 189 | 190 | #+end_example 191 | 192 | *** figure :BMCOL:B_block: 193 | :PROPERTIES: 194 | :BEAMER_col: 0.45 195 | :END: 196 | _=UML=_ 197 | #+begin_src plantuml :file notes/links.eps 198 | !include AdaML.puml 199 | type("Pan_Dimensional") 200 | package("Deep_Thought") 201 | 202 | depends("Pan_Dimensional", "Deep_Thought", "ask") 203 | note("right on link", "hope the answer\nchanges some day") 204 | #+end_src 205 | 206 | #+RESULTS: 207 | [[file:notes/links.eps]] 208 | 209 | ** Config :noexport: 210 | Local Variables: 211 | org-confirm-babel-evaluate: nil 212 | End: 213 | -------------------------------------------------------------------------------- /doc/packages.org: -------------------------------------------------------------------------------- 1 | * Packages 2 | ** View Levels 3 | + Minimal :: only shows the package entity and generic parameters\newline 4 | + Code View :: shows package elements with certain level of detail; elements can 5 | be other packages, types subprograms, tasks, constants, variables 6 | and protected objects\newline 7 | + Component View :: shows package elements and their relationships; do not 8 | include details of such elements 9 | 10 | ** Minimal view 11 | The simplest package representation is\newline 12 | 13 | *** code :BMCOL:B_block: 14 | :PROPERTIES: 15 | :BEAMER_col: 0.65 16 | :END: 17 | _=AdaML=_ 18 | #+begin_example 19 | !include AdaML.puml 20 | package("Deep_Thought") 21 | #+end_example 22 | 23 | *** figure :BMCOL:B_block: 24 | :PROPERTIES: 25 | :BEAMER_col: 0.35 26 | :END: 27 | _=UML=_ 28 | #+begin_src plantuml :file packages/detail-view.eps 29 | !include AdaML.puml 30 | package("Deep_Thought") 31 | #+end_src 32 | 33 | #+RESULTS[9e5758013375e35a0f52d80450f7884201531f36]: 34 | [[file:packages/detail-view.eps]] 35 | 36 | ** Code View 37 | Shows package elements; here variables and subprograms shown\newline 38 | 39 | *** code :BMCOL:B_block: 40 | :PROPERTIES: 41 | :BEAMER_col: 0.6 42 | :END: 43 | _=AdaML=_ 44 | #+begin_example 45 | !include AdaML.puml 46 | begin_package("Deep_Thought") 47 | function("Get_Answer", "", "Natural") 48 | private() 49 | variable("The_Answer", "Natural", 42) 50 | end() 51 | #+end_example 52 | 53 | *** figure :BMCOL:B_block: 54 | :PROPERTIES: 55 | :BEAMER_col: 0.4 56 | :END: 57 | _=UML=_ 58 | #+begin_src plantuml :file packages/code-view.eps 59 | !include AdaML.puml 60 | begin_package("Deep_Thought") 61 | function("Get_Answer", "", "Natural") 62 | private() 63 | variable("The_Answer", "Natural", 42) 64 | end() 65 | #+end_src 66 | 67 | #+RESULTS[1bee01e4589d4a85c718fe8d27f958168f8e5b6c]: 68 | [[file:packages/code-view.eps]] 69 | 70 | *** Ada 71 | #+begin_src ada :exports code 72 | package Deep_Thought is 73 | function Get_Answer return Natural; 74 | private 75 | The_Answer : Natural := 42; 76 | end FooBar; 77 | #+end_src 78 | 79 | #+RESULTS: 80 | 81 | ** Adding Types 82 | *** code :BMCOL:B_block: 83 | :PROPERTIES: 84 | :BEAMER_col: 0.6 85 | :END: 86 | _=AdaML=_ 87 | #+begin_example 88 | !include AdaML.puml 89 | begin_package("Deep_Thought") 90 | type("Range_42", "range 1 .. 42") 91 | private() 92 | variable("The_Answer", "Range_42") 93 | public() 94 | function("Get_Answer", "Range_42") 95 | end() 96 | #+end_example 97 | 98 | *** figure :BMCOL:B_block: 99 | :PROPERTIES: 100 | :BEAMER_col: 0.35 101 | :END: 102 | _=UML=_ 103 | #+begin_src plantuml :file packages/add-types.eps 104 | !include AdaML.puml 105 | begin_package("Deep_Thought") 106 | type("Range_42", "range 1 .. 42") 107 | private() 108 | variable("The_Answer", "Range_42") 109 | public() 110 | function("Get_Answer", "", "Range_42") 111 | end() 112 | #+end_src 113 | 114 | #+RESULTS[1f2eabbbd77050b8369aee525a52eeefeef00e6d]: 115 | [[file:packages/add-types.eps]] 116 | 117 | *** Note 118 | When using extra /entity elements/, like =types= or =tasks=, then variables and 119 | methods must be manually sorted (contrast with previous slide) 120 | 121 | ** Adding Tasks 122 | *** code :BMCOL:B_block: 123 | :PROPERTIES: 124 | :BEAMER_col: 0.6 125 | :END: 126 | _=AdaML=_ 127 | #+begin_example 128 | !include AdaML.puml 129 | begin_package("Deep_Thought") 130 | type("Range_42", "range 1 .. 42") 131 | task("Compute") 132 | variable("-The_Answer", "Range_42") 133 | function("Get_Answer", "", "Range_42") 134 | end() 135 | #+end_example 136 | 137 | *** figure :BMCOL:B_block: 138 | :PROPERTIES: 139 | :BEAMER_col: 0.35 140 | :END: 141 | _=UML=_ 142 | #+begin_src plantuml :file packages/add-tasks.eps 143 | !include AdaML.puml 144 | begin_package("Deep_Thought") 145 | type("Range_42", "range 1 .. 42") 146 | task("Compute") 147 | variable("-The_Answer", "Range_42") 148 | function("Get_Answer", "", "Range_42") 149 | end() 150 | #+end_src 151 | 152 | #+RESULTS[1f2eabbbd77050b8369aee525a52eeefeef00e6d]: 153 | [[file:packages/add-tasks.eps]] 154 | 155 | *** Element visibility 156 | + use =private()= and =public()= functions, as in previous slides 157 | + put =`-'=, =`+'= or =`#'= in front of the element's name; this has priority 158 | over pri/pub functions 159 | 160 | ** Generic Packages 161 | *** code :BMCOL:B_block: 162 | :PROPERTIES: 163 | :BEAMER_col: 0.6 164 | :END: 165 | _=AdaML=_ 166 | #+begin_example 167 | !include AdaML.puml 168 | begin_package("Deep_Thought") 169 | generic_with("N : Natural range 1 .. 42") 170 | type("Range_N", "range 1 .. N") 171 | task("Compute") 172 | variable("-The_Answer", "Range_N") 173 | function("Get_Answer", "", "Range_N") 174 | end() 175 | #+end_example 176 | 177 | *** figure :BMCOL:B_block: 178 | :PROPERTIES: 179 | :BEAMER_col: 0.38 180 | :END: 181 | _=UML=_ 182 | #+begin_src plantuml :file packages/generic-packages.eps 183 | !include AdaML.puml 184 | begin_package("Deep_Thought") 185 | generic_with("N : Natural range 1 .. 42") 186 | type("Range_N", "range 1 .. N") 187 | task("Compute") 188 | variable("-The_Answer", "Range_N") 189 | function("Get_Answer", "", "Range_N") 190 | end() 191 | #+end_src 192 | 193 | #+RESULTS[1f2eabbbd77050b8369aee525a52eeefeef00e6d]: 194 | [[file:packages/generic-packages.eps]] 195 | 196 | ** Component view 197 | 198 | *** code :BMCOL:B_block: 199 | :PROPERTIES: 200 | :BEAMER_col: 0.5 201 | :END: 202 | _=AdaML=_ 203 | #+begin_example 204 | !include AdaML.puml 205 | begin_package_spec("Deep_Thought") 206 | type("Range_Type") 207 | type_new("Ada.Natural", "Range_Type") 208 | task("Compute") 209 | subprogram("Get_Answer") 210 | variable("The_Answer") 211 | depends("Get_Answer", "The_Answer"); 212 | depends("Compute", "The_Answer"); 213 | is("The_Answer", "Range_Type") 214 | end() 215 | #+end_example 216 | 217 | *** figure :BMCOL:B_block: 218 | :PROPERTIES: 219 | :BEAMER_col: 0.6 220 | :END: 221 | _=UML=_ 222 | #+begin_src plantuml :file packages/component-view.eps 223 | !include AdaML.puml 224 | !depends_stereotype = "" 225 | begin_package_spec("Deep_Thought") 226 | type("Range_Type") 227 | type_new("Ada.Natural", "Range_Type") 228 | task("Compute") 229 | subprogram("Get_Answer") 230 | variable("The_Answer") 231 | depends("Get_Answer", "The_Answer") 232 | depends("Compute", "The_Answer") 233 | is("The_Answer", "Range_Type") 234 | end() 235 | #+end_src 236 | 237 | #+RESULTS[34422c456c5d8327b17464a9dafaba1ccf95e528]: 238 | [[file:packages/component-view.eps]] 239 | 240 | ** Config :noexport: 241 | Local Variables: 242 | org-confirm-babel-evaluate: nil 243 | End: 244 | -------------------------------------------------------------------------------- /doc/reference.org: -------------------------------------------------------------------------------- 1 | * Reference 2 | ** Component Views 3 | | \bf{name} | \bf{args} | | 4 | |--------------------------------------------------+-----------+--------------------------------------------------| 5 | | package | name | stereotype=package\textunderscore stereotype | 6 | | begin\textunderscore package\textunderscore spec | name | stereotype=package\textunderscore stereotype | 7 | |--------------------------------------------------+-----------+--------------------------------------------------| 8 | | abstract | name | stereotype=abstract\textunderscore stereotype | 9 | | enumeration | name | stereotype=enumeration\textunderscore stereotype | 10 | | interface | name | stereotype=interface\textunderscore stereotype | 11 | | subtype | name | stereotype=subtype\textunderscore stereotype | 12 | |--------------------------------------------------+-----------+--------------------------------------------------| 13 | | type | name | stereotype=type\textunderscore stereotype | 14 | | type\textunderscore access | name | suffix=access\textunderscore suffix | 15 | | | | stereotype=type\textunderscore stereotype | 16 | | type\textunderscore new | base | name | 17 | | | | stereotype=type\textunderscore stereotype | 18 | | type\textunderscore protected | name | stereotype=type\textunderscore stereotype | 19 | 20 | ** Code Views 21 | | \bf{name} | \bf{args} | | 22 | |----------------------------------------------------+-----------+--------------------------------------------------| 23 | | begin\textunderscore package | name | stereotype=package\textunderscore stereotype | 24 | |----------------------------------------------------+-----------+--------------------------------------------------| 25 | | begin\textunderscore abstract | name | stereotype=abstract\textunderscore stereotype | 26 | | begin\textunderscore enumeration | name | stereotype=enumeration\textunderscore stereotype | 27 | | begin\textunderscore interface | name | stereotype=interface\textunderscore stereotype | 28 | | begin\textunderscore subtype | name | stereotype=subtype\textunderscore stereotype | 29 | |----------------------------------------------------+-----------+--------------------------------------------------| 30 | | begin\textunderscore type | name | stereotype=type\textunderscore stereotype | 31 | | begin\textunderscore type\textunderscore new | base | name | 32 | | | | stereotype=type\textunderscore stereotype | 33 | | begin\textunderscore type\textunderscore protected | name | stereotype=protected\textunderscore stereotype | 34 | 35 | ** Customization 36 | - All variables of the form ==\textunderscore ==, with 37 | == in =package=, =type= .., and == in =stereotype=, =color=, 38 | .., can be set to a different default values to customize generated diagrams 39 | 40 | ** Config :noexport: 41 | Local Variables: 42 | org-confirm-babel-evaluate: nil 43 | End: 44 | -------------------------------------------------------------------------------- /doc/types.org: -------------------------------------------------------------------------------- 1 | * Types 2 | ** Type Classification 3 | Ada 2012 overall type classification\newline 4 | 5 | #+begin_example 6 | ELEMENTARY TYPES COMPOSITE TYPES 7 | |-- Scalar |-- Record 8 | | |-- Discrete |-- Array 9 | | | |-- Integer |-- Protected 10 | | | | |-- Signed '-- Task 11 | | | | '-- Modular 12 | | | '-- Enumeration 13 | | '-- Real 14 | | |-- Float 15 | | '-- Fixed 16 | | |-- Decimal 17 | | '-- Ordinary 18 | '-- Access 19 | #+end_example 20 | 21 | ** Predefined Types 22 | + =AdaML= is aware of =Boolean=, =Integer=, =Natural=, =Positive=, =Float=, 23 | =Character= and =String= types 24 | + so there is no need to declare such types 25 | \newline 26 | + When needed, refer to them also as, e.g. =Ada.Boolean=[fn:1], to make them appear in 27 | a separate package 28 | + otherwise it might look like the type has been redefined in your package 29 | 30 | ** Discrete Types 31 | + For discrete types like /range/, /modular/ or /enumeration/ types, use either 32 | the stereotype or the particular specifier 33 | + The meaning is the same, the appearance changes substantially 34 | + Prefer stereotypes in component views, and specifiers in code views 35 | + Both the stereotype and the specifier can be also combined; might be little 36 | redundant, but sometimes useful 37 | 38 | ** Range Types 39 | *** code :BMCOL:B_block: 40 | :PROPERTIES: 41 | :BEAMER_col: 0.45 42 | :END: 43 | _=AdaML=_ 44 | #+begin_example 45 | !include AdaML.puml 46 | 47 | ' with stereotype 48 | type("Dozen_Type", "range 1 .. 12") 49 | note("top of Dozen_Type", "ste...") 50 | 51 | ' with specifier 52 | begin_type("Power_Type") 53 | range("-2_048 .. 65_536") 54 | end() 55 | note("top of Power_Type", "her...") 56 | #+end_example 57 | 58 | *** figure :BMCOL:B_block: 59 | :PROPERTIES: 60 | :BEAMER_col: 0.55 61 | :END: 62 | _=UML=_ 63 | #+begin_src plantuml :file types/range-types.eps 64 | !include AdaML.puml 65 | 66 | ' with stereotype 67 | type("Dozen_Type", "range 1 .. 12") 68 | note("top of Dozen_Type", "stereotypes can be simple,\nlike «range»,or with details,\nas shown here") 69 | 70 | ' with specifier 71 | begin_type("Power_Type") 72 | range("-2_048 .. 65_536") 73 | end() 74 | note("top of Power_Type", "here using\nrange specifier") 75 | #+end_src 76 | 77 | #+RESULTS: 78 | [[file:types/range-types.eps]] 79 | 80 | *** Ada 81 | #+begin_src ada :exports code 82 | type Dozen_Type is range 1 .. 12; 83 | type Power_Type is range -2_048 .. 65_536; 84 | #+end_src 85 | 86 | ** Modular Types 87 | *** code :BMCOL:B_block: 88 | :PROPERTIES: 89 | :BEAMER_col: 0.45 90 | :END: 91 | _=AdaML=_ 92 | #+begin_example 93 | !include AdaML.puml 94 | 95 | ' with stereotype 96 | type("Mod10_Type", "mod 10") 97 | note("top of Mod10_Type", "ste...") 98 | 99 | ' with mod specifier 100 | begin_type("Mod512_Type", "mod") 101 | mod(512) 102 | end() 103 | note("top of Mod512_Type", "he...") 104 | #+end_example 105 | 106 | *** figure :BMCOL:B_block: 107 | :PROPERTIES: 108 | :BEAMER_col: 0.55 109 | :END: 110 | _=UML=_ 111 | #+begin_src plantuml :file types/modular-types.eps 112 | !include AdaML.puml 113 | 114 | ' with stereotype 115 | type("Mod10_Type", "mod 10") 116 | note("top of Mod10_Type", "stereotypes can be simple,\nlike «mod», or with details,\nas shown here") 117 | 118 | ' with mod specifier 119 | begin_type("Mod512_Type", "mod") 120 | mod(512) 121 | end() 122 | note("top of Mod512_Type", "here using both the\nstereotype and the\nmod specifier") 123 | #+end_src 124 | 125 | #+RESULTS[42d0b89e1728445ebf9a19a879813b200093e6ac]: 126 | [[file:types/modular-types.eps]] 127 | 128 | *** Ada 129 | #+begin_src ada :exports code 130 | type Mod10_Type is mod 10; 131 | type Mod512_Type is mod 512; 132 | #+end_src 133 | 134 | ** Enumeration Types 135 | *** code :BMCOL:B_block: 136 | :PROPERTIES: 137 | :BEAMER_col: 0.6 138 | :END: 139 | _=AdaML=_ 140 | #+begin_example 141 | !include AdaML.puml 142 | 143 | ' with stereotype 144 | type("Year_Months", "enum") 145 | 146 | ' with specifier 147 | begin_type("Week_Days") 148 | enum("Mon, Tue, Wed, Thu, Fri, Sat, Sun") 149 | end() 150 | 151 | top_down("Year_Months", "Week_Days") 152 | #+end_example 153 | 154 | *** figure :BMCOL:B_block: 155 | :PROPERTIES: 156 | :BEAMER_col: 0.4 157 | :END: 158 | _=UML=_ 159 | #+begin_src plantuml :file types/enumeration-types.eps 160 | !include AdaML.puml 161 | 162 | ' with stereotype 163 | type("Year_Months", "enum") 164 | 165 | ' with specifier 166 | begin_type("Week_Days") 167 | enum("Mon, Tue, Wed, Thu, Fri, Sat, Sun") 168 | end() 169 | 170 | top_down("Year_Months", "Week_Days") 171 | #+end_src 172 | 173 | #+RESULTS[1e6de9e659710a72e5e64d64cf803032149e6516]: 174 | [[file:types/enumeration-types.eps]] 175 | 176 | *** Ada 177 | #+begin_src ada :export code 178 | type Year_Months is (Jan, Feb, Mar, ..., Dec ); 179 | type Week_Days is (Mon, Tue, Wed, Thu, Fri, Sat, Sun); 180 | #+end_src 181 | 182 | ** Record Types 183 | *** code :BMCOL:B_block: 184 | :PROPERTIES: 185 | :BEAMER_col: 0.55 186 | :END: 187 | _=AdaML=_ 188 | #+begin_example 189 | !include AdaML.puml 190 | begin_type("Foo_Type") 191 | function("Answer", "", "Natural") 192 | attribute("Bar", "Natural") 193 | end() 194 | #+end_example 195 | 196 | *** figure :BMCOL:B_block: 197 | :PROPERTIES: 198 | :BEAMER_col: 0.3 199 | :END: 200 | _=UML=_ 201 | #+begin_src plantuml :file types/record-types.eps 202 | !include AdaML.puml 203 | begin_type("Foo_Type") 204 | function("Answer", "", "Natural") 205 | attribute("Bar", "Natural := 42") 206 | end() 207 | note("top", "Attributes and methods\nare shown as usual in UML") 208 | #+end_src 209 | 210 | #+RESULTS[5c1d589e39dac08c16326372d2ada6331a1129b0]: 211 | [[file:types/record-types.eps]] 212 | 213 | *** Ada 214 | #+begin_src ada 215 | type Foo_Type is private record 216 | Baz : Natural; 217 | end record; 218 | function Answer (Arg : in out Foo_Type) return Natural; 219 | #+end_src 220 | 221 | ** Record Types with Discriminant (i) 222 | *** code :BMCOL:B_block: 223 | :PROPERTIES: 224 | :BEAMER_col: 0.55 225 | :END: 226 | _=AdaML=_ 227 | #+begin_example 228 | !include AdaML.puml 229 | begin_type("Activity_Plan") 230 | attribute("Exercise", "Float := 0.75") 231 | case("Day is Mon..Fri") 232 | attribute("Work", "Float := 8.0") 233 | case("Day is Sat") 234 | attribute("Music", "Float := 4.0") 235 | attribute("Tennis", "Float := 2.0") 236 | case() 237 | attribute("Location", "String") 238 | function("Total_Hours", "", "Float") 239 | end() 240 | #+end_example 241 | 242 | *** figure :BMCOL:B_block: 243 | :PROPERTIES: 244 | :BEAMER_col: 0.4 245 | :END: 246 | _=UML=_ 247 | #+begin_src plantuml :file types/record-types-discriminant.eps 248 | !include AdaML.puml 249 | begin_type("Activity_Plan") 250 | attribute("Exercise", "Float := 0.75") 251 | case("Day is Mon..Fri") 252 | attribute("Work", "Float := 8.0") 253 | case("Day is Sat") 254 | attribute("Music", "Float := 4.0") 255 | attribute("Tennis", "Float := 2.0") 256 | case() 257 | attribute("Location", "String") 258 | function("Total_Hours", "", "Float") 259 | end() 260 | #+end_src 261 | 262 | #+RESULTS[5c1d589e39dac08c16326372d2ada6331a1129b0]: 263 | [[file:types/record-types-discriminant.eps]] 264 | 265 | ** Record Types with Discriminant (ii) 266 | + When a case value is not specified, assume =null= 267 | 268 | #+begin_src ada 269 | type Day_Type is (Mon, Tue, Wed, Thu, Fri, Sat, Sun); 270 | type Activity_Plan (Day : Day_Type) is record 271 | Exercise : Float := 0.75; 272 | case Day is 273 | when Mon .. Fri => 274 | Work : Float := 8.0; 275 | when Sat => 276 | Music : Float := 4.0; 277 | Tennis : Float := 2.0; 278 | when Sun => 279 | null; 280 | end case; 281 | Location : String; 282 | end record; 283 | 284 | function Total_Hours (Plan : in Activity_Plan) return Float; 285 | #+end_src 286 | 287 | ** Derived Types 288 | *** code :BMCOL:B_block: 289 | :PROPERTIES: 290 | :BEAMER_col: 0.55 291 | :END: 292 | _=AdaML=_ 293 | #+begin_example 294 | !include AdaML.puml 295 | type_new("Integer", "Foo_Type") 296 | begin_type_new("Integer", "Bar_Type") 297 | range("-1 .. 20") 298 | end() 299 | #+end_example 300 | 301 | *** figure :BMCOL:B_block: 302 | :PROPERTIES: 303 | :BEAMER_col: 0.45 304 | :END: 305 | _=UML=_ 306 | #+begin_src plantuml :file types/derived-types.eps 307 | !include AdaML.puml 308 | type_new("Integer", "Foo_Type") 309 | begin_type_new("Integer", "Bar_Type") 310 | range("-1 .. 20") 311 | end() 312 | #+end_src 313 | 314 | #+RESULTS[147bd8dbffd80fd6a841223975d65db61fea4101]: 315 | [[file:types/derived-types.eps]] 316 | 317 | *** Ada 318 | #+begin_src ada :exports code 319 | type Foo_Type is new Integer; 320 | type Bar_Type is new Integer range -1 .. 20; 321 | -- or simply 322 | type Bar_Type is range -1 .. 20; 323 | #+end_src 324 | 325 | ** Abstract Types 326 | *** code :BMCOL:B_block: 327 | :PROPERTIES: 328 | :BEAMER_col: 0.55 329 | :END: 330 | _=AdaML=_ 331 | #+begin_example 332 | !include AdaML.puml 333 | begin_abstract("Animal", "tagged") 334 | attribute("Class", "String") 335 | end() 336 | 337 | begin_type_new("Animal", "Mammal") 338 | attribute("Arms", "Natural") 339 | attribute("Legs", "Natural") 340 | end() 341 | 342 | begin_type_new("Animal", "Reptile") 343 | attribute("Diurnal", "Boolean") 344 | end() 345 | #+end_example 346 | 347 | *** figure :BMCOL:B_block: 348 | :PROPERTIES: 349 | :BEAMER_col: 0.45 350 | :END: 351 | _=UML=_ 352 | #+begin_src plantuml :file types/abstract-types.eps 353 | !include AdaML.puml 354 | begin_abstract("Animal", "tagged") 355 | attribute("Class", "String") 356 | end() 357 | 358 | begin_type_new("Animal", "Mammal") 359 | attribute("Arms", "Natural") 360 | attribute("Legs", "Natural") 361 | end() 362 | 363 | begin_type_new("Animal", "Reptile") 364 | attribute("Diurnal", "Boolean") 365 | end() 366 | #+end_src 367 | 368 | #+RESULTS[147bd8dbffd80fd6a841223975d65db61fea4101]: 369 | [[file:types/abstract-types.eps]] 370 | 371 | ** Access Types 372 | *** code :BMCOL:B_block: 373 | :PROPERTIES: 374 | :BEAMER_col: 0.55 375 | :END: 376 | _=AdaML=_ 377 | #+begin_example 378 | !include AdaML.puml 379 | begin_abstract("Animal", "tagged") 380 | attribute("Class", "String") 381 | end() 382 | 383 | type_access("Animal") 384 | #+end_example 385 | 386 | *** figure :BMCOL:B_block: 387 | :PROPERTIES: 388 | :BEAMER_col: 0.25 389 | :END: 390 | _=UML=_ 391 | #+begin_src plantuml :file types/access-types.eps 392 | !include AdaML.puml 393 | begin_abstract("Animal", "tagged") 394 | attribute("Class", "String") 395 | end() 396 | 397 | type_access("Animal") 398 | #+end_src 399 | 400 | #+RESULTS[147bd8dbffd80fd6a841223975d65db61fea4101]: 401 | [[file:types/access-types.eps]] 402 | 403 | *** Note 404 | Suffix =`_Access'= is automatically added to access types; suffix can be 405 | configured or suppressed 406 | 407 | ** Config :noexport: 408 | Local Variables: 409 | org-confirm-babel-evaluate: nil 410 | End: 411 | 412 | * Footnotes 413 | [fn:1] This is UML notation context, not Ada programming language\newline 414 | -------------------------------------------------------------------------------- /examples/.gitignore: -------------------------------------------------------------------------------- 1 | *.eps 2 | *.png 3 | -------------------------------------------------------------------------------- /examples/floyd_tuner/AdaML.puml: -------------------------------------------------------------------------------- 1 | ../../AdaML.puml -------------------------------------------------------------------------------- /examples/floyd_tuner/README.org: -------------------------------------------------------------------------------- 1 | #+title: FLOYD_TUNER 2 | 3 | * Diagrams 4 | 5 | #+begin_src plantuml :file floyd_tuner.eps :results none! 6 | !include floyd_tuner.aml 7 | #+end_src 8 | 9 | #+RESULTS: 10 | [[file:floyd_tuner.eps]] 11 | 12 | * Configuration :noexport: 13 | Local Variables: 14 | org-confirm-babel-evaluate: nil 15 | End: 16 | -------------------------------------------------------------------------------- /examples/floyd_tuner/floyd_tuner.aml: -------------------------------------------------------------------------------- 1 | !include AdaML.puml 2 | 3 | actor User 4 | agent String_Instrument 5 | agent Screen 6 | agent Touch_Screen 7 | agent Microphone 8 | 9 | begin_package_spec("Floyd_Tuner") 10 | 11 | subprogram("Main") 12 | 13 | package("View") 14 | package("Controller") 15 | package("Signal_Analyzer") 16 | package("Sample_Collector") 17 | 18 | depends("User", "Touch_Screen", "interacts >") 19 | depends("Main", "Controller", "starts >") 20 | depends("User", "Screen", "see") 21 | depends("User", "String_Instrument", "plays\n&\ntunes") 22 | 23 | depends("Touch_Screen", "Controller", "commands") 24 | 25 | depends("Controller", "Sample_Collector", "manages") 26 | depends("Controller", "Signal_Analyzer", "configures") 27 | depends("Controller", "View", "commands") 28 | 29 | depends("View", "Screen", "output >") 30 | depends("View", "Signal_Analyzer", "read\nresults >") 31 | depends("Signal_Analyzer", "Sample_Collector", "read\nsamples >") 32 | depends("Sample_Collector", "Microphone", "ADC") 33 | 34 | depends("String_Instrument", "Microphone", "captures <") 35 | 36 | end() 37 | -------------------------------------------------------------------------------- /examples/tts/AdaML.puml: -------------------------------------------------------------------------------- 1 | ../../AdaML.puml -------------------------------------------------------------------------------- /examples/tts/README.org: -------------------------------------------------------------------------------- 1 | #+title: Example for TTS packages 2 | 3 | * Diagrams 4 | 5 | #+begin_src plantuml :file components.eps :results none 6 | !include components.aml 7 | #+end_src 8 | 9 | * Configuration :noexport: 10 | Local Variables: 11 | org-confirm-babel-evaluate: nil 12 | End: 13 | -------------------------------------------------------------------------------- /examples/tts/components.aml: -------------------------------------------------------------------------------- 1 | !include AdaML.puml 2 | 3 | begin_package_spec("XAda.Dispatching.TTS") 4 | 5 | type_new("Ada.Positive", "TT_Work_Id", "range 1..WID") 6 | type_new("Ada.Positive", "TT_Sync_Id", "range 1 .. SID") 7 | 8 | abstract("Time_Slot", "tagged") 9 | type_access("Time_Slot") 10 | 11 | type_new("Time_Slot", "Empty_Slot") 12 | type_access("Empty_Slot") 13 | 14 | type_new("Time_Slot", "Mode_Change_Slot") 15 | type_access("Mode_Change_Slot") 16 | 17 | type_new("Time_Slot", "Sync_Slot") 18 | type_access("Sync_Slot") 19 | 20 | type_new("Time_Slot", "Work_Slot") 21 | type_access("Work_Slot") 22 | 23 | type_new("Time_Slot", "Regular_Slot") 24 | type_access("Regular_Slot") 25 | 26 | type_new("Work_Slot", "Optional_Slot") 27 | type_access("Optional_Slot") 28 | 29 | type("Time_Triggered_Plan", "array") 30 | array("Time_Triggered_Plan", "Time_Slot_Access") 31 | type_access("Time_Triggered_Plan") 32 | 33 | '' subprogram("Set_Plan") 34 | '' depends("Set_Plan", "Time_Triggered_Plan_Access") 35 | '' 36 | '' subprogram("Wait_For_Activation") 37 | '' depends("Wait_For_Activation", "TT_Work_Id") 38 | '' 'depends("Wait_For_Activation", "Ada.Real_Time.Time") 39 | '' 40 | '' subprogram("Continue_Sliced") 41 | '' subprogram("Leave_TT_Level") 42 | '' subprogram("Get_First_Plan_Release") 43 | '' 'depends("Get_First_Plan_Release", "Ada.Real_Time.Time") 44 | '' subprogram("Get_Last_Plan_Release") 45 | '' 'depends("Get_Last_Plan_Release", "Ada.Real_Time.Time") 46 | '' subprogram("Wait_For_Sync") 47 | '' 'depends("Wait_For_Sync", "TT_Sync_Id") 48 | 49 | left_right("Empty_Slot", "Regular_Slot", "Work_Slot", "Mode_Change_Slot", "Sync_Slot") 50 | 'left_right("Time_Slot", "Time_Slot_Access") 51 | 'left_right("TT_Work_Id", "TT_Sync_Id") 52 | 53 | end() 54 | -------------------------------------------------------------------------------- /examples/tts/old.org: -------------------------------------------------------------------------------- 1 | #+title: TTS Ravenscar 2 | #+subtitle: \em{Time Triggered Scheduling in the Ada Ravenscar profile} 3 | #+keywords: Ada, UML, Time-Triggered 4 | #+author: Francesc Rocher 5 | #+email: francesc.rocher@gmail.com 6 | #+options: ':t *:t -:t ::t email:t tasks:t 7 | #+latex_class: article 8 | #+latex_class_options: [a4paper,10pt] 9 | #+latex_header: \usepackage[a4paper,left=3cm,right=2cm,top=2.5cm,bottom=2.5cm]{geometry} 10 | #+latex_header: \usepackage{listings} 11 | #+latex_header: \usepackage{minted} 12 | #+latex_header: \hypersetup{colorlinks=true,linkcolor=blue} 13 | 14 | \usemintedstyle{pastie} 15 | \newpage 16 | 17 | * About this document 18 | This document contains a Summary of UML diagrams to help and better understand 19 | TTS features. 20 | 21 | #+begin_src plantuml :file TTS_01.eps :results none 22 | !include AdaML.puml 23 | 24 | begin_package_spec("XAda.Dispatching.TTS") 25 | type_new("Ada.Positive", "TT_Work_Id") 26 | type_new("Ada.Positive", "TT_Sync_Id") 27 | abstract("Time_Slot", "tagged record") 28 | type_new("Time_Slot", "Empty_Slot", "null record") 29 | type_new("Time_Slot", "Mode_Change_Slot", "null record") 30 | type_new("Time_Slot", "Sync_Slot") 31 | type_new("Time_Slot", "Work_Slot") 32 | type_new("Work_Slot", "Optional_Work_Slot") 33 | object_protected("Time_Triggered_Scheduler") 34 | type("Time_Triggered_Plan") 35 | end() 36 | 37 | depends("Time_Triggered_Plan", "Time_Triggered_Scheduler", "use <") 38 | depends("Time_Triggered_Plan", "Time_Slot") 39 | 40 | left_right("TT_Work_Id", "TT_Sync_Id") 41 | left_right("Empty_Slot", "Mode_Change_Slot", "Work_Slot", "Sync_Slot") 42 | #+end_src 43 | 44 | #+label: fig:TTS_01 45 | #+attr_latex: :width 0.8\textwidth 46 | #+caption: Package specification 47 | [[file:TTS_01.eps]] 48 | 49 | 50 | #+begin_src plantuml :file TTS_02.eps :results none 51 | !include AdaML.puml 52 | 53 | package("TTS") 54 | 55 | begin_type_new("Ada.Positive", "TT_Work_Id") 56 | range("1 .. Number_Of_Work_IDs") 57 | end() 58 | 59 | begin_type_new("Ada.Positive", "TT_Sync_Id") 60 | range("1 .. Number_Of_Sync_IDs") 61 | end() 62 | 63 | begin_abstract("Time_Slot", "tagged record") 64 | attribute("Slot_Duration", "Ada.Real_Time.Time_Span") 65 | end() 66 | type_access("Time_Slot") 67 | 68 | type_new("Time_Slot", "Empty_Slot", "null record") 69 | type_access("Empty_Slot") 70 | 71 | type_new("Time_Slot", "Mode_Change_Slot", "null record") 72 | type_access("Mode_Change_Slot") 73 | 74 | begin_type_new("Time_Slot", "Sync_Slot") 75 | attribute("Sync_Id", "TT_Sync_Id"); 76 | end() 77 | type_access("Sync_Slot") 78 | 79 | begin_type_new("Time_Slot", "Work_Slot") 80 | attribute("Work_Id", "TT_Work_Id") 81 | attribute("Is_Continuation", "Boolean") 82 | attribute("Padding", "Ada.Real_Time.Time_Span") 83 | end() 84 | type_access("Work_Slot") 85 | 86 | type_new("Work_Slot", "Optional_Work_Slot", "null record") 87 | type_access("Optional_Work_Slot") 88 | 89 | array("Time_Triggered_Plan", "Time_Slot_Access") 90 | begin_type("Time_Triggered_Plan") 91 | range("Natural range <>") 92 | end() 93 | type_access("Time_Triggered_Plan") 94 | 95 | object_protected("Time_Triggered_Scheduler") 96 | 97 | 'associations 98 | owns("TTS", "Time_Triggered_Scheduler") 99 | depends("Time_Triggered_Scheduler", "Time_Triggered_Plan") 100 | 101 | left_right("TT_Work_Id", "TT_Sync_Id") 102 | left_right("Empty_Slot", "Sync_Slot", "Work_Slot") 103 | #+end_src 104 | 105 | #+label: fig:TTS_02 106 | #+attr_latex: :width 0.8\textwidth 107 | #+caption: Package details 108 | [[file:TTS_02.eps]] 109 | 110 | #+begin_src plantuml :file TTS_04.eps :results none 111 | !include AdaML.puml 112 | 113 | begin_abstract("Time_Slot", "tagged record") 114 | attribute(1, "Slot_Duration", "Ada.Real_Time.Time_Span") 115 | end() 116 | type_access("Time_Slot") 117 | 118 | type_new("Time_Slot", "Empty_Slot", "null record") 119 | type_access("Empty_Slot") 120 | 121 | type_new("Time_Slot", "Mode_Change_Slot", "null record") 122 | type_access("Mode_Change_Slot") 123 | 124 | begin_type_new("Time_Slot", "Sync_Slot") 125 | attribute("Sync_Id", "TT_Sync_Id"); 126 | end() 127 | type_access("Sync_Slot") 128 | 129 | begin_type_new("Time_Slot", "Work_Slot") 130 | attribute("Work_Id", "TT_Work_Id") 131 | attribute("Is_Continuation", "Boolean") 132 | attribute("Padding", "Ada.Real_Time.Time_Span") 133 | end() 134 | type_access("Work_Slot") 135 | 136 | type_new("Work_Slot", "Optional_Work_Slot", "null record") 137 | type_access("Optional_Work_Slot") 138 | 139 | left_right("Time_Slot", "Time_Slot_Access") 140 | 'left_right("Optional_Work_Slot", "Work_Slot_Access") 141 | left_right("Empty_Slot", "Work_Slot", "Sync_Slot", "Mode_Change_Slot") 142 | #+end_src 143 | 144 | #+label: fig:TTS_04 145 | #+attr_latex: :width 1.0\textwidth 146 | #+caption: Package details 147 | [[file:TTS_04.eps]] 148 | 149 | #+begin_src plantuml :file TTS_05.eps :results none 150 | !include AdaML.puml 151 | 152 | begin_package("TTS") 153 | .. generic with .. 154 | attribute("Number_Of_Work_IDs", "Positive") 155 | attribute("Number_Of_Sync_IDs", "Positive", "1") 156 | end() 157 | 158 | begin_abstract("Time_Slot", "tagged record") 159 | attribute("Slot_Duration", "Ada.Real_Time.Time_Span") 160 | end() 161 | type_access("Time_Slot") 162 | 163 | array("Time_Triggered_Plan", "Time_Slot_Access") 164 | begin_type("Time_Triggered_Plan") 165 | range("Natural range <>") 166 | end() 167 | type_access("Time_Triggered_Plan") 168 | 169 | object_protected("Time_Triggered_Scheduler") 170 | 171 | 'associations 172 | owns("TTS", "Time_Triggered_Scheduler") 173 | has("Time_Triggered_Scheduler", "Time_Triggered_Plan_Access") 174 | 175 | 'geometry hints 176 | left_right("TTS", "Time_Triggered_Plan", "Time_Slot") 177 | left_right("Time_Triggered_Scheduler", "Time_Triggered_Plan_Access") 178 | #+end_src 179 | 180 | #+label: fig:TTS_05 181 | #+attr_latex: :width 0.8\textwidth 182 | #+caption: Package details 183 | [[file:TTS_05.eps]] 184 | 185 | #+begin_src plantuml :file TTS_06.eps :results none 186 | !include AdaML.puml 187 | 188 | begin_package("TTS") 189 | generic_with("Number_Of_Work_IDs : Positive") 190 | generic_with("Number_Of_Sync_IDs : Positive := 1") 191 | procedure("Set_Plan", "Time_Triggered_Plan_Access") 192 | procedure("Wait_For_Activation", "TT_Work_Id; out Ada.Real_Time.Time") 193 | procedure("Continue_Sliced") 194 | procedure("Leave_TT_Level") 195 | function("Get_Last_Plan_Release", "", "Ada.Real_Time.Time") 196 | procedure("Wait_For_Sync", "TT_Sync_Id; out Ada.Real_Time.Time") 197 | end() 198 | 199 | begin_object_protected("Time_Triggered_Scheduler") 200 | with("Priority => System.Interrupt_Priority'Last") 201 | attribute("- NS_Event", "Ada.Real_Time.Timing_Events.Timing_Event") 202 | attribute("- NS_Handler_Access", "Ada.Real_Time.Timing_Events.Timing_Event_Handler", "NS_Handler'Access") 203 | attribute("- Hold_Event", "Ada.Real_Time.Timing_Events.Timing_Event") 204 | attribute("- Hold_Handler_Access", "Ada.Real_Time.Timing_Events.Timing_Event_Handler", "Hold_Handler'Access") 205 | attribute("- Current_Plan", "Time_Triggered_Plan_Access", "null") 206 | attribute("- Next_Plan", "Time_Triggered_Plan_Access", "null") 207 | attribute("- Current_Slot_Index", "Natural", "0") 208 | attribute("- Next_slot_Index", "Natural", "0") 209 | attribute("- Next_Slot_Release", "Ada.Real_Time.Time", "Ada.Real_Time.Time_Last") 210 | attribute("- First_Slot_Release", "Ada.Real_Time.Time", "Ada.Real_Time.Time_First") 211 | procedure("Set_Plan", "Time_Triggered_Plan_Access") 212 | procedure("Prepare_For_Activation", "TT_Work_Id") 213 | procedure("Continue_Sliced") 214 | procedure("Leave_TT_Level") 215 | function("Get_Last_Plan_Release", "", "Ada.Real_Time.Time") 216 | procedure("Prepare_For_Sync", "TT_Sync_Id") 217 | procedure("- NS_Handler", "in out Ada.Real_Time.Timing_Events.Timing_Event") 218 | procedure("- Hold_Handler", "in out Ada.Real_Time.Timing_Events.Timing_Event") 219 | procedure("- Change_Plan", "At_Time : Ada.Real_Time.Time") 220 | end() 221 | 222 | 'associations 223 | owns("TTS", "Time_Triggered_Scheduler") 224 | #+end_src 225 | 226 | #+label: fig:TTS_06 227 | #+attr_latex: :width 0.8\textwidth 228 | #+caption: Package details 229 | [[file:TTS_06.eps]] 230 | --------------------------------------------------------------------------------