1 / 9

SAFER++

SAFER++. VDM++ and UML Thomas Christensen & Tommy Pedersen. Requirements. The specification contains all requirements Our additional requirement: R1: The avionics software shall compensate for a single defective thruster. UML diagram. The existing model contains 15 classes

lynda
Download Presentation

SAFER++

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. SAFER++ VDM++ and UML Thomas Christensen & Tommy Pedersen

  2. Requirements • The specification contains all requirements • Our additional requirement: • R1: The avionics software shall compensate for a single defective thruster.

  3. UML diagram • The existing model contains 15 classes • For our model we only need 2 + 1 added class • New class ThrusterMonitor abstracts away from actual Thruster objects

  4. UML diagram • The classes we will affect Our Added Class

  5. The ThrusterMonitor Class • Interface to Thruster class • One operation: getDefectiveThrusters() • Returns set of defective thruster positions instead of thruster objects

  6. VDM++ for ThrusterMonitor 8: class ThrusterMonitor 9: 10: instance variables 11: private Thrusters : set of Thruster; 12: private DefectiveThrusters : set of ThrusterControl`ThrusterPosition; 13: 14: operations 15: public getDefectiveThrusters : () ==> set of ThrusterControl`ThrusterPosition 16: getDefectiveThrusters() == 17: return DefectiveThrusters; 18: 19: 20: end ThrusterMonitor

  7. VDM++ for ThrusterControl 1 public OppositeMap : map ThrusterPosition to ThrusterPosition = {<B1> |-> <F1>, <B2> |-> <F2>, <B3> |-> <F3>, <B4> |-> <F4>, <F1> |-> <B1>, <F2> |-> <B2>, <F3> |-> <B3>, <F4> |-> <B4>, <L1R> |-> <R2R>, <L1F> |-> <R2F>, <R2R> |-> <L1R>, <R2F> |-> <L1F>, <L3R> |-> <R4R>, <L3F> |-> <R4F>, <R4R> |-> <L3R>, <R4F> |-> <L3F>, <D1R> |-> <U3R>, <D1F> |-> <U3F>, <D2R> |-> <U4R>, <D2F> |-> <U4F>, <U3R> |-> <D1R>, <U3F> |-> <D1F>, <U4R> |-> <D2R>, <U4F> |-> <D2F> }; • Maps opposite thruster positions • Equivalent map made for diagonally opposite thrusters

  8. VDM++ for ThrusterControl 2 • The ThrusterControl class needs to check the thrusters before selecting them • If one is defective it uses the maps to figure out which thrusters to use • This algorithm is not yet implemented

  9. Existing VDM++ for Workspace • This will not be altered: 31: public 32: ControlCycle : Command`Direction * Command`Direction * Command`Direction * 33: Command`Direction * 34: HandControlUnit`Mode * HandControlUnit`Button * 35: Command`AxisMap ==> 36: set of ThrusterControl`ThrusterPosition 37: ControlCycle(x,pitch,yaw_y,roll_z,modeswitch,aahbutton,aahcmd) == 38: (clock.IncrTime(); 39: hcu.SetAAH(aahbutton); 40: hcu.SetGrip(x, pitch, yaw_y, roll_z); 41: hcu.SetMode(modeswitch); 42: aah.SetRotcmd(aahcmd); 43: intcmd.ConvertGrip(); 44: aah.Update(); 45: intcmd.IntegrateCmds(); 46: thrcontrol.SelectThrusters(); 47: thrcontrol.SignalThrusters(); 48: vda.ThrustersOn())

More Related