1 / 32

Composability of Infinite-State Activity Automata*

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!)

janae
Download Presentation

Composability of Infinite-State Activity Automata*

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Composability of Infinite-State Activity Automata* Zhe Dang1, Oscar H. Ibarra2, Jianwen Su2 1Washington State University, Pullman 2University of California, Santa Barbara _____________________ Presented by Prof. Hsu-Chun Yen, NTU (Thanks Hsu-Chun!) *Supported in part by NSF Grants IIS-0101134 and CCR-0208595.

  2. Outline • Motivation • Modeling by automata • Composability results • Online delegators • Delegators with lookahead • Constrained delegation • Timed composabilty • Summary and references

  3. E-Services • E-services provide a general framework for discovery, flexible interoperation, and dynamic composition of distributed and heterogeneous processes on the Internet. • Some issues: modeling, analysis, composition. • Automated composition allows a new e-service A to be implemented by composing existing e-services A1 , … , Ar.

  4. Example Existing E-Services • Composability of e-services asks whether a new service can be created by using existing services. Credit Card Company Bank Warehouse Online Store New E-Service

  5. Automated Composition • Using existing e-services to construct a new desired e-service • Models -- Message-oriented modeling -- Activity-based modeling  This paper

  6. Modeling by Automata • Use of automata to model e-services: an activity is represented by a symbol in the input alphabet of an automaton. • A desired sequence of activities to be performed is a string in the language accepted by the automaton. • Mostly finite automata have been studied in the literature.

  7. Definition: LetMbe a class of (possibly nondeterministic) language acceptors with a one-way input tape. A system (A; A1 , … , Ar) of automata in M, is composable if for every string w = a1…an of symbols accepted by A, there is an assignment of each symbol in w to one of the Ai’s such that if wi is the subsequence assigned to Ai, then wi is accepted by Ai. Thus w1, .., wnis a “shuffle” of w. (Input strings have right delimiters or end markers.) • Formally, a composerC is an acceptor in Mwith outputs(i.e., a transducer). In general, C is nondeterministic, and at every step, C may have to “guess” the index 1 ≤ i ≤ r to output, i.e., the Ai to assign the current input symbol.

  8. Examples R: registration A: accesses C: credit card payment S: cash payment • Online club A offers customers to first register and then pay for their accesses with either cash or credit cards. A accepts (r | (aa*(s | c)))*. • (A; A1, A2) is composable. • (A; A2, A3) is also composable. • (A; A1, A3) is not composable.

  9. Notation DFA (NFA): Deterministic (Nondeterministic) Finite Automaton DCM (NCM): A DFA (NFA) augmented with 1-reversal counters. A counter is a nonnegative integer variable, initially zero, which at each step can be incremented / decremented by 1 (or unchanged) and can be tested against zero. A counter is 1-reversal if once it is decremented, it can no longer be incremented. More generally: A counter is reversal-bounded if it makes at most rreversals for some r, independent of the computation. Clearly, a counter that makesr reversals can be simulated by (r+1)/2 1-reversal counters.

  10. Counters A counter x is a nonnegative integer variable associated with operations: (Increment) x := x + 1 (Decrement) x := x - 1 (Stay) x := x (Test) Is x = 0?

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

  12. Example: A DCM with two 1-reversal counters can check, given any binary string (of 0’s and 1’s), whether the number of 0’s is equal to the number of 1’s. Idea: the DCM reads the input and uses one counter to count the 0’s and the other counter to count the 1’s. At the end of the input, the counters are decremented simultaneously. The DCM accepts iff the counters reach zero at the same time. The counters make only 1 reversal. Definition: A problem is decidable (undecidable) if there exists (there does not exist) an algorithm to solve it.

  13. Known • (Language) containment & equivalence problems are: 1. decidable for DCMs [Ibarra], 2. undecidable for NCMs (even when there is only one 1-reversal counter) [Book&Baker]. • Membership, emptiness, and disjointness problems are decidable for NCMs [Book&Baker]. • If the counters are unrestricted (not reversal-bounded), the machine is equivalent to a Turing machine (even when there are only two counters) [Minsky] – hence, all nontrivial problems are undecidable.

  14. Theorem: If A is an NCM and A1 , … , Ar are NFAs, then composability of (A; A1 , … , Ar) is decidable. Thus, if the target service A has 1-reversal counters and the existing services Ai’s are NFAs, it is decidable to determine if every string accepted by A can be composed in terms of strings accepted by the Ai’s.

  15. Theorem:It is undecidable to determine, given a system (A; A1, A2), where A and A1 are DFAs and A2 is a DCM with only one 1-reversal counter, whether it is composable. Proof (idea): Intricate reduction to the halting problem for two-counter machines (which is undecidable [Minsky]).

  16. When the system (A; A1, …, Ar) is composable, the composer is a nondeterministic machine, in general. • Thus, in general, assignment of symbols of a string w accepted by A to the Ai’s can only be done deterministically after the entire string has been processed (i.e., offline) and can not be done online.

  17. Online Delegator • Definition: Given a system (A; A1, …, Ar) of acceptors in M, an online delegator for the system is a deterministic acceptor D in Mwith outputswhich, knowing: - the current states of A, A1 , … , Ar and “local” information of each machine (e.g., whether a counter is zero or non-zero if each machine is a DCM) - current input symbol being processed D can uniquely determine the Ai to assign the current symbol. Moreover, for every string w accepted by A, the subsequence of the string w delegated by D to each Ai is accepted by Ai.

  18. Online Delegation Existing Services New Service Can we provide new service by using existing services?

  19. Online assignment of activities Existing Services New Service

  20. Theorem: When the system consists of NCMs, existence of an online delegator can be decided in 2^(2^(c m n log n)) time for some constant c, where m is the total number of 1-reversal counters in the system and n is the size of the system. However, when the system consists of DFAs, the time reduces to 2^(c n log n) [BC+03] (can be shown to hold for NFAs also [CHIS04]).

  21. What if online delegator does not exist? Existing Services New Service • Who processes “book_taxi” ? • Assume “book_air_travel” processes. However, if the next activity is “book_train”, then system gets stuck.

  22. Delegator with 1 Lookahead • Knowing 1 future activity is enough for composition • i.e., assignment of an activity is delayed one step

  23. Hierarchy on Lookaheads There exists a hierarchy on lookaheads. (a)  1-lookahead, (b) 2-lookahead, (c)  unbounded

  24. Systems With Lookahead • Definition: Given a system (A; A1, …, Ar) of acceptors in M and a non-negative integer k, a k-lookahead delegator for the system is a deterministic acceptor D in Mwith outputs(with delay k)which, knowing: - the current states of A, A1 , … , Ar and “local” information of each machine - current input symbol being processed - the k lookahead symbols to the right of the current input symbol D can uniquely determine the Ai to assign the current symbol. Moreover, for every string w accepted by A, the subsequence of the string w delegated by D to each Ai is accepted by Ai. Note: Online delegator corresponds to k = 0.

  25. Lookahead Delegators R: registration A: accesses C: credit card payment S: cash payment • Online club A offers customers to first register and then pay for their accesses with either cash or credit cards. A accepts (r | (aa*(s | c)))*. • Clearly, (A; A2, A3) is not only composable but it has a 1-lookahead delegator. • (A; A1, A2) is composable but has no k- lookahead delegator for any k.

  26. k-Delegator • The k-delegator D starts out by reading the first k input symbols and stores them in a buffer in its finite control. It then simulates A, A1, …, Ak and deterministically assigns the symbols processed by A to the Ai’s while also updating the buffer as it reads the remaining input symbols. • Thus D assigns the symbols processed by A to the Ai’s with delay k. For convenience, so that there is always a k lookahead string to the right of the current symbol, we assume that the input to the machines is suffixed by #’s.

  27. Theorem: When the system consists of NCMs, existence of a k-delegator for a given k can be decided in 2^(2^(c m n log n tk)) time for some constant c, where m is the total number of 1-reversal counters in the system, n is the size of the system, and t is size of the input alphabet. However, when the system consists of NFAs, the time reduces to 2^(c n log n tk) [CHIS04].

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

  29. Open Question • A system may be composable but may not have a k-delegator for any k. • Open: Is it decidable if a system of DFAs has a k-delegator for some k?

  30. Timed Composability • A timed automaton can be considered as a finite automaton augmented with a finite number of clocks. The clocks can reset to zero or progress at the same rate, and can be tested against clock constraints [Alur/Dill]. • Timed automata are widely regarded as a standard model for real-time systems, because of their ability to express quantitative time requirements. • Theorem: Composability of discrete timed automata (A; A1, …, Ar) is decidable.

  31. Summary • Showed decidable and undecidable results for composability and k-delegation for various types of machines modeling e-services. • Looked at putting additional requirements such as Presburger constraints and timing in composition and k-delegation. • We want to study other models of e-services (e.g., automata with queues, etc.) • Open question: Does the system have a k-delegator for some k. Seems quite difficult, even for the case when all the e-services are DFAs. • Characterize the complexity of the decision procedures. E.g., it can be shown that composability of a system of NFAs is at least NP-hard.

  32. References • [BCG+03] D. Berardi, D. Calvanese, G. De Giacomo, M. Lenzerini, and M. Mecella, Automatic Composition of E-Services That Export Their Behavior, Proc. Int. Conf. On Service Oriented Computing, 2003. • [GHIS04] C. E. Gerede, R. Hull, O.H. Ibarra, and J. Su, Automated Composition of E-Services : Lookaheads, Proc. Int. Conf. On Service Oriented Computing 2004.

More Related