CSC 508 Lecture Notes Week 9
Review of Other Requirements and Specification Methodologies
Datum Name | Definition | Remarks |
... | ... | ... |
where the definition is a compositional expression using the following symbols:
Symbol | Meaning |
= | is composed of |
+ | and |
() | optional |
{} | iteration |
[] | select one of several alternative choices |
| | separates alternative choices in the [] construct |
@ | identifier (key field) for a store |
Directional relation:
Figure 1: Inferno top-most DFD (a context diagram).
Figure 2: Top-Level Inferno DFD.
Figure 3: Expansion of File Operation.
Figure 4: Poorly-conceived expansion of File.New operation.
Figure 5: ER definition of Process.
Figure 6: Excerpt of ER definition of ProcessStep.
Figure 7: Excerpt of ER definition of produces and produced- by.
module ProcessAndArtifactWhichReallyShouldBeInTwoSeparateModules define attribute produces; define attribute produced_by; ... obj ProcessStep is ... produces: Artifact; end; obj Artifact is ... produced_by: ProcessStep; end;
Figure 8: Excerpt of ER definition of produces and produced- by.
Actor Action Subjectwhere
Use Case | RSL |
Software Monitors Living_Quarters | op Monitor(LivingQuarters)->LivingQuarters) |
Timer Triggers Living_Quarters_Sensor | op TriggerChange(Timer,LivingQuarters)->LivingQuarters |
Software Lights Window |
op LightWindow(lq:LivingQuarters)->lq':LivingQuarters
post: if (...) then (lq'.lit = true); -- alternatively -- op TriggerChange(Timer,lq:LivingQuarters)-> lq':LivingQuarters post: if (lq.state ...) then (lq'.lit = true) |
module Communications: (* Caller operations *) operation RequestToSend(); operation ReceiveClearToSend(); operation SendMessage(MessageBody)->Message; operation AwaitAcknowledgement(); operation TerminateConnection(); (* Central exchange operations *) . . . (* Receiver operations *) . . . end;
operation RequestToSend(ce:CommExchange, r:Receiver)-> (ce':CommExchange, r':Receiver, m:Message) precondition: (ce.cs.clear = false) and (r.cs.clear = false); postcondition: (ce'.cs.clear = false) and (r'.cs.clear = false) and (m.body = "$REQUEST$"); end; operation ReceiveClearToSend(ce:CommExchange, r:Receiver, m:Message)-> (ce':CommExchange, r':Receiver); precondition: (ce.cs.clear = false) and (r.cs.clear = false) and (m.mb = "$REQUEST$"); postcondition: (ce'.cs.clear = true) and (r'.cs.clear = true); operation SendMessage(ce:CommExchange, r:Receiver, mb:MessageBody)-> m':Message; precondition: (ce.cs.clear = true) and (r.cs.clear = true) and IsValid(mb); postcondition: (m'.mb = mb) and (m'.sent = true); end; operation ReceiveAcknowledgement(r:Receiver)->r':Reciever; precondition: r.cs.ack = false; precondition: r'.cs.ack = true; end; operation TerminateConnection(ce:CommExchange)->ce':CommExchange precondtion: ce.cs.connected = true; postcondtion: ce.cs.connected = false; end; object CommExchange is cs:CommStatus and ... ; object Receiver is cs:CommStatus and ... ; object Message is cs:CommStatus and body:MessageBody and ... ; object CommStatus is clear:boolean and sent:boolean and ack:boolean and connected:boolean and ... ;