Presentation is loading. Please wait.

Presentation is loading. Please wait.

Behavioral Rewrite Systems and Behavioral Productivity

Similar presentations


Presentation on theme: "Behavioral Rewrite Systems and Behavioral Productivity"— Presentation transcript:

1 Behavioral Rewrite Systems and Behavioral Productivity
Grigore Rosu (University of Illinois at Urbana-Champaign, USA) Dorel Lucanu (University Alexandru Ioan Cuza, Iasi, Romania)

2 Thanks Kokichi! For my PhD with Joseph Goguen at the University of California I was supported by the CafeOBJ project as a Research Assistant For advice and guiding during my PhD and … many times afterwards Today’s presentation is a result of my work under the CafeOBJ project

3 Behavioral Abstraction
How a system behaves under a given set of obsevations/experiments Abstracts away from internal implementation details Important examples of behavioral abstraction (proposed in early 80’s) Behavioral equivalence (Reichel, Tarlecki, Goguen, Wirsing, Hennicker,…) Indistinguishability under experiments CafeOBJ, BOBJ, Bmaude, CIRC, (co)CASL, etc Productivity (Dijsktra, and many others afterwards) Unlimited progress (infinite behavior = limit of continuous evaluation/rewriting) Originally for streams We want a unified, common ground for the above

4 Behavioral Equivalence (~1980)
Behavioral signature is a pair (∑,∆) where ∑ is an algebraic signature ∆ is a set of ∑-contexts, called derivatives (observers) If δ[*:h] ϵ ∆ then sort h is hidden H is the hidden sorts; V is the rest of sorts, called visible ∆-experiment is a ∆ -context of visible sort Behavioral specification B = (∑,∆,E), with E a set of ∑-equations Behavioral equivalence B |≡ t=t’ iff B |= C[t]=C[t’] for all ∆-experiments C ϵ ∆ :h * = for all t t’ *

5 Behavioral Specification – Example: Streams
Sorts Data (say Bit) and Stream or , etc. E

6 Behavioral Equivalence – Example: Streams
We can priove streams s and s’ are behavioral equivalent iff for all n Examples of behavioral equivalence:

7 Productivity (Dijkstra ~1980)
Originally defined for streams; many definitions since then Stream TRS Sorts Data and Stream Operation _:_ : Data x Stream -> Stream, plus others Rewrite rules: Stream TRS R is productive iff for all streams s

8 The Two Notions are Related
So both behavioral equivalence and productivity aim at defining infinite behaviors. Yet, despite common intuitions and ultimate goal, the two notions have lived separate lives.

9 Our Main Contribution We attempt to bring behavioral equivalence and productivity together Introduce the notion of behavioral rewrite system Define behavioral productivity for such systems Reduce productivity to standard termination Investigate the complexity of the behavioral productivty We counted more than 10 different variations of productivity Instead of unifying them, we attempt to capture the essence of the notion Maybe the relationship to behavioral equivalence gives insights on what the right notion or productivity should be?

10 Behavioral Rewrite Systems
Same like behavioral specification, but replace = with →; e.g.: or , etc. R

11 Behavioral Termination, Coinductivity, Productivity
Behavioral TRS (∑,∆,R) terminates iff (∑,R) terminates as normal TRS (∑,∆,R) is coinductive iff δ[f(x)] is not a normal form for any f : s -> h in ∑ - ∆ and for any derivative/observer δ ϵ ∆ Dual to sufficient completeness: behavior of f defined for all observers (∑,∆,R) productive for t iff for any ∆-experiment C, we have C[t] =>* d for some ∑|V U ∆ term d; (∑,∆,R) productive iff productive for all t All these notions work with any behavioral rewrite systems, not only with streams; for example, with infinite trees, processes, etc.

12 Examples Behaviorally terminating, coinductive and productive:
So is the following: but not with some conventional (adhoc) definitions of productivity Behaviorally coinductive, productive, but non-terminating: Tricky non-coinductive and non-productive examples; see paper

13 Behavioral Productivity vs Stream Productivity
Theorem: For the particular behavioral TRS of streams, behavioral productivity is stream productivity. Stream productivity  Behavioral productivity Add Behavioral productivity  Stream productivity Add lazy constructor and rule But behavioral productivity works with any behavioral rewrite system, so it is more general than stream productivity

14 Termination and Coinductivity  Productivity
Theorem: If B=(∑,∆,R) is behaviorally terminating and coinductive, then B is productive. Coinductivity is trivial to check, and termination of (∑,R) can be checked using conventional termination tools (APPROVE, etc.) Related result by Zantema stating that termination implies model- theoretical well-definedness for certain restricted stream TRSes.

15 Behavioral Productivity is ∏20-complete
Theorem: Behavioral productivity is ∏20-complete productive(t) iff (for any experiment C) (there exists terminating rewriting sequence for C[t]) infinite ∑1 = r.e. ∏1 = r.e. r. ∑2 ∏2 x

16 Conclusion Behavioral Rewrite Systems Behavioral Productivity Results:
Rewriting used to evaluate observations/experiments Behavioral Productivity Each experiment can be fully evaluated Results: Behavioral productivity generalizes stream productivity Reduction of behavioral productivity to ordinary termination So off-the-shelf termination tools can be used to check behavioral productivity Behavioral productivity = behavioral well-definedness (see paper) Behavioral productivity is ∏20


Download ppt "Behavioral Rewrite Systems and Behavioral Productivity"

Similar presentations


Ads by Google