Kĩ thuật lập trình - Lecture 13: Problem frames - Part II: Modeling và recombination

REQ-1: Map input data to output data as said by given rules REQ-2: Allow repository (or document) editing, where “repository” is a collection of data REQ-3: Automatically control a physical object/device REQ-4: Interactively control a physical object/device REQ-5: Monitor and display information about an object

ppt14 trang | Chia sẻ: thuychi16 | Lượt xem: 678 | Lượt tải: 0download
Bạn đang xem nội dung tài liệu Kĩ thuật lập trình - Lecture 13: Problem frames - Part II: Modeling và recombination, để tải tài liệu về máy bạn click vào nút DOWNLOAD ở trên
*Ivan MarsicRutgers UniversityLECTURE 13: Problem Frames Part II: Modeling & Recombination*TopicsProblem Domain ModelingRecombining Problem Frames*Typical System RequirementsREQ-1: Map input data to output data as said by given rulesREQ-2: Allow repository (or document) editing, where “repository” is a collection of dataREQ-3: Automatically control a physical object/deviceREQ-4: Interactively control a physical object/deviceREQ-5: Monitor and display information about an objectRequired BehaviorCommanded BehaviorInformation DisplaySimple WorkpiecesTransformation*Machine and Problem DomainSoftware-to-be(“Machine”)Problem DomainRequirementabSoftware-to-be(“Machine”)Problem DomainRequirementSpecificationDomain propertiesseen by the software-to-beDomain propertiesseen by the requirementRequirementa: specification interface phenomenab: requirement interface phenomena(a)(b)ab*Basic Frame 1: Required BehaviorControl softwareControlled domainRequired behaviorCS!C1C3CD!C2CBroker software Stock exchangeOrder handling rulesabCExample: Execute a Trading orderControlSoftwareControlledDomainRequiredBehaviorb: SE! {Place[i], Cancel[i], Executed[i], Expired[i]} [C3]a: BS! {Execute[i]} [C1] SE! {PriceQuotes, Ack[i], Failed[i]} [C2]CCausal domainKey:BBiddable domainXLexical domainCausal phenomenaEventsSymbolic requirement phenomena[C  ][E  ][Y  ]*Notation Syntax for Shared PhenomenaC – causal domainpredictable causal relationships among its causal phenomena such as physical laws or business contracts or social normsB – biddable domainusually people: unpredictable, incoercibleX – lexical domaina physical representation of data (i.e., symbolic phenomena)[C] - causal phenomenaevents, states; directly produced or controlled by an entity; can give rise to other phenomena in turn[E] - events[Y] – symbolic requirement phenomenavalues, and truths and states relating only values; symbolize other phenomena and relationships among themCausal domainCBiddable domainBLexical domainXaMachineProblemDomaina: M ! E1 PD ! C2*Basic Frame 2: Commanded BehaviorControl softwareCommand behaviorCS!C1C3CD!C2abExample: Place a Trading orderControl softwareControlled domainCommandbehaviorc: TR! {Place[i], Cancel[i], Executed[i], Expired[i]} [Y3]a: TS! {Create[i]} [E1]b: TR! {PriceQuotes, Place[i]} [Y2]Controlled domainCOperatorBOP!E4E4CDACBBOperatorcc*Basic Frame 3: Information DisplayInformation softwareDisplay ~ Real worldC3RW!C1acExample: Place a Trading orderInformationsoftwareReal worldDisplay ~Real worldc: TR! {Place[i], Cancel[i], Executed[i], Expired[i]} [Y3]a: TS! {Create[i]} [E1]b: TR! {PriceQuotes, Place[i]} [Y2]RealworldCDisplayCIS!E2Y4CDACBCDisplaybd*Basic Frame 4: Simple WorkpiecesEditing toolCommand effectsET!E1Y3WP!Y2acExample: Place a Trading orderEditing toolWorkpiecesCommandeffectsc: TR! {Place[i], Cancel[i], Executed[i], Expired[i]} [Y3]a: TS! {Create[i]} [E1]b: TR! {PriceQuotes, Place[i]} [Y2]UserBUS!E3E3Trading softwareOrder placing rulesTraderBUserbdWorkpiecesXTrading orderX*Basic Frame 5: TransformationTransform softwareIO relationY3IN!Y1acExample: Place a Trading orderTransform softwareInputsIO relationc: TR! {Place[i], Cancel[i], Executed[i], Expired[i]} [Y3]a: TS! {Create[i]} [E1]b: TR! {PriceQuotes, Place[i]} [Y2]InputsXOutputsXTS!Y2Y4CDAXBXOutputsbd*Example: Personal Health MonitoringREQ1: keep track of person’s data (vital signs, activities, food, etc.) [Information Display] or [Simple Workpieces] when user enters food dataREQ2: Calculate statistics of the data [Transformation?] but also [Model Building] in real timeREQ3: Allow the user to query for trends and issues [Model Operating]REQ4: Propose a fitness regime suitable for this user [Information Display] or [Model Operating]?Personal Health Monitoring*Monitoring SoftwarecBP SensorHR SensordUserPerson’s Bodyabea = blood vessel pressure (upper right arm)b = pulse (upper right arm)c = blood pressure values (systolic/diastolic) measured every x minutesd = heart rate values, measure every y minutese = querying commands**