animating models atop open source technologies · 2013-09-09 · open source technologies nasa...

18
Animating Models atop Open Source Technologies NASA IV&V Workshop 2011 Tom Gullion < [email protected] > Wednesday, August 10, 11

Upload: others

Post on 19-Jul-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Animating Models atop Open Source Technologies · 2013-09-09 · Open Source Technologies NASA IV&V Workshop 2011 Tom Gullion  Wednesday, August 10, 11

Animating Models atop Open Source Technologies

NASA IV&V Workshop 2011Tom Gullion

<[email protected]>

Wednesday, August 10, 11

Page 2: Animating Models atop Open Source Technologies · 2013-09-09 · Open Source Technologies NASA IV&V Workshop 2011 Tom Gullion  Wednesday, August 10, 11

Model Animator CapabilitiesExecute UML2 Activities

without lots of configuration, markup or action languageanimates control flows, forks, joins, decisions and merges

UML Profile for linking Activities, State Machines and Operationstrigger multiple state machines

mark Actions to trigger UML2 state machine transitionsforce transitions to specified state in state machines

useful if input model does not have well-formed triggerscall class operations

mark Actions to call UML2 Class operationsoptionally invoke external classes

Visual debuggerSave and load scenariosRequirements integration

Wednesday, August 10, 11

Page 3: Animating Models atop Open Source Technologies · 2013-09-09 · Open Source Technologies NASA IV&V Workshop 2011 Tom Gullion  Wednesday, August 10, 11

Heritage

Basic premise built upon Basis Path Testing concepts by Thomas McCabe

minimum number of test cases will equal Cyclomatic Complexity

Cyclomatic Complexity (CC) is a metric which measures the number of linearly independent paths

our coverage calculation is based on CC

Initial version attempted to re-animated logged test data

“play back” event data against modeled behaviors

Originally built upon Borland’s Together modeling products

Wednesday, August 10, 11

Page 4: Animating Models atop Open Source Technologies · 2013-09-09 · Open Source Technologies NASA IV&V Workshop 2011 Tom Gullion  Wednesday, August 10, 11

Port to Open Source Software (OSS)

Why?

support NASA open source initiative

http://www.nasa.gov/open/source/

remove software licensing restrictions

easier to install

adopt latest and greatest Eclipse versions

enable collaborations between agencies?

Wednesday, August 10, 11

Page 5: Animating Models atop Open Source Technologies · 2013-09-09 · Open Source Technologies NASA IV&V Workshop 2011 Tom Gullion  Wednesday, August 10, 11

Activity Model Example

Activity Model Traced requirement

Scenario: linear path through Activity

Results

Wednesday, August 10, 11

Page 6: Animating Models atop Open Source Technologies · 2013-09-09 · Open Source Technologies NASA IV&V Workshop 2011 Tom Gullion  Wednesday, August 10, 11

Activity Model Example (recap)Setup:

select path through Activity

What was tested:

“flow of control” test within Activity

Value:

validate structure of Activity

detect changes if the model is updated later

run suite of tests against model, unaniticipated errors indicate changes

provides evidence for WBS 5.1 (trace behavior to requirement) and 5.2 (design provides capability)

Wednesday, August 10, 11

Page 7: Animating Models atop Open Source Technologies · 2013-09-09 · Open Source Technologies NASA IV&V Workshop 2011 Tom Gullion  Wednesday, August 10, 11

Activity + State Machine Example

transition

transition

transition

Wednesday, August 10, 11

Page 8: Animating Models atop Open Source Technologies · 2013-09-09 · Open Source Technologies NASA IV&V Workshop 2011 Tom Gullion  Wednesday, August 10, 11

Activity + State Machine Example (recap)Setup:

mark Actions as <<StateTransition>> and link to states

What was tested:

“flow of control” test

state machine semantics

Value:

validate structure of UML Activity

ensure flow follows rules specified in state machine

provides evidence of WBS 5.3 (feasibility), 5.5 (algorithms, nominal and off-nominal conditions)

Note:

it‘s possible to trigger multiple state machines (for complex activities that interact with multiple controllers)

Wednesday, August 10, 11

Page 9: Animating Models atop Open Source Technologies · 2013-09-09 · Open Source Technologies NASA IV&V Workshop 2011 Tom Gullion  Wednesday, August 10, 11

Activity + State Machine + Operation example

Wednesday, August 10, 11

Page 10: Animating Models atop Open Source Technologies · 2013-09-09 · Open Source Technologies NASA IV&V Workshop 2011 Tom Gullion  Wednesday, August 10, 11

Activity + State Machine + Operation Example (recap)

Setup:

mark Actions as <<TriggerTransition>> and link to Triggers

mark Actions as <<CallOperation>> and link to Operations

What was tested:

“flow of control” test

state machine semantics

operation constraints, if any

Value:

validate structure of UML Activity

ensure flow follows rules specified in state machine

establish connection to emerging API

provides evidence of WBS 5.4 (interfaces correct), 5.6 (dependability, fault tolerance)

Wednesday, August 10, 11

Page 11: Animating Models atop Open Source Technologies · 2013-09-09 · Open Source Technologies NASA IV&V Workshop 2011 Tom Gullion  Wednesday, August 10, 11

Activity + StateMachine + Operation + External Class Example

Instantiate external class and call method(s)

Wednesday, August 10, 11

Page 12: Animating Models atop Open Source Technologies · 2013-09-09 · Open Source Technologies NASA IV&V Workshop 2011 Tom Gullion  Wednesday, August 10, 11

Activity + StateMachine + Oper + Ext Class Ex (recap)Setup:

mark Actions as <<TriggerTransition>> and link to Triggers

mark Actions as <<CallOperation>> and link to Operations

acquire or develop external classes and configure classpath

What was tested:

“flow of control” test

state machine semantics

operation constraints, if any

external classes enable integrations (with external “solvers” or other)

Value:

validate structure of UML Activity

ensure flow follows rules specified in state machine

establish connection to emerging API

provides further evidence of WBS 5.5 (complex algorithms)

Wednesday, August 10, 11

Page 13: Animating Models atop Open Source Technologies · 2013-09-09 · Open Source Technologies NASA IV&V Workshop 2011 Tom Gullion  Wednesday, August 10, 11

MockObjects

MockObjects are software “stubs” which are used to set and verify expectations on interactions

Commonly used in Agile programming

Reasons to use Mock Objects

temporarily stand in for servers and/or hardware, until real object is available

real object is difficult to install and setup, or is unavailable

control object performance under normal and adverse conditions

start testing sooner (rather than waiting for physical hardware)

Wednesday, August 10, 11

Page 14: Animating Models atop Open Source Technologies · 2013-09-09 · Open Source Technologies NASA IV&V Workshop 2011 Tom Gullion  Wednesday, August 10, 11

Using MockObjects for IV&V

Applicability to IV&V

start IV&V sooner, instead of waiting for test environments

evaluate designs very early (against mock software and/or hardware)

play out “Question 2” and “Question 3” scenarios in a local, easily configured and always available environment

Mock Hardware demoed today...

Arduino “open source” ~$50 microcontroller

has IDE including gnu C and C++ compiler

well documented

serial communication bus

Wednesday, August 10, 11

Page 15: Animating Models atop Open Source Technologies · 2013-09-09 · Open Source Technologies NASA IV&V Workshop 2011 Tom Gullion  Wednesday, August 10, 11

Activity + State Machine + Operation + External Class + External Hardware Example

Tip: customize statemachine autocoder to

generate mock FSW

External Class

HW serial comm

That’s an extremely crude mock traffic

light!

Wednesday, August 10, 11

Page 16: Animating Models atop Open Source Technologies · 2013-09-09 · Open Source Technologies NASA IV&V Workshop 2011 Tom Gullion  Wednesday, August 10, 11

Setup:mark Actions as <<TriggerTransition>> and link to Triggers

mark Actions as <<CallOperation>> and link to Operations

acquire or develop external classes and configure classpath

deploy state machine code to HW

customize project’s statechart autocoderWhat was tested:

“flow of control” test

state machine semantics

operation constraints, if any

external classes enable integrations (with external “solvers” or other)hardware interaction

Value:

validate structure of UML Activity

ensure flow follows rules specified in state machine

establish connection to emerging APIhardware in the loop simulation

deeper understanding of the system

provides final evidence of WBS 5.5 (complex algorithms), useful for gathering early performance metrics

Activity + State Machine + Operation + External Class + External Hardware Example

Wednesday, August 10, 11

Page 17: Animating Models atop Open Source Technologies · 2013-09-09 · Open Source Technologies NASA IV&V Workshop 2011 Tom Gullion  Wednesday, August 10, 11

Thank you!

Tom Gullion<[email protected]>

Wednesday, August 10, 11

Page 18: Animating Models atop Open Source Technologies · 2013-09-09 · Open Source Technologies NASA IV&V Workshop 2011 Tom Gullion  Wednesday, August 10, 11

Acknowledgements

Special thanks to Frank Huy, Don Kranz, Karl Frank

References

NASA Open Source Summit http://www.nasa.gov/open/source/

NASA IV&V Technical Framework Rev N http://www.nasa.gov/centers/ivv/pdf/170825main_IVV%2009-1%20-%20Rev%20N.pdf

McCabe Cyclomatic Complexity

http://www.mccabe.com/

MockObjects

http://c2.com/cgi/wiki?MockObject

Arduino

http://www.arduino.cc/

Wednesday, August 10, 11