Skip to content
Snippets Groups Projects
Commit aa7cd8aa authored by Giammarco, Kristin M's avatar Giammarco, Kristin M
Browse files

Merge branch 'master' into 'Keane_Branch'

# Conflicts:
#   Example01_SimpleMessageFlow_EventCoordination.mp
#   Example01a_UnreliableMessageFlow_VirtualEvents.mp
#   Example02_DataFlow_EventSharing.mp
#   Example03_ATMWithdrawal_BehaviorOfEnvironment.mp
#   Example06_UnreliableChannel_AssertionChecking.mp
#   Example09_PipeFilter_TraceAnnotationQueries.mp
#   Example12_CardiacArrestWorkflow_VirtualEvents.mp
#   Example15_BackpackWeight_IntervalAttributes.mp
#   Example18_RedGreen_BayesianProbabilityCalculationsType2.mp
#   Example21_DataFlow_LocalReport.mp
#   Example22_SimpleMessageFlow_GlobalReport.mp
#   Example24_Compiler_ComponentDiagram.mp
#   Example25_Graph_as_Data_Structure.mp
#   Example26_UnreliableMessageFlow_GlobalQuery.mp
#   Example28_AssemblingStatistics_Histogram.mp
#   Example29_AssemblingStatistics_Gantt_Chart.mp
#   Example30_MicrowaveOven_ModelingModelChecking.mp
#   Example33_ATMWithdrawal_StatechartView.mp
#   Example35_FiniteStateDiagram_PathDiagram.mp
#   Example36_Authentication_SystemReuse.mp
parents f2268f64 51979e9b
No related branches found
No related tags found
2 merge requests!6Keane branch,!5Keane branch
Showing
with 89 additions and 50 deletions
/******************************************************************************* /* Model of [Authentication]
A Model for Simple Authentication A Model for Simple Authentication
...@@ -9,7 +9,7 @@ constraints. ...@@ -9,7 +9,7 @@ constraints.
modified by K.Giammarco on 08/07/2017 for capitalization of state events modified by K.Giammarco on 08/07/2017 for capitalization of state events
modified by K.Giammarco on 08/07/2017 for ENSURE constraints modified by K.Giammarco on 08/07/2017 for ENSURE constraints
********************************************************************************/ ==========================================================*/
SCHEMA Authentication SCHEMA Authentication
...@@ -53,4 +53,4 @@ ENSURE #CREDS_INVALID <= 3; ...@@ -53,4 +53,4 @@ ENSURE #CREDS_INVALID <= 3;
ENSURE #Deny_access >= 3 <-> #Lock_account == 1; ENSURE #Deny_access >= 3 <-> #Lock_account == 1;
ENSURE #Grant_access >= 1 -> #Lock_account == 0; ENSURE #Grant_access >= 1 -> #Lock_account == 0;
\ No newline at end of file
/* A model of an autonomous car that was used to support a failure mode /* Model of [Autonomous_Car]
A model of an autonomous car that was used to support a failure mode
analysis of autonomous automobile technology (student project). analysis of autonomous automobile technology (student project).
Created by G. Kaminski, November 2015 Created by G. Kaminski, November 2015
*/
==========================================================*/
SCHEMA Autonomous_Car SCHEMA Autonomous_Car
...@@ -55,4 +58,4 @@ COORDINATE $a: Confirm_Destination_Found FROM Car, ...@@ -55,4 +58,4 @@ COORDINATE $a: Confirm_Destination_Found FROM Car,
COORDINATE $a: ( Enter_New_Destination | COORDINATE $a: ( Enter_New_Destination |
Confirm_Destination ) FROM User, Confirm_Destination ) FROM User,
$b: Begin_Trip FROM Car $b: Begin_Trip FROM Car
DO ADD $a PRECEDES $b; OD; DO ADD $a PRECEDES $b; OD;
\ No newline at end of file
/* A Simple Model of Beginner MP-Firebird Use /* Model of [Beginner_Use_of_MP]
A Simple Model of Beginner MP-Firebird Use
created by K.Giammarco 2021-02-08 created by K.Giammarco 2021-02-08
This model provides an orientation for those just getting started using This model provides an orientation for those just getting started using
...@@ -19,8 +21,9 @@ You may also make changes to this model and run it with your changes. ...@@ -19,8 +21,9 @@ You may also make changes to this model and run it with your changes.
Save your model using the EXPORT button ("Code" exports a .mp text file Save your model using the EXPORT button ("Code" exports a .mp text file
of the contents of the text editor, and "Code and Event Trace" exports of the contents of the text editor, and "Code and Event Trace" exports
the contents of the text editor plus the graphs and any changes you made the contents of the text editor plus the graphs and any changes you made
to the graph element positions. */ to the graph element positions.
==========================================================*/
SCHEMA Beginner_Use_of_MP SCHEMA Beginner_Use_of_MP
...@@ -86,4 +89,4 @@ IF #Find_issue >1 THEN ...@@ -86,4 +89,4 @@ IF #Find_issue >1 THEN
ELSE IF #Find_issue ==1 THEN ELSE IF #Find_issue ==1 THEN
SAY( #Find_issue " issue was discovered"); SAY( #Find_issue " issue was discovered");
FI; FI;
FI; FI;
\ No newline at end of file
/* Cargo Screening process model /* Model of [CargoScreening]
Cargo Screening process model
May 6, 2011, draft written by Mikhail Auguston, NPS, Monterey, CA May 6, 2011, draft written by Mikhail Auguston, NPS, Monterey, CA
source: source:
Department of Homeland Security Department of Homeland Security
...@@ -18,7 +20,7 @@ MP-Firebird may be used at least for the following: ...@@ -18,7 +20,7 @@ MP-Firebird may be used at least for the following:
was it always preceded by ThreatIsNotFound or No_high_risk_cargo_selected events?" was it always preceded by ThreatIsNotFound or No_high_risk_cargo_selected events?"
- typical query may be: "show all scenarios when Loading event does not happen" - typical query may be: "show all scenarios when Loading event does not happen"
*/ ==========================================================*/
SCHEMA CargoScreening SCHEMA CargoScreening
......
/* Model of a commercial flight, November 27, 2013 /* Model of [Commercial_Flight]
Model of a commercial flight, November 27, 2013
This model demonstrates the interlacing of root events as Phases This model demonstrates the interlacing of root events as Phases
and as Actors. The commented out code at the bottom represents and as Actors. The commented out code at the bottom represents
a simulation of COORDINATE statements with SHARE ALL statements before a simulation of COORDINATE statements with SHARE ALL statements before
COORDINATE statements were implemented in the early MP tools. COORDINATE statements were implemented in the early MP tools.
*/ ==========================================================*/
/*----------------------------------------------------- /*-----------------------------------------------------
Phases Phases
......
/*************************************** /* Model of [Cycle_Pattern]
Cycle_ISP Model for Systems Journal Article Cycle_ISP Model for Systems Journal Article
Available at https://www.mdpi.com/2079-8954/6/2/18 Available at https://www.mdpi.com/2079-8954/6/2/18
created 2018-03-10 by K.Giammarco created 2018-03-10 by K.Giammarco
...@@ -18,7 +19,7 @@ the different possible patterns for Cycle. ...@@ -18,7 +19,7 @@ the different possible patterns for Cycle.
Running at scope 1 will generate zero traces because Running at scope 1 will generate zero traces because
of the ENSURE constraint on line 29. of the ENSURE constraint on line 29.
****************************************/ ==========================================================*/
SCHEMA Cycle_ISP_v2 SCHEMA Cycle_ISP_v2
......
/* Example 17, Dining_Philosophers.mp /* Model of [Dining_Philosophers]
Example 17, Dining_Philosophers.mp
Five silent philosophers sit at a table around a bowl of spaghetti. Five silent philosophers sit at a table around a bowl of spaghetti.
A fork is placed between each pair of adjacent philosophers. A fork is placed between each pair of adjacent philosophers.
It was originally formulated in 1965 by Edsger Dijkstra. It was originally formulated in 1965 by Edsger Dijkstra.
...@@ -30,7 +32,8 @@ scope 3 yields 6 traces in approx. 0.05 sec. ...@@ -30,7 +32,8 @@ scope 3 yields 6 traces in approx. 0.05 sec.
scope 4 yields 14 traces in approx. 0.44 sec. scope 4 yields 14 traces in approx. 0.44 sec.
scope 5 yields 30 traces in approx. 1.6 sec. scope 5 yields 30 traces in approx. 1.6 sec.
============================================================================*/ ==========================================================*/
SCHEMA Dining_Philosophers SCHEMA Dining_Philosophers
ROOT Philosophers: {+<$$scope> Philosopher +}; ROOT Philosophers: {+<$$scope> Philosopher +};
......
/*Elevator Model /* Model of [Elevator]
Elevator Model
K.Giammarco circa 2011 K.Giammarco circa 2011
...@@ -13,7 +15,7 @@ in the case of this model, ...@@ -13,7 +15,7 @@ in the case of this model,
( Elevator_works_fine Get_Off | ( Elevator_works_fine Get_Off |
Emergency_Situation Call_for_help ) Emergency_Situation Call_for_help )
*/ ==========================================================*/
SCHEMA ELEVATOR SCHEMA ELEVATOR
...@@ -40,4 +42,4 @@ COORDINATE $a: Call_for_help FROM Passenger, ...@@ -40,4 +42,4 @@ COORDINATE $a: Call_for_help FROM Passenger,
Passenger, Elevator SHARE ALL Available, Non_Available; Passenger, Elevator SHARE ALL Available, Non_Available;
Passenger, Maintenance_Personnel SHARE ALL Emergency_Situation, Elevator_works_fine; Passenger, Maintenance_Personnel SHARE ALL Emergency_Situation, Elevator_works_fine;
\ No newline at end of file
/* example63_Find_Advisor.mp /* Model of [FindAdvisor]
modeling human interactions
example63_Find_Advisor.mp
modeling human interactions
Human interaction and organizational processes can be modeled as well as technological Human interaction and organizational processes can be modeled as well as technological
system and subsystem interactions. system and subsystem interactions.
...@@ -18,8 +20,7 @@ produce more scenarios). ...@@ -18,8 +20,7 @@ produce more scenarios).
The "Sequence" or "Swim Lanes" layouts are the most appropriate for browsing traces here. The "Sequence" or "Swim Lanes" layouts are the most appropriate for browsing traces here.
The "Sequence" mode yields views very similar to the UML or SysML Sequence Diagrams. The "Sequence" mode yields views very similar to the UML or SysML Sequence Diagrams.
*/ ==========================================================*/
/*————————————————————————————— /*—————————————————————————————
Actors Actors
...@@ -62,4 +63,4 @@ COORDINATE $a: Recommend_another_approach FROM Advisor, ...@@ -62,4 +63,4 @@ COORDINATE $a: Recommend_another_approach FROM Advisor,
$b: Find_another_approach FROM Student $b: Find_another_approach FROM Student
DO ADD $a PRECEDES $b; OD; DO ADD $a PRECEDES $b; OD;
Student, Advisor SHARE ALL Discuss_research_interests; Student, Advisor SHARE ALL Discuss_research_interests;
\ No newline at end of file
/* A first responder scenario involving the administation of a rescue /* Model of [First_Responder]
A first responder scenario involving the administation of a rescue
medication (Narcan) to an overdose victim by a First Responder or a medication (Narcan) to an overdose victim by a First Responder or a
Bystander. Bystander.
...@@ -9,7 +11,7 @@ scenarios emerged that was previously not considered. Trace 6 and others ...@@ -9,7 +11,7 @@ scenarios emerged that was previously not considered. Trace 6 and others
show a double administration of Narcan by both the bystander and the first show a double administration of Narcan by both the bystander and the first
responder. responder.
*/ ==========================================================*/
SCHEMA Narcan_Administration SCHEMA Narcan_Administration
......
/* Example 38 Knapsack /* Model of [Knapsack_Weight_Limit]
Example 38 Knapsack
This is a case of well-known Knapsack Dynamic Programming Problem. This is a case of well-known Knapsack Dynamic Programming Problem.
In general it is NP-hard and NP-complete In general it is NP-hard and NP-complete
...@@ -12,7 +14,9 @@ ...@@ -12,7 +14,9 @@
small N,in particular, it stabilizes at scope 4). small N,in particular, it stabilizes at scope 4).
Run for scope 1 and up to 5 Run for scope 1 and up to 5
*/
==========================================================*/
SCHEMA Knapsack SCHEMA Knapsack
ATTRIBUTES { number limit, accumulated_total, current_max, ATTRIBUTES { number limit, accumulated_total, current_max,
......
/* Example 28 /* Model of [MP_Architecture_Specification]
Example 28
MP compiler/trace generator architecture model MP compiler/trace generator architecture model
run for scope 1 or more run for scope 1 or more
===================================================*/ ==========================================================*/
SCHEMA MP_architecture SCHEMA MP_architecture
ROOT User: ROOT User:
......
/* /* Model of [Manufacturing_Process]
Application of Monterey Phoenix Modeling to Manufacturing Product Systems Application of Monterey Phoenix Modeling to Manufacturing Product Systems
An example pre-dating MP-Firebird application that was used to generate scenarios An example pre-dating MP-Firebird application that was used to generate scenarios
...@@ -7,7 +7,7 @@ MP version 4 may be used to conduct such analysis with its native capabilities. ...@@ -7,7 +7,7 @@ MP version 4 may be used to conduct such analysis with its native capabilities.
Created by: John Palmer Created by: John Palmer
August 2014 August 2014
*/ ==========================================================*/
SCHEMA Manufacturing_System SCHEMA Manufacturing_System
......
/* Example 45. Real time system behavior modeling. /* Model of [Martian_Lander]
Example 45. Real time system behavior modeling.
Landing system for Martian Lander. Landing system for Martian Lander.
MP model written by M.Auguston following example 1 and Appendix B from MP model written by M.Auguston following example 1 and Appendix B from
...@@ -52,7 +54,9 @@ CKDT 10 ...@@ -52,7 +54,9 @@ CKDT 10
RRM 10 RRM 10
run for scope 1 and up. run for scope 1 and up.
*/
==========================================================*/
SCHEMA Martian_Lander SCHEMA Martian_Lander
ROOT Measure_and_display: ROOT Measure_and_display:
......
/* The Prisoner's Dilemma /* Model of [Prisoners_Dilemma]
The Prisoner's Dilemma
Michael Collins Michael Collins
August 10, 2020. August 10, 2020.
https://en.wikipedia.org/wiki/Prisoner%27s_dilemma https://en.wikipedia.org/wiki/Prisoner%27s_dilemma
...@@ -54,8 +56,7 @@ in all other circumstances the payoff for Bob = 0. ...@@ -54,8 +56,7 @@ in all other circumstances the payoff for Bob = 0.
To map it to classic values to show negative payoffs -- that is a sort of normalizing. To map it to classic values to show negative payoffs -- that is a sort of normalizing.
The total payoff is computed from the assignments above and then subtracting 2. The total payoff is computed from the assignments above and then subtracting 2.
*/ ==========================================================*/
/*————————————————————————————— /*—————————————————————————————
Actors Actors
...@@ -83,4 +84,4 @@ payout_bob := SUM{ $act:( do_not_confess_alice | confess_alice | do_not_confess ...@@ -83,4 +84,4 @@ payout_bob := SUM{ $act:( do_not_confess_alice | confess_alice | do_not_confess
Interactions Interactions
———————————————————————————————*/ ———————————————————————————————*/
SAY( "Payout Alice = " payout_alice); SAY( "Payout Alice = " payout_alice);
SAY( "Payout Bob = " payout_bob ); SAY( "Payout Bob = " payout_bob );
\ No newline at end of file
/* /* Model of [Railroad_Crossing_Safety]
Example 27. Timing attribute use. Example 27. Timing attribute use.
Railroad crossing example from [Formal Methods for Real-Time Computing, 1996]. Railroad crossing example from [Formal Methods for Real-Time Computing, 1996].
...@@ -8,7 +9,7 @@ each train enters and exits the crossing’s region. ...@@ -8,7 +9,7 @@ each train enters and exits the crossing’s region.
The main safety requirement is: if a train is in the crossing region, The main safety requirement is: if a train is in the crossing region,
then gate must be down. then gate must be down.
*/ ==========================================================*/
SCHEMA Railroad_Crossing SCHEMA Railroad_Crossing
......
/* Example 41. The description of Replay Attack /* Model of [Replay_Attack]
Example 41. The description of Replay Attack
is available at is available at
https://en.wikipedia.org/wiki/Replay_attack https://en.wikipedia.org/wiki/Replay_attack
run scope up to 5 run scope up to 5
======================================*/
==========================================================*/
SCHEMA Replay_Attack SCHEMA Replay_Attack
......
/* Small Package Delivery /* Model of [Small_Package_Delivery]
Taken from use case description in the Skyzer IM20 Mission Model Taken from use case description in the Skyzer IM20 Mission Model
(Non-Combatant Operations Scenario): (Non-Combatant Operations Scenario):
...@@ -33,7 +33,7 @@ root (line 36 and lines 114-128) and running that model subset, one can ...@@ -33,7 +33,7 @@ root (line 36 and lines 114-128) and running that model subset, one can
see 6 event traces, one of which is unexpected: the Air_Vehicle drops see 6 event traces, one of which is unexpected: the Air_Vehicle drops
the payload with no vessel in sight (trace 6). the payload with no vessel in sight (trace 6).
*/ ==========================================================*/
SCHEMA Small_Package_Delivery SCHEMA Small_Package_Delivery
......
/* Cooling Pool /* Model of [Spent_Fuel_Cooling_and_Cleanup]
Cooling Pool
created by K.Giammarco 5/4/2020 created by K.Giammarco 5/4/2020
modified by K.Giammarco 5/8/2020 with D.VanBossuyt modified by K.Giammarco 5/8/2020 with D.VanBossuyt
...@@ -7,8 +9,7 @@ modified by K.Giammarco 5/13/2020 with D.VanBossuyt ...@@ -7,8 +9,7 @@ modified by K.Giammarco 5/13/2020 with D.VanBossuyt
The purpose of this model is to identify the components of and The purpose of this model is to identify the components of and
interactions among a spent nuclear fuel cooling pool and its environment. interactions among a spent nuclear fuel cooling pool and its environment.
*/ ==========================================================*/
/*————————————————————————————— /*—————————————————————————————
Actors Actors
......
/* Example 16, model of the spiral software process /* Model of [Spiral_Software_Process]
Example 16, model of the spiral software process
This example also illustrates how Melvin Conway's law This example also illustrates how Melvin Conway's law
can be modeled in MP: "organizations which design systems ... can be modeled in MP: "organizations which design systems ...
...@@ -6,7 +8,8 @@ ...@@ -6,7 +8,8 @@
communication structures of these organizations." communication structures of these organizations."
run scope up to 5 run scope up to 5
======================================*/
==========================================================*/
SCHEMA spiral SCHEMA spiral
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment