Presentation is loading. Please wait.

Presentation is loading. Please wait.

Extending Training Capability Through The Use of Embedded Domain-Specific Languages in Training Devices John Aughey.

Similar presentations


Presentation on theme: "Extending Training Capability Through The Use of Embedded Domain-Specific Languages in Training Devices John Aughey."— Presentation transcript:

1 Extending Training Capability Through The Use of Embedded Domain-Specific Languages in Training Devices John Aughey

2 Point of this discussion Incorporate a scripting language into all software Incorporate a scripting language into all software Leverage that embedded scripting language during development Leverage that embedded scripting language during development Expose that language to the end user Expose that language to the end user Allow end users to use this language to extend and enhance usability Allow end users to use this language to extend and enhance usability

3 Typical Flight Training Simulator Instructor/Operator Station Brief/Debrief System Threat Stations Crew Station Tactical Environment Visual System Interface Internal Interfaces Real-Time Host

4 System of Systems Collaboration of many systems

5 Examples of embedded domain- specific languages 3-D Modeling Spreadsheets Interactive Content Internet Browsers

6

7 Available Scripting Languages Ruby Ruby Perl Perl Python Python ECMAScript ECMAScript LUA LUA Smalltalk Smalltalk Tcl Tcl Ch Ch RBScript RBScript Guile Guile Don’t reinvent the wheel!

8 Exposed Interface 1.aircraft.digital_inputs[FLAPS] = 2; 2.threat_environment->addThreat(new ThreatAircraft(MIG_29, aircraft.altitude, position_offset(aircraft.latitude,aircraft. longitude,aircraft.bearing,3*MILES_TO_FEET) )); 1. aircraft.extend_flaps 2. create_threat “MIG29”, :distance => 3.miles In contrast to… Readable, approachable language

9 How to Embed Frame-based Top-of-loop Top-of-loop SCRIPT(begin) SCRIPT(begin) Computation Computation SCRIPT(end) SCRIPT(end) Loop Loop Event Based Mouse Clicks Mouse Clicks Button Presses Button Presses Weapons Launch Weapons Launch Entity Damage Entity Damage Entity Interaction Entity Interaction Application includes “hooks” where the scripting language can control the application.

10 Life cycle of Embedded DSL Improved Requirements Definition Improved Requirements Definition Automated Testing Automated Testing Rapid Integration Rapid Integration Simplified User Interfaces Simplified User Interfaces Extendable Software Extendable Software

11 Requirements Definition The gear shall not extend above 10,000 feet The gear shall not extend above 10,000 feet DSL specification context “The aircraft above 10,000 feet” { setup { ………………… } setup { ………………… } specify “should not allow gear to extend” { specify “should not allow gear to extend” { ………………… ………………… }}

12 context “The aircraft above 10,000 feet" { setup { setup { initial_conditions :altitude => 10000.feet initial_conditions :altitude => 10000.feet } specify “should not allow gear to extend" { aircraft.lower_gear aircraft.lower_gear aircraft.gear_should_be “up” aircraft.gear_should_be “up” } specify “should not allow flaps to extend" { aircraft.extend_flaps aircraft.extend_flaps aircraft.flaps_should_be “retracted” aircraft.flaps_should_be “retracted” }}

13 Conceptual vs Functional Requirements Functional Requirements have a measurable behavior Functional Requirements have a measurable behavior Conceptual Requirements are difficult to define concretely Conceptual Requirements are difficult to define concretely User Interface InteractionUser Interface Interaction Incomplete Understanding of use caseIncomplete Understanding of use case Results in over defined or ill-defined requirementsResults in over defined or ill-defined requirements

14 Example The operator software must provide a way to induce the following failure conditions: The operator software must provide a way to induce the following failure conditions: Engine fireEngine fire Loss of rudder controlLoss of rudder control COMM failureCOMM failure HUD failureHUD failure Defined by curriculum Defined by curriculum

15 Implementation Provide the operator a menu with a list of these failures, and a button to induce the selected failure Provide the operator a menu with a list of these failures, and a button to induce the selected failure

16 Next software update New requirement New requirement Define a conditional value into the failure menu to avoid needing to monitor the altitude indicator manually. Other failures might need different conditionals for altitude, airspeed, orientation, flight time, and so on.Define a conditional value into the failure menu to avoid needing to monitor the altitude indicator manually. Other failures might need different conditionals for altitude, airspeed, orientation, flight time, and so on. All of these different possible conditions are added to the requirement in lengthy detail.All of these different possible conditions are added to the requirement in lengthy detail.

17 Discovered problem In practice, however, the operator soon discovers the failure event triggers too fast, because the instant the altitude hits 20,000 feet, the engine fire failure triggers. The training need is really engine failure at level flight, so the failure really needs to happen as a result of two conditions being met, a given altitude and a given rate of climb. In practice, however, the operator soon discovers the failure event triggers too fast, because the instant the altitude hits 20,000 feet, the engine fire failure triggers. The training need is really engine failure at level flight, so the failure really needs to happen as a result of two conditions being met, a given altitude and a given rate of climb.

18 Next software update New Requirement New Requirement All failure conditions must have an operator defined conditional statement. Once the entire conditional statement is satisfied, the failure will occur. At least 10 different conditional statements must be definable by the operator for each failure condition with the option to chain the statements together with AND or OR logic operators. At least 16 failure conditions can be ready to be triggered at any point in the training scenario.All failure conditions must have an operator defined conditional statement. Once the entire conditional statement is satisfied, the failure will occur. At least 10 different conditional statements must be definable by the operator for each failure condition with the option to chain the statements together with AND or OR logic operators. At least 16 failure conditions can be ready to be triggered at any point in the training scenario.

19 DSL Solution Expose the following failure triggers to the scripting language Expose the following failure triggers to the scripting language Engine fireEngine fire Loss of rudder controlLoss of rudder control COMM failureCOMM failure HUD failureHUD failure

20 Operator Program description “Fail the rudder 10 seconds after wheels-up” trigger :action => { Failures.trigger :rudder }, trigger :action => { Failures.trigger :rudder }, :when => { wheels_up_time > 10 } :when => { wheels_up_time > 10 }

21 Engine Fire Program description “Trigger an engine fire once the aircraft reaches 20000 feet” trigger :action => { Failures.trigger :engine_fire_left }, trigger :action => { Failures.trigger :engine_fire_left }, :when => { altitude > 20000.feet and rate_of_climb { altitude > 20000.feet and rate_of_climb < 10.feet.per.second }

22 Simplified/Extendable User Interfaces Push “decision making” out to the scripting language Native codeNative code Processor intensive computation Processor intensive computation Graphics/Rendering Graphics/Rendering Device interaction Device interaction Scripting codeScripting code What, where, when, why What, where, when, why

23 Spot Meter Lab Software when_created do open_log_file "gammameasurements" set_intensity 0 set_time_of_day “midnight” set_test_pattern "rectangle" set_testpattern_size 4.0 drop_readings 20 end for_each_reading do write_log intensity,measured_intensity increment_intensity_by 4 drop_readings 4 end

24 Customer Extendable Software


Download ppt "Extending Training Capability Through The Use of Embedded Domain-Specific Languages in Training Devices John Aughey."

Similar presentations


Ads by Google