DOC PREVIEW
USC CSCI 599 - October5b

This preview shows page 1-2-3-20-21-22-41-42-43 out of 43 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 43 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 43 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 43 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 43 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 43 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 43 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 43 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 43 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 43 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 43 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Abstract Model SpecificationSlide 2NotationFeatures( Z-notation)SchemaSchema(cont.)Notation - ExampleExampleExample(cont.)Race conditionOperatorsLogical Conjunction OperatorLogical Disjunction operatorUse of OperatorsFrom specification to designData RefinementExample(Data and Direct Refinement)AdvantagesChemical Abstract ModelFeatures(CHAM)Alloy: A Lightweight Object Modeling NotationIntroductionSlide 23Example (File System)Slide 25AnalysisBased On ZFeaturesDesign FaultsFormalizing Style to Understand Descriptions of Software ArchitectureSlide 31Slide 32How is it done?Slide 34Abstract Syntax of Software ArchitecturesSlide 36Slide 37Step 1 (Define Semantic Model)Slide 39Step 2Step 3Step 4Slide 431Abstract Model SpecificationTarang Garg Srikumar Nagaraj2Abstract Model Specification•Explicitly describes behavior in terms of a model using well-defined types (viz. set, sequences, relations, functions) & defines operations by showing effects on model•Specification includes•type - syntax of object being specified•model - underlying structure•invariant - properties of modeled object•pre/post conditions – semantics of operations3 Notation•Is used to test the results•Independent of program code•Mathematical Data model•Represent both static and dynamic aspects of a system4Features( Z-notation)•Decompose specification into small pieces (Schemas)•Schemas are used to describe both static and dynamic aspects of a system•Data Refinement•Direct Refinement•You can ignore details in order to focus on the aspects of the problem you are interested in5SchemaStatic Aspect The state can occupy.The invariant relationships that are maintained as the system moves from state to state6Schema(cont.)Dynamic Aspect The operations that are possibleThe relationship between their inputs and outputs.The change of state that happen.7Notation - ExampleSome variables are declared. Relationship between the values of the variablesNameInit Birthday BookKnown = Birthday Book8ExampleBirthday bookknown: NAMEbirthday: NAME DATEKnown : dom birthdayAdd BirthdayBirthday Bookname?: NAMEdate?: DATEname?  knownbirthday’ = birthday { name? date}9Example(cont.)Find Birthday Birthday bookname?: NAMEdate? : DATEname? Known date != birthday(name?)10Race conditionWe have not handled the condition when user tries to add a birthday, which is already known to the system, or tries to find the birthday of someone not known.Handle this by adding an extra result! To each operation. Result := of| already_known | not_knownSuccessResult! : REPORTResult! = ok11Operators (Conjunction of the two predicate parts) – any common variables of the two schemas are mergedV (the effect of the schema operator is to make a schema in which the predicate part is the result of joining the predicate parts of its two arguments with the logical connective V).12Logical Conjunction OperatorThe conjunction operator  of the schema calculus allows us to combine this description with our previous description of AddBirthdayAddBirthday  SuccessThis describes an operation which, for correct input, both acts as described by AddBirthday and produces the result ok.13Logical Disjunction operatorThis declaration specifies that if error occurs, the state of the system should not change.Robust version of AddBirthday can beRAddBirthday  (AddBirthday  Success) V AlreadyknownAlreadyKnown BirthdayBookname? : NAMEresult?: REPORTName?  knownResult! = already_known14 Use of OperatorsRAdd BirthdayBirthday Bookname?: NAMEdate?: DATEresult!: REPORT(name?  known  birthday’= birthday  {name? Date?}  result!= ok) V (name?  known  birthday’ = birthday  result != already_known)15Data Refinement“ to describe the concrete data structures which the program will use to represent the abstract data in the specification, and to derive description of the operation in terms of the concrete data structures”Direct Refinement: method to go directly from abstract specification to program in one stepFrom specification to design16Data RefinementData Structures: Two arrays : names [1…] of NAME dates [1…] of DATESnames’ = names{i v} ; names[i] := vthe right side of this equation is a function which takes the same value as names everywhere except at the argument i, where it takes the value ‘v’.17Example(Data and Direct Refinement)FindBirthday1 BirthdayBook1 name?:NAME date?:DATEi : 1.. hwmname?=names(i)  date! = dates(i)Procedure FindBirthday(name: NAME; var date : DATE);var i: INTEGER;begini:=1;while names[i]  name do i := i+1;dates := dates[i]end;18AdvantagesThe flexibility to model a specification which can directly lead to the code.Easy to understandA large class of structural models can be described in Z without higher – order features, and can thus be analyzed efficiently.Independent Conditions can be added later19Chemical Abstract ModelCHAM: for architectural description and analysis. Software Systems chemicals (whose reactions are controlled by explicitly stated rules).Where floating molecules can only interact according to a stated set of reaction rules.20Features(CHAM)- Modular specification-Chemical reactions-Molecules (components)-Reactions (Connectors)-Solutions (States of CHAM)-This is used in areas where intended architecture will tend to be large, complex, and assembled from existing components.-Architectural elements: Processing elements, data elements, and connecting elements.21Alloy: A Lightweight Object Modeling Notation22Introduction•Alloy–Is a modeling notation that describes structural properties–Has a declaration syntax compatible with graphical object models–Has a “set-based” formula syntax–Is based on “Z”23ExampleFile SystemDirEntry NameObject contents!name!Parent(~children)entries!DirFileRoot!24Example (File System)model FileSystem {domain {Object, DirEntry, fixed Name}state {partition File, Dir: static ObjectRoot: fixed Dir!entries: Dir! -> DirEntryname: DirEntry -> static Name!contents: DirEntry -> static Object!parent (~children) : Object -> Dir }def parent {all o | o.parent = o.~contents.~entries}inv UniqueNames {all d | all e1, e2: d.entries | e1.name = e2.name -> e1 = e2}inv Parents {no Root.parentall d: Dir – Root | one d.parent}inv Acyclic {no d | d in d.+parent}inv Reachable {Object in Root.*children}cond TwoDeep {some


View Full Document

USC CSCI 599 - October5b

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

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 October5b
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 October5b 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 October5b 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?