123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177 |
- include "primitives.alh"
- Diagram my_SCCD {
- name = "SimpleSCCD"
- author = "Yentl"
- }
- Class main {
- name = "Main"
- default = True
- constructor_body = $
- Void function const(attributes : Element, parameters : Element):
- dict_overwrite(attributes, "a", 0)
- if
- dict_overwrite(attributes, "id", 0)
- else:
- dict_overwrite(attributes, "id", parameters)
- return
- $
- }
- Attribute
- name
- }
- Attribute
- name
- }
- class_attributes
- class_attributes
- CompositeState
- name
- isInitial
- {composite_children} BasicState
- name
- isInitial
- onEntryScript
- Void
- log("ENTRY initial")
- return!
- $
- }
- {composite_children} BasicState
- name
- isInitial
- onEntryScript
- Void
- log("ENTRY exit")
- return!
- $
- }
- {composite_children} ParallelState
- name
- isInitial
- {parallel_children} CompositeState
- {composite_children} BasicState
- name
- isInitial
- onEntryScript
- Void
- log("ENTRY xa")
- return!
- $
- onExitScript
- Void
- log("EXIT xa")
- return!
- $
- }
- {composite_children} BasicState
- name
- isInitial
- onEntryScript
- Void
- log("ENTRY xb")
- return!
- $
- onExitScript
- Void
- log("EXIT xb")
- return!
- $
- }
- {composite_children} BasicState
- name
- isInitial
- }
- {composite_children} BasicState
- name
- isInitial
- }
- }
- {parallel_children} CompositeState
- {composite_children} BasicState
- name
- isInitial
- }
- {composite_children} BasicState
- name
- isInitial
- }
- }
- }
- }
- transition
- name
- event
- script
- Void
- log("In script")
- dict_overwrite(attributes, "a", 1)
- dict_overwrite(attributes, "id", 2)
- return!
- $
- }
- transition
- name
- after
- Float
- log("In after")
- return
- $
- }
- transition
- name
- cond
- Boolean
- log("In condition")
- return
- $
- }
- transition
- name
- event
- }
- Raise
- scope
- event
- parameter
- Element
- Element
- log("Executing create_instance!")
- result
- list_append(result, "Main")
- list_append(result, attributes["id"])
- dict_overwrite(attributes, "id", integer_addition(attributes["id"], 1))
- list_append(result, attributes["id"])
- return
- $
- }
- transition_raises
- transition
- name
- event
- }
- transition
- name
- event
- }
- diagram_classes
- behaviour
|