Data Abstraction and Data Refinement

35
Data Abstraction and Data Refinement Adalberto Farias Alexandre Mota Augusto Sampaio

description

Data Abstraction and Data Refinement. Adalberto Farias Alexandre Mota Augusto Sampaio. Foundations. Abstract Interpretation Data Refinement. Data Refinement. Relations between global states via concrete operations must be more restrict than via abstract operations - PowerPoint PPT Presentation

Transcript of Data Abstraction and Data Refinement

Page 1: Data Abstraction and Data Refinement

Data Abstraction and Data Refinement

Adalberto Farias

Alexandre Mota

Augusto Sampaio

Page 2: Data Abstraction and Data Refinement

Foundations

Abstract Interpretation

Data Refinement

Page 3: Data Abstraction and Data Refinement

Data Refinement

Relations between global states via concrete operations must be more restrict than via abstract operations

Concrete initialisations, operations and finalisations must be subsets of the corresponding abstract ones.

Page 4: Data Abstraction and Data Refinement

Data Refinement

Rules using downward simulation (from abstract to concrete)

Rules using upward simulation (from concrete to abstract)

Page 5: Data Abstraction and Data Refinement

Data Refinement

Rules using downward simulation (from abstract to concrete)

Rules using upward simulation (from concrete to abstract)

data abstraction

Page 6: Data Abstraction and Data Refinement

Usual ScenarioAbstract

Specification(AS,AI,AOps)

ConcreteSpecification(CS,CI,COps)

Retrieve RefinementRules

YES

NOT

What changes?

Data structures (state, inputs,outputs)Data domainsOperations

Page 7: Data Abstraction and Data Refinement

Data Abstraction Scenario (Z)Abstract

Specification(AS,AI,AOps)

ConcreteSpecification(CS,CI,COps)

RefinementRules

Retrieve

YES

What changes?

Data structures (state, inputs,outputs)Data domainsOperations

Page 8: Data Abstraction and Data Refinement

Data Abstraction Scenario (CSP)

AbstractSpecification(AS,AI,AOps)

Retrieve RefinementRules

ConcreteSpecification(CS,CI,COps)

YES

ConcreteSpecification(CS,CI,COps)

AbstractSpecification(AS,AI,AOps) Retrieve

PZA PZ[[Ren]]

FD

Systematic Calculation

Page 9: Data Abstraction and Data Refinement

Relational Semantics

Page 10: Data Abstraction and Data Refinement

Casting to Z (no IO)

Page 11: Data Abstraction and Data Refinement

Abstraction relations

v1

v2

...vn

v1A

v2A

...vn

A

C A

v1

vn

Retrieve

Page 12: Data Abstraction and Data Refinement

Abstract State and Retrieve

Page 13: Data Abstraction and Data Refinement

Abstract Schemas (meta schemas)

Page 14: Data Abstraction and Data Refinement

Casting to Z (with IO)

Page 15: Data Abstraction and Data Refinement

Abstraction relations C AR

C? A?R?

C! A!R!

Page 16: Data Abstraction and Data Refinement

Retrieve and Abstract Schemas

Page 17: Data Abstraction and Data Refinement

Relational Refinement and Process Refinement

Page 18: Data Abstraction and Data Refinement

Casting to CSP (no IO)

PZ

PZA

Page 19: Data Abstraction and Data Refinement

Casting to CSP (with IO)

PZ

PZA

Page 20: Data Abstraction and Data Refinement

Casting to CSP (with IO)

Page 21: Data Abstraction and Data Refinement

If R is relational (no IO)?

Page 22: Data Abstraction and Data Refinement

If R is functional (no IO)?

Page 23: Data Abstraction and Data Refinement

If R,R? or R! are relational (with IO)?

Page 24: Data Abstraction and Data Refinement

If R,R? or R! are relational (with IO)?

Page 25: Data Abstraction and Data Refinement

If R,R? and R! are functional (with IO)?

Page 26: Data Abstraction and Data Refinement

Construction of Abstract Schemas

Page 27: Data Abstraction and Data Refinement

Abstraction of Declarations

Replacement of concrete types with abstract ones

Page 28: Data Abstraction and Data Refinement

Abstraction of Predicates

Denoted by the semantic function [[.]]Only specific predicates are really

interpreted

Page 29: Data Abstraction and Data Refinement

Conformance with Meta Schemas

Page 30: Data Abstraction and Data Refinement

Example

Page 31: Data Abstraction and Data Refinement

Calculating Abstraction Relations

Page 32: Data Abstraction and Data Refinement

Example

Page 33: Data Abstraction and Data Refinement

Example

Page 34: Data Abstraction and Data Refinement

Conclusions

Use of Data Refinement instead of Abstract Interpretation

Systematic calculation of abstraction relations

Templates for construction of abstract schemas

Use of FD in process refinement

Page 35: Data Abstraction and Data Refinement

Future work

Deeper investigation of process equivalence under FD instead of refinement

The use of data abstraction in automatic verification of data refinements