290 likes | 309 Views
Explore the benefits of integrating modeling abstractions into code through Umple, with insights from an experiment comparing Umple, Java, and UML comprehensibility levels. Results show Umple's advantages in response time and errors, validating its effectiveness.
E N D
Model Oriented Programming: An Empirical Study of Comprehension Omar Badreddin Andrew Forward Timothy C. Lethbridge try.umple.org
Technology Trend Java, C++ Pascal Levels of Abstraction Assembly Alf, Umple
What is Umple? • Model Oriented Programming • Add modeling abstractions to code • Class diagram • State machines • Model-Code Duality • State-of-the-art code generation • Open source (Google Code) • Available online (try.umple.org) as well as on the command line and in Eclipse
What else can you model in Umple • Composite state machine. • Nested • Concurrent • Do Activities in state machines • Tracing directives • Aspect-oriented concepts • Code injection (Before, After) • Certain patterns (e.g. singleton, immutable)
Development Approaches • Model-Only • Code-Only • A mix of Code and Model (Complete running systems)
Technology trend revisited for (int i = 0; i < 3; i++) main mov cx,3 loopstart: do mov dh,10 ;row 10 mov dl,20 ;column 20 call Gotoxy ;locate cursor PromptForIntegers ArraySum DisplaySum ENDP END main Java Assembly
Technology trend revisited status { On { e -> Off;} Off{ e -> Off;} } public boolean e() { booleanwasEventProcessed = false; Status aStatus = status; switch (aStatus) { case On: setStatus(Status.Off); wasEventProcessed = true; break; case Off: setStatus(Status.Off); wasEventProcessed = true; break; } return wasEventProcessed; } Umple Java
Hypothesis • H1: A system written in Umple is more comprehensible than an equivalent Java implementation of the system • H10: Umple and Java do not differ in comprehensibility • H2: A system written in Umple has a different comprehensibility level than an equivalent UML diagram of the system • H20: Umple and UML diagrams do not differ in comprehensibility
Experiment Design Umple UML Java
Experiment Design Umple UML C M M Java C
Experiment Design T V Umple UML C M M T Java C
Comparing Umple & Java T Umple Common to both: Textual syntax Complete system C M Natural advantage to Java: Familiarity T Java C
Comparing Umple and UML T V Umple UML C M M Common to both: Modeling notation Natural advantage to UML: Familiarity Model only (fewer details)
Experiment Procedure Mix of students and professionals Questions reflect comprehension and some require tracing System Example Analyze 9 Participants 3 system examples represented in 3 notations (Umple, UML, Java) 12 Questions per example Measure time, count number of incorrect responses
Average Response Time Seconds Participants
Box Plot of Response Time Time in Seconds Notation
Statistical tests • Examining Data for Umple and Java • Mann-Whitney test ((p = 8.9x10-9) • Two Tailed t-test: Umple was faster for users than Java (p=1.5x10-8) • Examining Data for Umple and UML • Mann-Whitney test (p = 0.2) • Two Tailed t-test: Umple ~ UML (p=0.9) • Number of errors
Threats of Validity • Number of Participants and their experience • Will users interpret questions consistently? • Fairness of comparing Umple, UML, and Java • Umple & Java / Umple and UML • Examples could be too simple, not realistic/representative, not ‘the same’ as each other • Time for response is very small. • External validity (can it scale to real systems?)
Conclusion • Modeling abstractions embedded in code enhances comprehensibility. • Such abstractions retain comprehensibility benefits as evident in UML. • Replication of experiment • Experimenting with larger, more complex system examples and tasks. Future Work