+ All Categories
Home > Documents > Composability of Infinite-State Activity Automata*

Composability of Infinite-State Activity Automata*

Date post: 03-Jan-2016
Category:
Upload: germane-nieves
View: 22 times
Download: 0 times
Share this document with a friend
Description:
Composability of Infinite-State Activity Automata*. Zhe Dang 1 , Oscar H. Ibarra 2 , Jianwen Su 2 1 Washington State University, Pullman 2 University of California, Santa Barbara _____________________ Presented by Prof. Hsu-Chun Yen, NTU (Thanks Hsu-Chun!) - PowerPoint PPT Presentation
Popular Tags:
37
Composability of Infinite- Composability of Infinite- State Activity Automata* State Activity Automata* Zhe Dang Zhe Dang 1 , Oscar H. Ibarra , Oscar H. Ibarra 2 , , Jianwen Su Jianwen Su 2 1 Washington State University, Washington State University, Pullman Pullman 2 University of California, Santa University of California, Santa Barbara Barbara _____________________ _____________________ Presented by Prof. Hsu-Chun Presented by Prof. Hsu-Chun Yen, NTU Yen, NTU (Thanks Hsu- (Thanks Hsu- Chun!)
Transcript
Page 1: Composability of Infinite-State Activity Automata*

Composability of Infinite-State Composability of Infinite-State Activity Automata*Activity Automata*

Zhe DangZhe Dang11, Oscar H. Ibarra, Oscar H. Ibarra22, Jianwen Su, Jianwen Su22

11Washington State University, PullmanWashington State University, Pullman22University of California, Santa BarbaraUniversity of California, Santa Barbara

__________________________________________

Presented by Prof. Hsu-Chun Yen, NTUPresented by Prof. Hsu-Chun Yen, NTU

(Thanks Hsu-Chun!) (Thanks Hsu-Chun!)

*Supported in part by NSF Grants IIS-0101134 and CCR-0208595.*Supported in part by NSF Grants IIS-0101134 and CCR-0208595.

Page 2: Composability of Infinite-State Activity Automata*

OutlineOutline

MotivationMotivation Modeling by automataModeling by automata Composability resultsComposability results Online delegators Online delegators Delegators with lookaheadDelegators with lookahead Constrained delegationConstrained delegation Timed composabiltyTimed composabilty Summary and referencesSummary and references

Page 3: Composability of Infinite-State Activity Automata*

E-ServicesE-Services

E-services provide a general framework for E-services provide a general framework for discovery, flexible interoperation, and dynamic discovery, flexible interoperation, and dynamic composition of distributed and heterogeneous composition of distributed and heterogeneous processes on the Internet.processes on the Internet.

Some issues: modeling, analysis, composition.Some issues: modeling, analysis, composition.

Automated composition allows a new e-serviceAutomated composition allows a new e-service AA to be implemented by composing existing to be implemented by composing existing

e-services e-services AA11 , … , A , … , Arr..

Page 4: Composability of Infinite-State Activity Automata*

ExampleExample Composability Composability

of e-services of e-services asks whether asks whether a new service a new service can be can be created by created by using existing using existing services.services.

Existing E-ServicesExisting E-ServicesCredit Card

CompanyWarehouse

Bank

New E-ServiceNew E-Service

Online Store

Page 5: Composability of Infinite-State Activity Automata*

Automated CompositionAutomated Composition

Using existing e-services to construct a Using existing e-services to construct a new desired e-servicenew desired e-service

ModelsModels

-- Message-oriented modeling-- Message-oriented modeling

-- Activity-based modeling -- Activity-based modeling This paper This paper

Page 6: Composability of Infinite-State Activity Automata*

ExamplesExamples

Online club Online club A A offers customers to first register offers customers to first register and then pay for their accesses with either cash and then pay for their accesses with either cash or credit cards. or credit cards. AA accepts ( accepts (rr | ( | (aaaa*(*(ss | | cc)))*.)))*.

((AA; ; AA11, A, A22) is composable.) is composable.

((AA; ; AA22, A, A33) is also composable. ) is also composable.

((AA; ; AA11, , AA33) is not composable.) is not composable.

R: registration

A: accesses

C: credit card payment

S: cash payment

Page 7: Composability of Infinite-State Activity Automata*

ExamplesExamples

Online club Online club A A offers customers to first register offers customers to first register and then pay for their accesses with either cash and then pay for their accesses with either cash or credit cards. or credit cards. AA accepts ( accepts (rr | ( | (aaaa*(*(ss | | cc)))*.)))*.

((AA; ; AA11, A, A22) is composable.) is composable.

((AA; ; AA22, A, A33) is also composable. ) is also composable.

((AA; ; AA11, , AA33) is not composable.) is not composable.

R: registration

A: accesses

C: credit card payment

S: cash payment

Page 8: Composability of Infinite-State Activity Automata*

ExamplesExamples

Online club Online club A A offers customers to first register offers customers to first register and then pay for their accesses with either cash and then pay for their accesses with either cash or credit cards. or credit cards. AA accepts ( accepts (rr | ( | (aaaa*(*(ss | | cc)))*.)))*.

((AA; ; AA11, A, A22) is composable) is composable..

((AA; ; AA22, A, A33) is also composable. ) is also composable.

((AA; ; AA11, , AA33) is not composable.) is not composable.

R: registration

A: accesses

C: credit card payment

S: cash payment

Page 9: Composability of Infinite-State Activity Automata*

ExamplesExamples

Online club Online club A A offers customers to first register offers customers to first register and then pay for their accesses with either cash and then pay for their accesses with either cash or credit cards. or credit cards. AA accepts ( accepts (rr | ( | (aaaa*(*(ss | | cc)))*.)))*.

((AA; ; AA11, A, A22) is composable) is composable..

((AA; ; AA22, A, A33) is also composable. ) is also composable.

((AA; ; AA11, , AA33) is not composable.) is not composable.

R: registration

A: accesses

C: credit card payment

S: cash payment

Page 10: Composability of Infinite-State Activity Automata*

ExamplesExamples

Online club Online club A A offers customers to first register offers customers to first register and then pay for their accesses with either cash and then pay for their accesses with either cash or credit cards. or credit cards. AA accepts ( accepts (rr | ( | (aaaa*(*(ss | | cc)))*.)))*.

((AA; ; AA11, A, A22) is composable) is composable..

((AA; ; AA22, A, A33) is also composable. ) is also composable.

((AA; ; AA11, , AA33) is not composable.) is not composable.

R: registration

A: accesses

C: credit card payment

S: cash payment

Page 11: Composability of Infinite-State Activity Automata*

ExamplesExamples

Online club Online club A A offers customers to first register offers customers to first register and then pay for their accesses with either cash and then pay for their accesses with either cash or credit cards. or credit cards. AA accepts ( accepts (rr | ( | (aaaa*(*(ss | | cc)))*.)))*.

((AA; ; AA11, A, A22) is composable) is composable..

((AA; ; AA22, A, A33) is also composable. ) is also composable.

((AA; ; AA11, , AA33) is not composable.) is not composable.

R: registration

A: accesses

C: credit card payment

S: cash payment

Page 12: Composability of Infinite-State Activity Automata*

Modeling by AutomataModeling by Automata

Use of automata to model e-services: an Use of automata to model e-services: an activity is represented by a symbol in the activity is represented by a symbol in the input alphabet of an automaton.input alphabet of an automaton.

A desired sequence of activities to be A desired sequence of activities to be performed is a string in the language performed is a string in the language accepted by the automaton.accepted by the automaton.

Mostly finite automata have been studied Mostly finite automata have been studied in the literature.in the literature.

Page 13: Composability of Infinite-State Activity Automata*

ComposabilityComposability Definition:Definition:

A system (A system (A; AA; A11 , … , A , … , Arr) is ) is composablecomposable if if there is a there is a composercomposer CC such that such that

for every string for every string w = aw = a11…a…an n accepted by accepted by AA, ,

C assigns each symbol in C assigns each symbol in ww to one of the to one of the AAii’s’s

In general, In general, C C is nondeterministic, and at is nondeterministic, and at every step, every step, CC may have to “guess” the may have to “guess” the index 1 ≤ index 1 ≤ ii ≤ ≤ rr to output, i.e., the to output, i.e., the AAii to to assign the current input symbol.assign the current input symbol.

Page 14: Composability of Infinite-State Activity Automata*

NotationNotation

DFA (NFA):DFA (NFA):

Deterministic (Nondeterministic) Finite Deterministic (Nondeterministic) Finite AutomatonAutomaton

DCM (NCM):DCM (NCM):

A DFA (NFA) augmented with A DFA (NFA) augmented with 1-reversal 1-reversal counterscounters..

Page 15: Composability of Infinite-State Activity Automata*

CountersCounters

A A countercounter x x is a nonnegative integer is a nonnegative integer variable associated with operations:variable associated with operations:

(Increment) (Increment) x := x + 1x := x + 1

(Decrement) (Decrement) x := x - 1x := x - 1

(Stay) (Stay) x := xx := x

(Test) Is (Test) Is x = 0x = 0? ?

Page 16: Composability of Infinite-State Activity Automata*

Note: A counter making r reversals can be simulated by (r + 1) / 2 counters, each making only 1 reversal.

reversal

reversal

reversal

Page 17: Composability of Infinite-State Activity Automata*

KnownKnown

(Language) containment & equivalence problems are:(Language) containment & equivalence problems are: 1. decidable for DCMs [Ibarra],1. decidable for DCMs [Ibarra], 2. undecidable for NCMs (even when there is only one 2. undecidable for NCMs (even when there is only one 1-reversal counter) [Book&Baker].1-reversal counter) [Book&Baker].

Membership, emptiness, and disjointness problems are Membership, emptiness, and disjointness problems are decidable for NCMs [Book&Baker].decidable for NCMs [Book&Baker].

If the counters are unrestricted (not reversal-bounded), If the counters are unrestricted (not reversal-bounded), the machine is equivalent to a Turing machine (even the machine is equivalent to a Turing machine (even when there are only two counters) [Minsky] – hence, all when there are only two counters) [Minsky] – hence, all nontrivial problems are undecidable.nontrivial problems are undecidable.

Page 18: Composability of Infinite-State Activity Automata*

Theorem:Theorem: If If A A is an NCM and is an NCM and A A11 , … , , … , AArr are are NFAs, then composability of (NFAs, then composability of (A; AA; A11 , … , A , … , Arr) is ) is decidable.decidable.

Thus, if the target service Thus, if the target service AA has 1-reversal has 1-reversal

counters and the existing services counters and the existing services AAii’s are ’s are NFAs, it is decidable to determine if every string NFAs, it is decidable to determine if every string accepted by accepted by AA can be composed in terms of can be composed in terms of strings accepted by the strings accepted by the AAii’s.’s.

Page 19: Composability of Infinite-State Activity Automata*

Theorem:Theorem: It is undecidable to determine, It is undecidable to determine, given a system (given a system (AA; ; AA11, , AA22), where ), where AA and and AA11 are DFAs and are DFAs and AA22 is a DCM with is a DCM with only oneonly one 1-reversal counter, whether it is 1-reversal counter, whether it is composable.composable.

ProofProof ( (ideaidea):): Intricate reduction to the Intricate reduction to the

halting problem for two-counter machines halting problem for two-counter machines (which is undecidable [Minsky]).(which is undecidable [Minsky]).

Page 20: Composability of Infinite-State Activity Automata*

When the system (When the system (AA; ; AA11, …, , …, AArr) is ) is composable, the composer is a composable, the composer is a nondeterministic machine, in general.nondeterministic machine, in general.

Thus, in general, assignment of symbols Thus, in general, assignment of symbols of a string of a string ww accepted by accepted by A A to the to the AAii’s can ’s can only be done deterministically after the only be done deterministically after the entire string has been processed (i.e., entire string has been processed (i.e., offline) and can not be done online.offline) and can not be done online.

Page 21: Composability of Infinite-State Activity Automata*

Online DelegatorOnline Delegator Definition: Definition: Given a system (Given a system (A; AA; A11, …, A, …, Arr) an ) an

online delegatoronline delegator for the system is a for the system is a deterministicdeterministic acceptor acceptor DD with outputswith outputs which, which, knowing:knowing:

- the current states of - the current states of A, AA, A11 , … , A , … , Arr and “local” and “local”

information of each machine (e.g., whether a information of each machine (e.g., whether a counter is zero or non-zero if each machine is a counter is zero or non-zero if each machine is a DCM)DCM)

- current input symbol being processed- current input symbol being processed

DD can uniquely determine the can uniquely determine the AAii to assign the to assign the

current symbol. current symbol.

Page 22: Composability of Infinite-State Activity Automata*

Online DelegationOnline DelegationExisting Services

New Servicebook_plane

book_taxi

book_air_travel

book_train_travel

book_train

book_taxi

register_event

register_event

book_hotel

book_shuttle

book_accom

Can we provide new service by using existing services?Can we provide new service by using existing services?

book_plane

book_taxi

book_air_travel

book_train_travel

book_train

book_taxi

register_event

register_event

book_hotel

book_shuttle

book_accom

book_plane

book_train

book_hotel

book_taxi

book_shuttle

book_shuttle

register_event

Complete_travel_service

Page 23: Composability of Infinite-State Activity Automata*

2323

Online assignment of activitiesOnline assignment of activities

book_plane

book_taxi

book_air_travel

Existing Services

New Service

book_train_travel

book_train

book_taxi

register_event

register_event

book_hotel

book_shuttle

book_accombook_

plane / 1

book_hotel / 3

book_taxi / 1

book_shuttle / 3

book_shuttle / 3

register_event / 4

book_hotel / 3

book_taxi / 2

book_shuttle / 3

book_shuttle / 3

register_event / 4

book_train / 2

Delegator for complete_travel_service

book_plane

book_train

book_hotel

book_taxi

book_shuttle

book_shuttle

register_event

Complete_travel_service

Page 24: Composability of Infinite-State Activity Automata*

Theorem:Theorem: When the system consists of When the system consists of NCMs, existence of an online delegator NCMs, existence of an online delegator can be decided in can be decided in 22^(^(22^(^(c m n log nc m n log n)) time )) time for some constant for some constant cc, where , where mm is the total is the total number of 1-reversal counters in the number of 1-reversal counters in the system and system and nn is the size of the system. is the size of the system.

However, when the system consists of However, when the system consists of DFAs, the time reduces to 2^(DFAs, the time reduces to 2^(c n log nc n log n) ) [BC+03] (can be shown to hold for NFAs [BC+03] (can be shown to hold for NFAs also [CHIS04]).also [CHIS04]).

Page 25: Composability of Infinite-State Activity Automata*

What if online delegator does not exist?What if online delegator does not exist?

Who processes “Who processes “book_taxi” book_taxi” ??

book_plane

book_taxi

10 2

book_air_travel

book_train_travel

10 2book_train

book_taxi

0 1

book_train

book_ planebook_taxi

2

travel_service

Existing Services New Service

However, if the next activity is “book_train”, then system gets stuck.

– Assume “book_air_travel” processes.

Page 26: Composability of Infinite-State Activity Automata*

Delegator with 1 LookaheadDelegator with 1 Lookahead book_plane

book_taxi

10

book_air_travel

32#

book_train_travel

10book_train

book_taxi

#32

0 1

book_train

book_ planebook_taxi

travel_service

2 3#

0 1 2book_taxi

book_train / book_taxi

book_plane / book_taxi

4

3

5

# / book_train

# / book_plane

#/#

#/#

1 lookahead delegator for travel_service

Knowing 1 future activity is enough for compositionKnowing 1 future activity is enough for composition i.e., assignment of an activity is delayed one stepi.e., assignment of an activity is delayed one step

Page 27: Composability of Infinite-State Activity Automata*

2727

Hierarchy on LookaheadsHierarchy on Lookaheads

There exists a hierarchy on lookaheads.

(a) 1-lookahead, (b) 2-lookahead, (c) unbounded

Page 28: Composability of Infinite-State Activity Automata*

Systems With LookaheadSystems With Lookahead Definition: Definition: Given a system (Given a system (A; AA; A11, …, A, …, Arr) of acceptors in ) of acceptors in M M

and a non-negative integer and a non-negative integer kk, a , a k-lookahead delegatork-lookahead delegator for the for the system is a system is a deterministicdeterministic acceptor acceptor DD in in MM with outputswith outputs (with (with delay delay kk)) which, knowing:which, knowing:

- the current states of - the current states of A, AA, A11 , … , A , … , Arr and “local” information and “local” information

of each machineof each machine - current input symbol being processed- current input symbol being processed

- the - the k k lookahead symbols to the right of the current inputlookahead symbols to the right of the current input symbolsymbol

DD can uniquely determine the can uniquely determine the AAii to assign the current symbol. to assign the current symbol. Moreover, for every string Moreover, for every string ww accepted by accepted by AA, the subsequence , the subsequence of the string of the string ww delegated by delegated by DD to each to each AAii is accepted by is accepted by AAii..

NoteNote: : Online delegator corresponds to Online delegator corresponds to kk = = 00..

Page 29: Composability of Infinite-State Activity Automata*

Lookahead DelegatorsLookahead Delegators

Online club Online club A A offers customers to first register offers customers to first register and then pay for their accesses with either cash and then pay for their accesses with either cash or credit cards. or credit cards. AA accepts ( accepts (rr | ( | (aaaa*(*(ss | | cc)))*.)))*.

Clearly, (Clearly, (AA; ; AA22, A, A33) is not only composable but it ) is not only composable but it

has a 1-lookahead delegator.has a 1-lookahead delegator.

((AA; ; AA11, A, A22) is composable but has) is composable but has

no no kk- lookahead delegator for any - lookahead delegator for any kk..

R: registration

A: accesses

C: credit card payment

S: cash payment

Page 30: Composability of Infinite-State Activity Automata*

kk-Delegator-Delegator

The The kk-delegator -delegator DD starts out by reading the first starts out by reading the first kk input symbols and stores them in a buffer in its input symbols and stores them in a buffer in its finite control. It then simulates finite control. It then simulates AA, , AA11, …, , …, AAkk and and deterministically assigns the symbols processed deterministically assigns the symbols processed by by AA to the to the AAii’s while also updating the buffer as ’s while also updating the buffer as it reads the remaining input symbols.it reads the remaining input symbols.

Thus Thus D D assigns the symbols processed by assigns the symbols processed by AA to to the the AAii’s with delay ’s with delay kk. For convenience, so that . For convenience, so that there is always a there is always a k k lookahead string to the right lookahead string to the right of the current symbol, we assume that the input of the current symbol, we assume that the input to the machines is suffixed by #’s.to the machines is suffixed by #’s.

Page 31: Composability of Infinite-State Activity Automata*

Theorem:Theorem: When the system consists of NCMs, When the system consists of NCMs, existence of a existence of a kk-delegator for a given -delegator for a given kk can be can be decided in decided in 22^(^(22^(^(c m n log n tc m n log n tkk)) time for some )) time for some constant constant cc, where , where mm is the total number of 1- is the total number of 1-reversal counters in the system, reversal counters in the system, nn is the size of is the size of the system, and the system, and tt is size of the input alphabet. is size of the input alphabet.

However, when the system consists of NFAs, the However, when the system consists of NFAs, the time reduces to time reduces to 22^(^(c n log n tc n log n tkk) [CHIS04].) [CHIS04].

Page 32: Composability of Infinite-State Activity Automata*

Constrained DelegationConstrained Delegation(Presburger constraints on delegation of symbols)(Presburger constraints on delegation of symbols)

Load balancing or priority specification:Load balancing or priority specification: -- Svc 1 processes as many activities as Svc 2-- Svc 1 processes as many activities as Svc 2 -- Priority of Svc 1 is higher than Svc 2-- Priority of Svc 1 is higher than Svc 2 Cost of delegation:Cost of delegation: -- Cost for Svc 1 < 3 x Cost for Svc 2-- Cost for Svc 1 < 3 x Cost for Svc 2 -- Cheapest way to delegate activities-- Cheapest way to delegate activities -- Total time should be < 20 seconds-- Total time should be < 20 seconds Algorithms for constrained delegation (e.g.,Algorithms for constrained delegation (e.g., for for kk-constrained delegation).-constrained delegation).

Page 33: Composability of Infinite-State Activity Automata*

Open QuestionOpen Question

A system may be A system may be composable but composable but may not have a may not have a kk-delegator for -delegator for any any kk..

Open: Open: Is it decidable if a system of DFAs has a Is it decidable if a system of DFAs has a kk--delegator for some delegator for some kk??

Page 34: Composability of Infinite-State Activity Automata*

Timed ComposabilityTimed Composability A timed automaton can be considered as a A timed automaton can be considered as a

finite automaton augmented with a finite finite automaton augmented with a finite number of clocks. The clocks can reset to number of clocks. The clocks can reset to zero or progress at the same rate, and can zero or progress at the same rate, and can be tested against clock constraints [Alur/Dill].be tested against clock constraints [Alur/Dill].

Timed automata are widely regarded as a Timed automata are widely regarded as a standard model for real-time systems, standard model for real-time systems, because of their ability to express because of their ability to express quantitative time requirements.quantitative time requirements.

Theorem:Theorem: Composability of discrete timed Composability of discrete timed automata (automata (A; AA; A11, …, A, …, Arr) is decidable.) is decidable.

Page 35: Composability of Infinite-State Activity Automata*

SummarySummary Showed decidable and undecidable results for Showed decidable and undecidable results for

composability and composability and kk-delegation for various types of -delegation for various types of machines modeling e-services.machines modeling e-services.

Looked at putting additional requirements such as Looked at putting additional requirements such as Presburger constraints and timing in composition and Presburger constraints and timing in composition and kk--delegation.delegation.

We want to study other models of e-services (e.g., We want to study other models of e-services (e.g., automata with queues, etc.)automata with queues, etc.)

Open question: Does the system have a k-delegator for Open question: Does the system have a k-delegator for some k. Seems quite difficult, even for the case when all some k. Seems quite difficult, even for the case when all the e-services are DFAs.the e-services are DFAs.

Characterize the complexity of the decision procedures. Characterize the complexity of the decision procedures. E.g., it can be shown that composability of a system of E.g., it can be shown that composability of a system of NFAs is at least NP-hard.NFAs is at least NP-hard.

Page 36: Composability of Infinite-State Activity Automata*

ReferencesReferences

[BCG+03] D. Berardi, D. Calvanese, G. De [BCG+03] D. Berardi, D. Calvanese, G. De Giacomo, M. Lenzerini, and M. Mecella, Giacomo, M. Lenzerini, and M. Mecella, Automatic Composition of E-Services That Automatic Composition of E-Services That Export Their BehaviorExport Their Behavior, Proc. Int. Conf. On , Proc. Int. Conf. On Service Oriented Computing, 2003.Service Oriented Computing, 2003.

[GHIS04] C. E. Gerede, R. Hull, O.H. Ibarra, [GHIS04] C. E. Gerede, R. Hull, O.H. Ibarra, and J. Su, and J. Su, Automated Composition of E-Automated Composition of E-Services : LookaheadsServices : Lookaheads, Proc. Int. Conf. On , Proc. Int. Conf. On Service Oriented Computing 2004.Service Oriented Computing 2004.

Page 37: Composability of Infinite-State Activity Automata*

Thank You!Thank You!


Recommended