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

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

description

Extending Training Capability Through The Use of Embedded Domain-Specific Languages in Training Devices. John Aughey. Point of this discussion. Incorporate a scripting language into all software Leverage that embedded scripting language during development Expose that language to the end user - PowerPoint PPT Presentation

Transcript of Extending Training Capability Through The Use of Embedded Domain-Specific Languages in Training...

Page 1: Extending Training Capability Through The Use of Embedded Domain-Specific Languages in Training Devices

Extending Training Capability Extending Training Capability Through The Use of Through The Use of

Embedded Domain-Specific Embedded Domain-Specific Languages in Training Languages in Training

DevicesDevicesJohn AugheyJohn Aughey

Page 2: Extending Training Capability Through The Use of Embedded Domain-Specific Languages in Training Devices

Point of this discussionPoint of this discussion Incorporate a scripting language into Incorporate a scripting language into

all softwareall software Leverage that embedded scripting Leverage that embedded scripting

language during developmentlanguage during development

Expose that language to the end userExpose that language to the end user Allow end users to use this language Allow end users to use this language

to extend and enhance usabilityto extend and enhance usability

Page 3: Extending Training Capability Through The Use of Embedded Domain-Specific Languages in Training Devices

Typical Flight Training SimulatorTypical Flight Training Simulator

Instructor/Operator Station

Brief/Debrief System

Threat Stations

Crew Station

Tactical Environment

Visual System

Interface

Interface

Interface

Interface

Interface

Interface

Inte

rnal

In

terf

aces

Real-Time HostReal-Time Host

Page 4: Extending Training Capability Through The Use of Embedded Domain-Specific Languages in Training Devices

System of SystemsSystem of Systems

Collaboration of many systems

Page 5: Extending Training Capability Through The Use of Embedded Domain-Specific Languages in Training Devices

Examples of embedded domain-Examples of embedded domain-specific languagesspecific languages

3-D Modeling

SpreadsheetsInteractive Content

Internet Browsers

Page 6: Extending Training Capability Through The Use of Embedded Domain-Specific Languages in Training Devices
Page 7: Extending Training Capability Through The Use of Embedded Domain-Specific Languages in Training Devices

Available Scripting LanguagesAvailable Scripting Languages

Ruby Ruby PerlPerl PythonPython ECMAScriptECMAScript LUALUA

SmalltalkSmalltalk TclTcl ChCh RBScriptRBScript GuileGuile

Don’t reinvent the wheel!

Page 8: Extending Training Capability Through The Use of Embedded Domain-Specific Languages in Training Devices

Exposed InterfaceExposed Interface

1.1. aircraft.digital_inputs[FLAPS] = 2;aircraft.digital_inputs[FLAPS] = 2;2.2. threat_environment->addThreat(new threat_environment->addThreat(new

ThreatAircraft(MIG_29, aircraft.altitude, ThreatAircraft(MIG_29, aircraft.altitude, position_offset(aircraft.latitude,aircraft.position_offset(aircraft.latitude,aircraft.longitude,aircraft.bearing,3*MILES_TO_FEET)longitude,aircraft.bearing,3*MILES_TO_FEET)));));

1.1. aircraft.extend_flapsaircraft.extend_flaps2.2. create_threat create_threat “MIG29”“MIG29”, :distance => , :distance => 3.miles3.miles

In contrast to…

Readable, approachable language

Page 9: Extending Training Capability Through The Use of Embedded Domain-Specific Languages in Training Devices

How to EmbedHow to Embed

Frame-basedFrame-based Top-of-loopTop-of-loop SCRIPT(begin)SCRIPT(begin) ComputationComputation SCRIPT(end)SCRIPT(end) LoopLoop

Event BasedEvent Based Mouse ClicksMouse Clicks Button PressesButton Presses Weapons LaunchWeapons Launch Entity DamageEntity Damage Entity InteractionEntity Interaction

Application includes “hooks” where the scripting language can control the application.

Page 10: Extending Training Capability Through The Use of Embedded Domain-Specific Languages in Training Devices

Life cycle of Embedded DSLLife cycle of Embedded DSL

Improved Requirements DefinitionImproved Requirements Definition Automated TestingAutomated Testing Rapid IntegrationRapid Integration Simplified User InterfacesSimplified User Interfaces Extendable SoftwareExtendable Software

Page 11: Extending Training Capability Through The Use of Embedded Domain-Specific Languages in Training Devices

Requirements DefinitionRequirements Definition The The gear shall not extend abovegear shall not extend above 10,000 10,000

feetfeet

DSL specificationDSL specificationcontext “context “The aircraft above 10,000 feetThe aircraft above 10,000 feet” {” { setup { ………………… }setup { ………………… } specify “specify “should not allow gear to extendshould not allow gear to extend” ” {{ ………………… …………………

}}}}

Page 12: Extending Training Capability Through The Use of Embedded Domain-Specific Languages in Training Devices

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

Page 13: Extending Training Capability Through The Use of Embedded Domain-Specific Languages in Training Devices

Conceptual vs Functional Conceptual vs Functional RequirementsRequirements

Functional Requirements have a Functional Requirements have a measurable behaviormeasurable behavior

Conceptual Requirements are Conceptual Requirements are difficult to define concretelydifficult to define concretely• User Interface InteractionUser Interface Interaction• Incomplete Understanding of use caseIncomplete Understanding of use case• Results in over defined or ill-defined Results in over defined or ill-defined

requirementsrequirements

Page 14: Extending Training Capability Through The Use of Embedded Domain-Specific Languages in Training Devices

ExampleExample The operator software must provide The operator software must provide

a way to induce the following failure a way to induce the following failure conditions:conditions:• Engine fireEngine fire• Loss of rudder controlLoss of rudder control• COMM failureCOMM failure• HUD failureHUD failure

Defined by curriculumDefined by curriculum

Page 15: Extending Training Capability Through The Use of Embedded Domain-Specific Languages in Training Devices

ImplementationImplementation Provide the operator a menu with a Provide the operator a menu with a

list of these failures, and a button to list of these failures, and a button to induce the selected failureinduce the selected failure

Page 16: Extending Training Capability Through The Use of Embedded Domain-Specific Languages in Training Devices

Next software updateNext software update New requirementNew requirement

• Define a conditional value into the failure Define a conditional value into the failure menu to avoid needing to monitor the menu to avoid needing to monitor the altitude indicator manually. Other altitude indicator manually. Other failures might need different conditionals failures might need different conditionals for altitude, airspeed, orientation, flight for altitude, airspeed, orientation, flight time, and so on.time, and so on.

• All of these different possible conditions All of these different possible conditions are added to the requirement in lengthy are added to the requirement in lengthy detail.detail.

Page 17: Extending Training Capability Through The Use of Embedded Domain-Specific Languages in Training Devices

Discovered problemDiscovered problem In practice, however, the operator soon In practice, however, the operator soon

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

Page 18: Extending Training Capability Through The Use of Embedded Domain-Specific Languages in Training Devices

Next software updateNext software update New RequirementNew Requirement

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

Page 19: Extending Training Capability Through The Use of Embedded Domain-Specific Languages in Training Devices

DSL SolutionDSL Solution Expose the following failure triggers Expose the following failure triggers

to the scripting languageto the scripting language• Engine fireEngine fire• Loss of rudder controlLoss of rudder control• COMM failureCOMM failure• HUD failureHUD failure

Page 20: Extending Training Capability Through The Use of Embedded Domain-Specific Languages in Training Devices

Operator ProgramOperator Programdescription “Fail the rudder 10 seconds description “Fail the rudder 10 seconds after wheels-up”after wheels-up”

trigger :action => trigger :action => { Failures.trigger :rudder },{ Failures.trigger :rudder },

:when => { wheels_up_time > 10 }:when => { wheels_up_time > 10 }

Page 21: Extending Training Capability Through The Use of Embedded Domain-Specific Languages in Training Devices

Engine Fire ProgramEngine Fire Programdescription “Trigger an engine fire once the description “Trigger an engine fire once the aircraft reaches 20000 feet”aircraft reaches 20000 feet”

trigger :action => { Failures.trigger trigger :action => { Failures.trigger :engine_fire_left }, :engine_fire_left },

:when => { altitude > 20000.feet :when => { altitude > 20000.feet and rate_of_climb < 10.feet.per.second and rate_of_climb < 10.feet.per.second }}

Page 22: Extending Training Capability Through The Use of Embedded Domain-Specific Languages in Training Devices

Simplified/Extendable User Simplified/Extendable User InterfacesInterfaces

Push “decision making” out to the Push “decision making” out to the scripting languagescripting language• Native codeNative code

Processor intensive computationProcessor intensive computation Graphics/RenderingGraphics/Rendering Device interactionDevice interaction

• Scripting codeScripting code What, where, when, whyWhat, where, when, why

Page 23: Extending Training Capability Through The Use of Embedded Domain-Specific Languages in Training Devices

Spot Meter Lab SoftwareSpot Meter Lab Software

when_created dowhen_created doopen_log_fileopen_log_file "gammameasurements" "gammameasurements"

set_intensityset_intensity 0 0 set_time_of_dayset_time_of_day “ “midnightmidnight””set_test_patternset_test_pattern " "rectanglerectangle""set_testpattern_sizeset_testpattern_size 4.0 4.0drop_readingsdrop_readings 20 20

endendfor_each_reading dofor_each_reading do

write_logwrite_log intensity,measured_intensity intensity,measured_intensityincrement_intensity_byincrement_intensity_by 4 4drop_readingsdrop_readings 4 4

endend

Page 24: Extending Training Capability Through The Use of Embedded Domain-Specific Languages in Training Devices

Customer Extendable SoftwareCustomer Extendable Software