Top Banner
Nir Piterman Department of Computer Science Bypassing Complexity in Synthesis
37

Nir Piterman Department of Computer Science TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AAAAA Bypassing Complexity.

Dec 16, 2015

Download

Documents

Richard Harper
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Nir Piterman Department of Computer Science TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AAAAA Bypassing Complexity.

Nir PitermanDepartment of Computer Science

Bypassing Complexity in Synthesis

Page 2: Nir Piterman Department of Computer Science TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AAAAA Bypassing Complexity.

Design Synthesis

• Build systems directly from declarative specifications.

• Systems will be produced algorithmically.• Systems ensured to match specifications.

Page 3: Nir Piterman Department of Computer Science TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AAAAA Bypassing Complexity.

Environment System

i0

i1

i2

i3

f(i0)

f(i0i1)

f(i0i1i2)

0

1

2

3

time

Page 4: Nir Piterman Department of Computer Science TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AAAAA Bypassing Complexity.
Page 5: Nir Piterman Department of Computer Science TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AAAAA Bypassing Complexity.

Classical Solution• How to bridge the logic/specification world and the

graph world?• Idea:

– Translate the specification to an automaton.– Combine the automaton and the game.

• Catches:– Must use deterministic automata.

• Determinization is extremely complex.• Overall, the transformation is doubly exponential.

– Parity winning conditions.• Complex game analysis that requires the evaluation of nested

greatest and least fixpoints.

Page 6: Nir Piterman Department of Computer Science TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AAAAA Bypassing Complexity.

Simplify

• What do specifications actually look like?– Partitioned to assume and guarantee.– Conjunctions where each property is

typically small.– Overwhelming majority are safety

properties.

Page 7: Nir Piterman Department of Computer Science TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AAAAA Bypassing Complexity.

Specifications are simple!

• Restrict to subset of specification language:– Invariance in linear time [RW89].– Recurrence in quadratic time [AMPS95].– Generalized Reactivity[1] in quadratic time [PPS06].

Page 8: Nir Piterman Department of Computer Science TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AAAAA Bypassing Complexity.

The subset we consider

• We would like to say:

use to restrict initial states use to restrict transitions

Page 9: Nir Piterman Department of Computer Science TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AAAAA Bypassing Complexity.

Different CulturesHardware

• Behavior is via Boolean variables.

• PSL used as specification language.

Model Driven Development

• Labeled Transition Systems used as formal models.

• Fluent linear temporal logic used as specification language.

Page 10: Nir Piterman Department of Computer Science TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AAAAA Bypassing Complexity.

How to represent models?Symbolically

• Game graph is defined implicitly by adding variables to BDDs.

• Transitions are linear in the specifications.• Create from them the

transition relation.

• Solve the game symbolically: algorithms handle sets of states.

• Symbolic algorithm requires O(nm|Σ|2) symbolic next step computations.

Enumeratively

• Game graph is defined by considering explicit states.

• Part of safety is embedded in the graph.

• Solve the game enumeratively: algorithms handle states one by one.

• Enumerative algorithm works in O(nm|Σ||T|).

Page 11: Nir Piterman Department of Computer Science TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AAAAA Bypassing Complexity.

AMBA Bus• Industrial standard• ARM’s AMBA AHB bus

• High performance on-chip bus• Data, address, and control signals• Up to 16 masters and 16 clients• Arbiter part of bus (determines control signals)

AMBA AHB

Master 0 Master 1 Master 15 Client 0 Client 1 Client 15... ...

Arbiter

Page 12: Nir Piterman Department of Computer Science TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AAAAA Bypassing Complexity.
Page 13: Nir Piterman Department of Computer Science TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AAAAA Bypassing Complexity.

The subset we consider

• We would like to say:

• Easy to synthesize:

Page 14: Nir Piterman Department of Computer Science TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AAAAA Bypassing Complexity.

Are they the same?

• Check realizability of:

• If not, there is an environment that realizes the environment specification for every system.The environment is compatible.

• If yes, – there may be something wrong in the specification. – The environment needs the system’s cooperation.

Page 15: Nir Piterman Department of Computer Science TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AAAAA Bypassing Complexity.
Page 16: Nir Piterman Department of Computer Science TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AAAAA Bypassing Complexity.
Page 17: Nir Piterman Department of Computer Science TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AAAAA Bypassing Complexity.

Good Features

• Best Effort Controller:– Will avoid assumptions if this is the only way to

guarantee goals.

• Assumption Preserving:– Will only avoid assumptions if it is impossible to

fulfill them.

• In compatible environmentsall possible controllers are both.

Page 18: Nir Piterman Department of Computer Science TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AAAAA Bypassing Complexity.

If you insist …

• Reduce safety to liveness.– Memorize if the system violated safety.– The system does not violate safety in the long run.

Page 19: Nir Piterman Department of Computer Science TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AAAAA Bypassing Complexity.

More General Specifications

• Many interesting properties converted to this fragment.

• Use deterministic Büchi automata:– Add variables / states to the game.– Add winning condition to liveness.

• Use past:– Past formulas are easy to convert to deterministic

automata.

Page 20: Nir Piterman Department of Computer Science TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AAAAA Bypassing Complexity.

The world isn’t perfect …

• Our game notion assumes perfect information and perfect control.

• What if things are unknown?– Ask Krishnendu …– Getting full information from time to time we may

have a partial bypass …

• What if there is mixed control?

Page 21: Nir Piterman Department of Computer Science TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AAAAA Bypassing Complexity.

Mixed Control

• Classical control: either environment or system.

• What if things don’t fall nicely to either?

Page 22: Nir Piterman Department of Computer Science TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AAAAA Bypassing Complexity.
Page 23: Nir Piterman Department of Computer Science TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AAAAA Bypassing Complexity.

Strong Fairness

• The environment controls the fault.• But,

– it has to be strong fair …

• Two problems:1. This is very expensive.

2. This is not exactly what we want.

Page 24: Nir Piterman Department of Computer Science TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AAAAA Bypassing Complexity.
Page 25: Nir Piterman Department of Computer Science TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AAAAA Bypassing Complexity.
Page 26: Nir Piterman Department of Computer Science TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AAAAA Bypassing Complexity.

What is that?

• This is some sort of persistence.• If I wait long enough,

– it will eventually happen!

• What will the controller do?– Keep on trying!

Page 27: Nir Piterman Department of Computer Science TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AAAAA Bypassing Complexity.

So what do we do?

• Complexity of analysis does not change.• Controllers are persistent:

– keep on retrying.

• Is this notion appropriate?

Page 28: Nir Piterman Department of Computer Science TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AAAAA Bypassing Complexity.

Summary

• Theoretical solution well known since 1969/1989.

• Still provides motivation for a lot of theoretical and practical work.

• In theory, theory and practice are the same.

Page 29: Nir Piterman Department of Computer Science TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AAAAA Bypassing Complexity.

End!Thank you!

Universidad de Buenos Aires

Page 30: Nir Piterman Department of Computer Science TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AAAAA Bypassing Complexity.
Page 31: Nir Piterman Department of Computer Science TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AAAAA Bypassing Complexity.
Page 32: Nir Piterman Department of Computer Science TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AAAAA Bypassing Complexity.
Page 33: Nir Piterman Department of Computer Science TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AAAAA Bypassing Complexity.

Strong Fairness not Enough

try1 try2try2try1

succ2

fail2

succ1

fail1

succ2

fail2

succ1

fail1

Page 34: Nir Piterman Department of Computer Science TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AAAAA Bypassing Complexity.

Model Driven Development

Controllable

Page 35: Nir Piterman Department of Computer Science TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AAAAA Bypassing Complexity.

Model Driven Development

• Labeled Transition Systems used as formal models.

• Fluent linear temporal logic used as specification language.

• Issues with synthesis:– Enumerative representation.– Event based.– Success and failure of actions.– Embedding of fluents.

Page 36: Nir Piterman Department of Computer Science TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AAAAA Bypassing Complexity.

Requirements

Safety:• Don’t start working unless requested to.• Each service is bought once per request. • Reserve all before trying to buy.• Reply to user only when all bought.

Liveness:• Finish all transactions.

Faults:• Failures (success / fail) behave nicely.

Page 37: Nir Piterman Department of Computer Science TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AAAAA Bypassing Complexity.