DOC PREVIEW
USC CSCI 599 - September28a

This preview shows page 1-2-21-22 out of 22 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 22 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 22 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 22 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 22 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 22 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

PowerPoint PresentationStatecharts – brief overviewSlide 3Slide 4Example – gas stationSlide 6Gas stationSlide 8Slide 9Slide 10Cruise Control System SpecificationsCruise Control (CC) EventsSlide 13Slide 14Slide 15Slide 16What Statecharts are good for?What are the problems?What happened in our systems?Our experienceChallengesDiscussion01/14/19 CS599- Formal Methods in SW Architectures1Marija RakicGreg GaoRoshanak Roshandel01/14/19 CS599- Formal Methods in SW Architectures2Statecharts – brief overview•Clustering and refinementACBagbb)(PdDACBag)(Pdb•States and transitions•Arrow- labeled event and optionally a parenthesized condition•Clustered two events to one•D is an abstraction of A and C•D can be refined to consist of A and C•Zooming in and out of D (in latter A and C are not shown)Provide behavioral description of reactive systemsBDagb01/14/19 CS599- Formal Methods in SW Architectures3Statecharts – brief overview•OrthogonalityABDCabin (G)GEgFmdaY•Y is the orthogonal product of A and D01/14/19 CS599- Formal Methods in SW Architectures4Gas Station Specifications1. There will be four pumps at the gas station, and a unique number will identify each pump.2. All pumps are “self serve.”3. Each pump has three nozzles for different type of gas—regular, plus, and premium—denoting different octane content in the gasoline. The prices for the three types of gas vary.4. Each pump has one meter. At any one time, only one person can use one pump.5. All pumps are connected to common storage tanks, one for each of the three types of gas. When the level of gas in a storage tank gets below a set threshold, a request for a refill is issued to an external system.6. It is possible for a customer to pump gas during storage tank refill.7. A customer must pay first. The single gas station attendant accepts cash only.8. Upon payment, the attendant enables a given pump to dispense the paid-for amount of gas.9. The customer can change the decision on the type of gas (s)he wants to fill before starting to fill. Once the customer has started to fill, then the decision cannot be changed.10. Should the customer pre-pay more than (s)he spent to fill the car tank, the gas station attendant will return to the customer his/her change.11. The pump nozzle has a sensor that stops the gas flow once the tank is full.12. The system should handle race conditions, such as a. one customer paying while, in the meantime, another beginning to pump gas at the paid-for pump, andb. one customer beginning to pump at a pump without paying, before another is able to retrieve his/her change.01/14/19 CS599- Formal Methods in SW Architectures5Example – gas stationEvents •“regular”, “premium” or “plus” selected•Level of gas reached threshold•Pump gas•Tank full•Pay•Change picked upAssumptions•The threshold is set in such a way that there is enough gas for the current vehicles on all pumps to finish filling01/14/19 CS599- Formal Methods in SW Architectures6PumpsPump 1Pump 4Pump 3Pump 2StationRefinementClustering01/14/19 CS599- Formal Methods in SW Architectures7Gas stationReady to fi llPump paid f orpay (amount)Enable pumpf or fi llingsame customer at the pumpselect gradeHandling the raise conditionPump i (i=1,2,3,4)I dleReady to fi llFillingstartedFilling donePickupchangepay (amount)nozzle pressedtank f ullnozzle in place(changeexists)nozzle in place(no change)money spentchange pickedGradeselectedselect gradeCheckpointgas above thresholdWaiting f orstation refi llgas below thresholdgas level above threshold01/14/19 CS599- Formal Methods in SW Architectures8Gas station statePump stateI dlePump ready tofi llFilling startedFilling donePickup changepay (in Enough gas)nozzle pressedtank f ullchangeexistsGradeselectedselect grademoney spentnochangechange pickedEnough gas on the stationGas level below thresholdsignal gas belowthreshold/ send request f or refi llsignal gasabovethreshold01/14/19 CS599- Formal Methods in SW Architectures9Grade selectedRegular typeof gasselectedPlus type ofgas selectedPremium typeof gasselectedpremium pressedplus pressedregular pressedReady to fi llFilling startedpremium pressedpremium pressedregular pressed regular pressedplus pressedplus pressednozzle pressednozzle pressednozzle pressednozzlepressed01/14/19 CS599- Formal Methods in SW Architectures10Cruise Control System01/14/19 CS599- Formal Methods in SW Architectures11Cruise Control System Specifications1. You can assume an automatic transmission vehicle.2. For any of the cruise control (CC) functions to take effect, CC must be turned on first.3. CC can be in the following states: off, enabled (i.e., on and cruising), and disabled (on, but not cruising).4. The CC system should be automatically disabled below 30mph and above 90mph.5. Four actions are permitted during CC: set speed, accelerate, decelerate, andresume speed.6. When the system is under CC and the brake is pressed, CC is disabled. When the resume button is pressed, the system resumes at the last set CC speed.7. When the system is under CC and the accelerator pedal is pressed, CC is disabled and the speed increases correspondingly. When the accelerator is released, the CC resumes at its last set CC speed. If at any point of time during acceleration the CC speed is set, CC replaces the old set speed with the new speed.8. If CC is enabled and the vehicle starts going uphill or downhill, CC shouldautomatically apply the accelerator or brake to maintain the set speed.01/14/19 CS599- Formal Methods in SW Architectures12Engine onEngine offCC offCC on (+ cruising+ disabled)Set speed (CC is on)AccelerateDecelerateResume CCCruise Control (CC) Events01/14/19 CS599- Formal Methods in SW Architectures13EngineoffEngineonturn on engineturn off engineTop level states: Engine on and engine offEvents to change states: turn on engine, turn off engine RefinementClustering01/14/19 CS599- Formal Methods in SW Architectures14Engine ofEngine onCC off CC onturn on engineturn off enginepush CC offpush CC onZoom in engine on: CC on and CC offEvents to change states: push CC on, push CC off RefinementClustering01/14/19 CS599- Formal Methods in SW Architectures15CC ofpush CC onCCdisabledCCenabledgas or brake pressedpush CC offresume (sp. already set)pushCC onpushCC offset(curr. sp>30AND curr.sp<90)CConaccelator released(sp. already set)Zoom in CC on: CC enabled and CC disabledDisable to enable: push resume (speed set);


View Full Document

USC CSCI 599 - September28a

Documents in this Course
Week8_1

Week8_1

22 pages

Week2_b

Week2_b

10 pages

LECT6BW

LECT6BW

20 pages

LECT6BW

LECT6BW

20 pages

5

5

44 pages

12

12

15 pages

16

16

20 pages

Nima

Nima

8 pages

Week1

Week1

38 pages

Week11_c

Week11_c

30 pages

afsin

afsin

5 pages

October5b

October5b

43 pages

Week11_2

Week11_2

20 pages

final

final

2 pages

c-4

c-4

12 pages

0420

0420

3 pages

Week9_b

Week9_b

20 pages

S7Kriegel

S7Kriegel

21 pages

Week4_2

Week4_2

16 pages

sandpres

sandpres

21 pages

Week6_1

Week6_1

20 pages

4

4

33 pages

Week10_c

Week10_c

13 pages

fft

fft

18 pages

LECT7BW

LECT7BW

19 pages

24

24

15 pages

14

14

35 pages

Week9_c

Week9_c

24 pages

Week11_67

Week11_67

22 pages

Week1

Week1

37 pages

LECT3BW

LECT3BW

28 pages

Week8_c2

Week8_c2

19 pages

Week5_1

Week5_1

19 pages

LECT5BW

LECT5BW

24 pages

Week10_b

Week10_b

16 pages

Week11_1

Week11_1

43 pages

Week7_2

Week7_2

15 pages

Week5_b

Week5_b

19 pages

Week11_a

Week11_a

29 pages

LECT14BW

LECT14BW

24 pages

T7kriegel

T7kriegel

21 pages

0413

0413

2 pages

3

3

23 pages

C2-TSE

C2-TSE

16 pages

10_19_99

10_19_99

12 pages

s1and2-v2

s1and2-v2

37 pages

Week10_3

Week10_3

23 pages

jalal

jalal

6 pages

1

1

25 pages

T3Querys

T3Querys

47 pages

CS17

CS17

15 pages

porkaew

porkaew

20 pages

LECT4BW

LECT4BW

21 pages

Week10_1

Week10_1

25 pages

wavelet

wavelet

17 pages

October5a

October5a

22 pages

p289-korn

p289-korn

12 pages

2

2

33 pages

rose

rose

36 pages

9_7_99

9_7_99

18 pages

Week10_2

Week10_2

28 pages

Week7_3

Week7_3

37 pages

Load more
Download September28a
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view September28a and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view September28a 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?