
A system maintains a number of sensors, where each is deployed in a separate location in order to read the location’s temperature. Before the system is deployed, all locations are marked on a map, and each location will be addressed by a sensor. The formal specification of the system introduces the following three types:
SENSOR_TYPE,
LOCATION_TYPE,
TEMPERATURE_TYPE
State schema:
--TempMonitor------------------------------------------
|deployed : P SENSOR_TYPE
|map : SENSOR_TYPE ↛ LOCATION_TYPE
|read : SENSOR_TYPE ↛ TEMPERATURE_TYPE
|________________
|deployed = dom map
|deployed = dom read
|____________________________________________________________
Operation DeploySensorOK:
Operation DeploySensorOK places a new sensor to a unique location. We may assume that some (default) temperature is also passed as an argument.
--DeploySensorOK------------------------------------------
|∆TempMonitor
|sensor? : SENSOR_TYPE
|location? : LOCATION_TYPE
|temperature? : TEMPERATURE_TYPE
|________________
|sensor? ∈/ deployed
|location? ∈/ ran map
|deployed′ = deployed ∪ {sensor?}
|map′ = map ∪ {sensor? 7→ location?}
|read′ = read ∪ {sensor? 7→ temperature?}
|_______________________________________________________________
Operation ReadTemperatureOK:
Operation ReadTemperatureOK obtains the temperature reading from a sensor, given the sensor’s location.
--ReadTemperatureOK----------------------------------------
| ΞTempMonitor
|location? : LOCATION_TYPE
|temperature! : TEMPERATURE_TYPE
|______________
|location? ∈ ran map
|temperature! = read(map^−1 (location?))
__________________________________________________________________
Success and error schemata:
We introduce an enumerated type MESSAGE which will assume values that correspond to success and error messages.
-Success--------------------------------------------------
|ΞTempMonitor
|response! : MESSAGE
_____________
|response! = ′ok′
_____________________________________________________________
Error schema SensorAlreadyDeployed for DeploySensorOK:
Operation DeploySensorOK places the following precondition:
sensor? ∈/ deployed
We provide an error schema for the case where this precondition fails:
--SensorAlreadyDeployed---------------------------------------
|ΞTempMonitor
|sensor? : SENSOR_TYPE
|response! : MESSAGE
_____________
|sensor? ∈ deployed
|response! = ′Sensor deployed′
____________________________________________________________________
Error schema LocationAlreadyCovered for DeploySensorOK:
Operation DeploySensorOK places the following precondition:
location? ∈/ ran map
We provide an error schema for the case where this precondition fails:
-LocationAlreadyCovered------------------------------------
|ΞTempMonitor
|location? : LOCATION_TYPE
|response! : MESSAGE
_____________
|location? ∈ ran map
|response! = ′Location already covered′
________________________________________________________________
Error schema LocationUnknown for ReadTemperatureOK:
Operation ReadTemperatureOK places the following precondition: location? ∈ ran map
We provide an error schema for the case where this precondition fails:
-LocationUnknown-----------------------------------------------
|ΞTempMonitor
|location? : LOCATION_TYPE
|response! : MESSAGE
____________
|location? ∈/ ran map
|response! = ′Location not covered′
____________________________________________________________________
Defining reliable operations:
DeploySensor ˆ= (DeploySensorOK ∧ Success) ⊕ (SensorAlreadyDeployed ∨ LocationAlreadyCovered)
ReadTemperature ˆ= (ReadTemperatureOK ∧ Success) ⊕ LocationUnknown
QUESTION: Consider the temperature monitoring system. In this part, extend the specification with a new requirement: Operation ReplaceSensor Sensors are physical devices, subjected to deterioration, or
other type of damage. We need to provide the ability of the system to replace a sensor with another. For simplicity, let us not plan to (“fix” and) reuse them, but permanently remove them from the system.

to generate a solution
a solution
- A system maintains a number of sensors, where each is deployed in a separate location in order to read the location’s temperature. Before the system is deployed, all locations are marked on a map, and each location will be addressed by a sensor. The formal specification of the system introduces the following three types: SENSOR_TYPE, LOCATION_TYPE, TEMPERATURE_TYPE State schema: --TempMonitor------------------------------------------|deployed : P SENSOR_TYPE |map : SENSOR_TYPE ↛ LOCATION_TYPE|read : SENSOR_TYPE ↛ TEMPERATURE_TYPE |________________|deployed = dom map |deployed = dom read|____________________________________________________________ Operation DeploySensorOK:Operation DeploySensorOK places a new sensor to a unique location. We may assume that some (default) temperature is also passed as an argument. --DeploySensorOK------------------------------------------|∆TempMonitor |sensor? : SENSOR_TYPE |location? : LOCATION_TYPE |temperature? :…arrow_forwardwhat is the Layer of Opraring system?arrow_forwardOSPF requires a description of the Area variable in an autonomous system (OSPF AS).arrow_forward
- Create a process model for the following simple scenario using BPMN. In an online shopping application, the following steps will be followed whenever a customer places a new order. The shop receives an order from a customer to buy a product. The availability of the product will be checked. If the product is available, the order will be shipped to the customer. If the product is not available, a request for the order will be sent to the supplier, then it will be shipped to the customer.arrow_forwardplease create state diagrams and transition tables of the given DFA examples Construct a DFA to accept a string containing two consecutive zeros followed by two consecutive ones.arrow_forward
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education





