structured control for active tree the decidability of axml

19
Structured Control for Active Tree The Decidability of AXML

Upload: dennis-houston

Post on 02-Jan-2016

214 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Structured Control for Active Tree The Decidability of AXML

Structured Control for Active Tree

The Decidability of AXML

Page 2: Structured Control for Active Tree The Decidability of AXML

AXML (on 1 peer)last@UCI

trophyage

last@UCI: query last trophys of name_of_a_child, and append it under trophy

F.Landis

Paris-Nice

26

last@UCI

trophyage

F.Landis

Paris-Nice

35

Tour de France

M.Indurain M.Indurain

- Confluence: does asking first Landis or Indurain result in same doc?

- Termination: Is there no infinite sequence of fireable services?

- Reachability: Can some configuration be reached?

Yes

No

???

invoc. ofservice =

rewritingrule

Page 3: Structured Control for Active Tree The Decidability of AXML

Positive AXML

last@UCI: query last trophys of name_of_a_child, and append it under trophy

Positive AXML: If a service invocation is possible some day, it is possible forever. => Services can only add, never delete. Services cannot stop.

Ex:

Non Positive: last@UCI can also delete trophy if doping.

Confluence:

- Termination:- Positive Term.: Any sequence ultimately stays in same equivalence class

- Reachability:

Always Yes

Always Nodecidable

???

Page 4: Structured Control for Active Tree The Decidability of AXML

Over Positivity?

Positive AXML: Services can only add, never delete. Services cannot change.

What if things can be changed?

Termination/Confluence becomes non trivial, interesting under simple queries

Page 5: Structured Control for Active Tree The Decidability of AXML

Distributed Tennis Fields

Federer

Play

Roland Garros

S.Lenglen Central

Booked BookedS. Lenglen

Federer Federer

Fields act independently, can book themselves if find a request (2 can be booked for the same player!)

Free Free

LeaveRequest

root

Page 6: Structured Control for Active Tree The Decidability of AXML

X(playing)

Y(playing)

Rules = Tree Transformations

Free

root

Booked

root

Request

root

player

$

Booked

root

player

court

Request

root

player

root

$

player

play

Query one-in

root

Leave

root

player

Free

root

player

Booked

Query not-empty

play

root

playerroot

Query all

root

$

Variable of query

changed

One answer of query, createddeleted

X+subtree deleted All playing players

created

ancestor

variable

Page 7: Structured Control for Active Tree The Decidability of AXML

Rules = Tree Transformations

Court

Free

Request

root

Court

Booked

Play

root

Court

No queryplayer player

player

We can also do it in one step:

Page 8: Structured Control for Active Tree The Decidability of AXML

Rules = Tree Transformations

Query one-in is not needed, can be done in Tree pattern

Free

Request

root

BookedRequest

root

No query

player

player

player

Free

rootroot

Request

root

player

$

Query one-in

Booked

Page 9: Structured Control for Active Tree The Decidability of AXML

Rules = Tree Transformations

Query-all+ guard counting number answers

Tree Pattern T Tree Pattern T’

Nodes in T’ and not in T are createdNodes in T and not in T’ are deleted + its subtree deletedNodes in T and T’ are conserved with its subtree (can be moved)$ in T’ is replaced by the forest of results of query.

Rule = (T,query,guard,T’):

Page 10: Structured Control for Active Tree The Decidability of AXML

Rewriting Step

Court

Free

Request

root

Court

Booked

Play

root

Court

No queryplayer player

playerFederer Roland Garros

S.Lenglen Central

Booked

Federer

Free

Request

Federer

Play

Roland Garros

S.Lenglen Central

Booked BookedCentral

Federer Federer

injectiveinjective

Document

New Document

Rewriting Rule

Page 11: Structured Control for Active Tree The Decidability of AXML

Formatting of the query

play

root

player

Query = 2 Tree Pattern, transformation as before to format result

player

court

court

playing

Simple query: use variables General query: use same name of nodes (copy subtree)

play

root

Moya

Central

play

Nadal

Lenglen

play

Federer

Lenglen

Nadal

Lenglen

playing

Federer

Lenglen

Moya

Central

query

Page 12: Structured Control for Active Tree The Decidability of AXML

Possible Options

Depth of Tree (Bounded/unbounded)

Degree of Tree (Bounded/unbounded)

Successors on brothers

Number of data type (finite/infinite)

Service can only delete itself or not, or nothing deleted

Well structured query (cannot test non existence of a TP, or at most…)

Page 13: Structured Control for Active Tree The Decidability of AXML

Options and UndecidabilityThe following leads to undecidability:

Non positive query + any infiniteness (unbounded depth or degree or data type is |N)

(2 counters machine)or

New (Last time): positive query + service can only delete itself + any linear order (successor on brothers or unbounded tree or data type is |N). Unbounded degree does not suffice (coding of turing machine on words-rewriting with query)

or use Loeding’s Thesis and rewriting on trees

Page 14: Structured Control for Active Tree The Decidability of AXML

Options and DecidabilityThe following leads to some decidability:

Depth and Degree of Tree Bounded + finite set of data type(finite state systems)

or Service cannot move/delete (monotonic systems)

or

New: Depth of Tree Bounded + no Successors on brothers + finite number of data type + Positive guards.

(Well Structured Transition System)

Allow : Unbounded Degree of Tree Service can delete,move anything

Page 15: Structured Control for Active Tree The Decidability of AXML

WSTS

the following < is a well quasi order:A< B if A can be injectively send on B (son/label preserved). Then, In any infinite sequence, there exists u_i > u_j with i>j

last@UCI

trophy26

F.Landis

TdF

M.Indurain

trophy42

TdE TdF TdF

WSTS for well quasi order <finite degree/number of rules

If X Y and X ->* X’ thenY’ with X’ Y’ and Y ->* Y’

X < Y

X’ < Y’

Page 16: Structured Control for Active Tree The Decidability of AXML

WSTS

WSTS for well quasi order <finite degree/number of rules

If X Y and X ->* X’ thenY’ with X’ Y’ and Y ->* Y’

X < Y

X’ < Y’

-Build the transition system TS- Do not extend Y with X -> Y and Y X.- Mark such Y.

Prop: TS has finite number of states contradiction: Koenig withFinite degree, finite number of initial states,infinite number of states: inifinite path.

With Extended Dickson: there is X<Y on that path and Y is extended, contradiction.

false with guards « less than »…

Page 17: Structured Control for Active Tree The Decidability of AXML

Relevant Properties

Finite State = is there finite number of documents

Termination: is there no cycle nor marked states

Reachability: can i reach doc D. more complicated than for Petri Nets.

Confluence: not clear how to separete even and odd inifinite sequence

Weak reachability: Given D, can i reach D’ D. Backward methods exist.

Weak confluence: all reachable documents s,s’, can reach respectively some t,t’ with t>t’ = Is there a unique maximal strongly connected component in abst. graph of docs

Complexity: probably tower of exponential wrt depth of tree. Lower bound? what if we assume that a service can only close itself?

-Do not extend Y with X -> Y and Y X, Mark such Y.

Page 18: Structured Control for Active Tree The Decidability of AXML

(Un)Decidability

Strict = no deletion allowed, but moves are allowed.

Not strict, we can have (delete subtree)

X Y and X ->* X’ and

Y’ with X’ Y’ and Y ->* Y’

Strict, we always have

If X Y and X ->* X’ then

Y’ with X’ Y’ and Y ->* Y’

Harder than reachability

Page 19: Structured Control for Active Tree The Decidability of AXML

Discussion

Cannot handle optimization: no guards « less than » (think Dell supply chain, if less than 3 items in revolver, order something)

So far, set of labels is finite (we know set of players, fields beforehand).Might work with inifinite set (generator of new players, fields, open systems).

We have bag semantics, it makes sense with finite set of labels abstracting inifinite set.

players

Federer Moya Nadal

players

player player player

Abstracted in

Weak reachability = regular well structured properties.We can know whether there exists a path wtih (TP1 or TP2) Until (TP3) (no negation).(add one node = state + make new rules updating state depending on TP_i)