// January 19, 2014 //---------------------------------------------------------------------------------------- // Two components communicating via unreliable channel // from // Mikhail Auguston, Example 10 in Monterey Phoenix System and Software Architecture // Modeling Language (Draft): Examples of architecture models // Naval Postgraduate School, Monterey, CA, USA // http://faculty.nps.edu/maugusto/ // for Eagle6: runs up to the scope 4, before running out of memory. //---------------------------------------------------------------------------------------- //SCHEMA AtoB ROOT TaskA: (* A_sends_request_to_B ( A_receives_data_from_B | A_timeout_waiting_from_B_1 | A_timeout_waiting_from_B_2 ) *); //assumes that A is the leading actor; //this model can be modified making A and B to behave similarly ROOT TaskB: (* (B_working | request_bounces_back) *); B_working: B_receives_request_from_A B_sends_data_to_A; // request_bounces_back activity simulates the connector's // unsuccessful attempt to connect to B ROOT Connector_A_to_B: (* A_sends_request_to_B ( B_receives_request_from_A | ( [ request_bounces_back ] A_timeout_waiting_from_B_1) ) *); // A_timeout_waiting_from_B may happen either because // Connector_A_to_B just fails or because TaskB is not working ROOT Connector_B_to_A: (* B_sends_data_to_A ( A_receives_data_from_B | A_timeout_waiting_from_B_2 ) *); // sharing constraints TaskA, Connector_A_to_B SHARE ALL A_sends_request_to_B; TaskB, Connector_A_to_B SHARE ALL B_receives_request_from_A, request_bounces_back; TaskB, Connector_B_to_A SHARE ALL B_sends_data_to_A; TaskA, Connector_B_to_A SHARE ALL A_receives_data_from_B; // TaskA, Connector_A_to_B |+| Connector_B_to_A SHARE ALL // A_timeout_waiting_from_B; // |+| means an exclusive union (i.e. a partitioning of shared // events), A_timeout_waiting_from_B can not be shared by both // Connector_A_to_B and Connector_B_to_A. -- not implemented in Eagle6 // approximation to get around Eagle6 constraints TaskA, Connector_A_to_B SHARE ALL A_timeout_waiting_from_B_1; TaskA, Connector_B_to_A SHARE ALL A_timeout_waiting_from_B_2;