Download presentation
Presentation is loading. Please wait.
Published byAlvin Copeland Modified over 9 years ago
1
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 Presented by Prof. Hsu-Chun Yen, NTU (Thanks Hsu-Chun!) (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 A to be implemented by composing existing e-services A 1, …, A r. e-services A 1, …, A r.
4
Example Composability of e-services asks whether a new service can be created by using existing services. Existing E-Services Credit Card Company Warehouse Bank New E-Service Online Store
5
Automated Composition Using existing e-services to construct a new desired e-service Models -- Message-oriented modeling -- Message-oriented modeling -- Activity-based modeling This paper -- 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: Let M be a class of (possibly nondeterministic) language acceptors with a one-way input tape. A system (A; A 1, …, A r ) of automata in M, is composable if for every string w = a 1 …a n of symbols accepted by A, there is an assignment of each symbol in w to one of the A i ’s such that if w i is the subsequence assigned to A i, then w i is accepted by A i. Thus w 1,.., w n is a “shuffle” of w. (Input strings have right delimiters or end markers.) (Input strings have right delimiters or end markers.) Formally, a composer C is an acceptor in M with 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 A i to assign the current input symbol.
8
Examples 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; A 1, A 2 ) is composable. (A; A 2, A 3 ) is also composable. (A; A 1, A 3 ) is not composable. R: registration A: accesses C: credit card payment S: cash payment
9
Notation DFA (NFA): Deterministic (Nondeterministic) Finite Automaton DFA (NFA): Deterministic (Nondeterministic) Finite Automaton DCM (NCM): A DFA (NFA) augmented with 1-reversal counters. 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. 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 r reversals for some r, independent of the computation. Clearly, a counter that makes r reversals can be simulated by (r+1)/2 More generally: A counter is reversal-bounded if it makes at most r reversals for some r, independent of the computation. Clearly, a counter that makes r reversals can be simulated by (r+1)/2 1-reversal counters. 1-reversal counters.
10
Counters A counter x is a nonnegative integer variable associated with operations: A counter x is a nonnegative integer variable associated with operations: (Increment) x := x + 1 (Increment) x := x + 1 (Decrement) x := x - 1 (Decrement) x := x - 1 (Stay) x := x (Stay) x := x (Test) Is x = 0? (Test) Is x = 0?
11
Note: A counter making r reversals can be simulated by (r + 1) / 2 counters, each making only 1 reversal. 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. 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. 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) Definition: A problem is decidable (undecidable) if there exists (there does not exist) an algorithm if there exists (there does not exist) an algorithm to solve it. to solve it.
13
Known (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 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 A 1, …, A r are NFAs, then composability of (A; A 1, …, A r ) is decidable. Thus, if the target service A has 1-reversal Thus, if the target service A has 1-reversal counters and the existing services A i ’s are NFAs, it is decidable to determine if every string accepted by A can be composed in terms of strings accepted by the A i ’s. counters and the existing services A i ’s are NFAs, it is decidable to determine if every string accepted by A can be composed in terms of strings accepted by the A i ’s.
15
Theorem: It is undecidable to determine, given a system (A; A 1, A 2 ), where A and A 1 are DFAs and A 2 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]). Proof (idea): Intricate reduction to the halting problem for two-counter machines (which is undecidable [Minsky]).
16
When the system (A; A 1, …, A r ) 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 A i ’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; A 1, …, A r ) of acceptors in M, an online delegator for the system is a deterministic acceptor D in M with outputs which, knowing: - the current states of A, A 1, …, A r and “local” information of each machine (e.g., whether a counter is zero or non-zero if each machine is a DCM) is zero or non-zero if each machine is a DCM) - current input symbol being processed D can uniquely determine the A i to assign the current symbol. Moreover, for every string w accepted by A, the subsequence of the string w delegated by D to each A i is accepted by A i.
18
Online Delegation Existing Services New Service Can we provide new service by using existing services?
19
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]). 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? Who processes “book_taxi” ? Existing ServicesNew Service However, if the next activity is “book_train”, then system gets stuck. – Assume “book_air_travel” processes.
22
Delegator with 1 Lookahead Knowing 1 future activity is enough for composition i.e., assignment of an activity is delayed one step
23
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; A 1, …, A r ) of acceptors in M and a non-negative integer k, a k-lookahead delegator for the system is a deterministic acceptor D in M with outputs (with delay k) which, knowing: - the current states of A, A 1, …, A r and “local” information - the current states of A, A 1, …, A r and “local” information of each machine of each machine - current input symbol being processed - current input symbol being processed - the k lookahead symbols to the right of the current input - the k lookahead symbols to the right of the current input symbol symbol D can uniquely determine the A i to assign the current symbol. Moreover, for every string w accepted by A, the subsequence of the string w delegated by D to each A i is accepted by A i. Note: Online delegator corresponds to k = 0. Note: Online delegator corresponds to k = 0.
25
Lookahead Delegators 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; A 2, A 3 ) is not only composable but it has a 1-lookahead delegator. (A; A 1, A 2 ) is composable but has no k- lookahead delegator for any k. no k- lookahead delegator for any k. R: registration A: accesses C: credit card payment S: cash payment
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, A 1, …, A k and deterministically assigns the symbols processed by A to the A i ’s while also updating the buffer as it reads the remaining input symbols. Thus D assigns the symbols processed by A to the A i ’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 t k )) 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 t k ) [CHIS04]. However, when the system consists of NFAs, the time reduces to 2^(c n log n t k ) [CHIS04].
28
Constrained Delegation (Presburger constraints on delegation of symbols) 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 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., for k-constrained delegation). 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; A 1, …, A r ) 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.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.