Skip to content

Instantly share code, notes, and snippets.

@juli1
Created August 21, 2013 15:00
Show Gist options
  • Save juli1/6295598 to your computer and use it in GitHub Desktop.
Save juli1/6295598 to your computer and use it in GitHub Desktop.
package TestErrorLibrary
public
with ErrorLibrary, EMV2, test_pkg;
annex EMV2 {**
error types extends ErrorLibrary with
No_Flow_Cmd: type extends ServiceOmission;
Bad_Flow_Cmd: type extends BadValue;
Bad_Data: type extends BadValue;
Default_Data: type;
end types;
error behavior Simple
events
Failure: error event;
states
Operational: initial state;
Failed: state;
transitions
BadValueTransition : Operational -[Failure]-> Failed;
end behavior;
error behavior three
events
p11: error event;
p12: error event;
p13: error event;
p21: error event;
p22: error event;
p23: error event;
p31: error event;
p32: error event;
p33: error event;
states
nominal: initial state;
bad_data: state;
failed: state;
transitions
tp11: nominal -[p11]-> nominal;
tp12: nominal -[p12]-> bad_data;
tp13: nominal -[p13]-> failed;
--
tp21: bad_data -[p21]-> nominal;
tp22: bad_data -[p22]-> bad_data;
tp23: bad_data -[p23]-> failed;
--
tp31: failed -[p31]-> nominal;
tp32: failed -[p32]-> bad_data;
tp33: failed -[p33]-> failed;
end behavior;
**};
end TestErrorLibrary;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment