Source-to-Source Code Generation Based on Pattern Matching and Dynamic Programming

Size: px
Start display at page:

Download "Source-to-Source Code Generation Based on Pattern Matching and Dynamic Programming"

Transcription

1 Source-to-Source Code Generation Based on Pattern Matching and Dynamic Programming Weimin Chen, Volker Turau TR August, 1993 Abstract This aer introduces a new technique for source-to-source code generation based on attern matching and dynamic rogramming. This technique can be alied to all source and target languages which satisfy some requirements. The main differences to conventional aroaches are the comlexity of the target language, the handling of side effects caused by function calls and the introduction of temoraries. Code otimization is achieved by introducing a new cost-model. The technique allows an incremental develoment based on imrovements of the target-library. These require only a modification of the rewriting rules since those are searated from the attern matching algorithm. Exerience of an successful alication of our technique is given. GMD-IPSI, Integrated Publication and Information Systems Institute, Dolivostr. 15, Darmstadt, Germany. chen@darmstadt.gmd.de On leave from: Fachhochschule Giessen-Friedberg, Fachbereich MND, Wilhelm-Leuschner-Str. 13, Friedberg, Germany. turau@rfhfb.fh-friedberg.de

2 1 1. Introduction In this aer a new technique for generating otimized code for object-oriented rogramming languages based on attern matching and dynamic rogramming is resented. It can be alied to translation on a source to source basis. Pattern matching and dynamic rogramming have been alied before in comilers based on the back-end aroach, i.e. where the target code of the comiler consists of hardware-oriented instructions. However, when alying this technique to target languages which are high level rogramming languages, several essential differences need to be overcome: the target language is far more comlex than machine code, the evaluation order can not be guaranteed by a simle traversal strategy for the syntax tree, since function calls may cause side effects, temoral variables must be introduced, and a new cost model for code otimizing is needed. Our technique is based on a set of rewriting rules, which allow us to handle functions with a variable number of arguments as well as temoral variables. A roof is given, that the evaluation order in the generated code is consistent with that of the source code. The code generation starts from the syntax tree and is done in the following way. All temlates in the tree rewriting rules are matched against the subtrees of the syntax tree during a deth first traversal of the tree. At each node, the costs are used to determine the best match and, the selected subtree is relaced by the associated relacement node. The dynamic rogramming algorithm allows the rules to be written in any order and obviates the need to deal with attern matching conflicts. It roduces code that is otimal with resect to the cost rovided. Comilers based on the front-end aroach are used to save the big effort to generate machine code instead the translation is into another rogramming language for which a comiler exists [4, 15]. This aroach is very useful for comilers of new languages, because it allows a flexible and extensible imlementation. Furthermore, it is latform indeendent. The general situation is deicted in figure 1. The frontend comiler erforms syntax and semantic analysis. Then the hase of code generation starts. The outut of this hase is a semantically equivalent rogram in the target language which contains calls to function, which are rovided by a target library. The target comiler utilizes this library to generate executable code. The introduced technique can be alied to all source and target languages which satisfy some requirements. The roblems which arise when this techniques are alied in the front-end aroach are dicussed and are of indeendent interest. The remainder of this aer is organized as follows. Section 2 states the background for the source- and targetlanguages and details the translation rules. Section 3 outlines the general rincile of our technique and resents the new features. Section 4 discusses the control facility in the attern matching. Section 5 reorts the exerience gained in alying the new technique. Section 6 surveys related work and section 7 concludes the aer with a discussion of our results. source syntax analysis semantic analysis code generation target code target-library target comiler Fig. 1. The module structure of the front-end comiler

3 2 2. Background In this section the requirements of the source- and targetlanguages and of the translation rules are discussed. The focus of our work is on the basic concet of object-oriented rogramming languages: the class-concet. A class defines roerties 1 and methods. Source language: The language is strongly tyed. It can be assumed that the roerties of the classes are globally identified during the hase of semantic analysis, where rename techniques are required. E.g. a roerty-reference can be written where the exression exr is an instance of a class while is a roerty of that class. In the hase of semantic analysis, the tye of exr can be statically determined so that it is ossible to globally identify all roerties of all classes. Let be the set of all globally identified roerties. The methods of a class may cause side effects changing the values of roerties in. Most object-oriented languages suort dynamic disatching. As a consequence, in general it is not ossible to statically bind a generic method invocation to a concrete method at comilation-time. For a strongly tyed language, however, it must be ossible to determine the set of methods (in the corresonding classes) which may be invoked for the given (generic) method invocation. At comile-time, we can globally identify the methods of all classes, and define the set of these methods as. For every m let (m) be the set of those roerties which may be effected by the method m. Let D (m) be the disatchingset of those methods which may be disatched for a given method invocation m. We denote * ={{m} m } { D (m) m }. The set * 2 can be constructed at comilation-time. Thus, for each (generic) method invocation m, we can always find the unique corresonding element m * * at comilation-time, deending on the context that method m is stated as dynamic disatched or not. Therefore, for each (generic) method invocation m, let * (m) be the set of those roerties which may be effected by an invocation of m: 1. Different languages have different concets, e.g. in C++ it is called member attribute, in Smalltalk it is called instance variable. * (m) = mm * (m) where m * * corresonds to m. In the following discussion, a method invocation is written as m(arg 0,..., arg n ) 2, where m is globally identified and * (m) is already constructed at comilation-time. The body of each method m may define local variables, which are available in the method body only. Let (m) denote the set of these local variables defined in method m. In contexts that do not lead to ambiguity, we denote this set as. Target language: The language suorts the mechanism of function invocation. Functions are allowed to have a variable number of arguments. The language suorts function olymorhism. Therefore, for a source exression we can ignore the tyes of the oerands when alying attern matching to code generation. E.g. the olymorhic function VOID writepro(string, OB- JECTS, TYPE), where TYPE can be any target tye, reresents writing the v 0 by writepro(,v,v 0 ), regardless of what tye of v 0 is. The language suorts tye casting. Translation rules: All source data tyes of the same kind are maed into the same target data tye. Hence, only a fixed set of target data tyes is defined in the target language. For examle, all source class-tyes are maed into a single target tye: OBJECTS. All source array-tyes are maed into a single target tye: ARRAY. Each rimitive source tye is maed into an individual target tye, e.g. INTEGER is maed into INT. The body of each method is translated into a corresonding function. There exists a set of functions of the target language which reresent the basic statements/exressions of the source language. These are rovided in the interface of the target-library shown in Fig Some languages, e.g. C++, write a method call as o.m(arg 1,..., arg n ). By syntax transformation, it is ossible to write that as m(o, arg 1,..., arg n ).

4 3 All roerty accesses are translated into function calls in which the roerties are assed as identifierreference arguments. The above function write- Pro is an examle. Another examle is the function VOID readpro(string, OBJECTS) which reresents reading the source by (TYPE)readPro(,v). where the word TYPE is the name of the target tye of the and is needed for tye casting. The unit of the translation is a statement. Each statement is translated into one or more target statements. It is not the intention of this aer to cover all object-oriented aradigms. Rather the focus is on source-to-source translation at the statement/exression level. In the following, the source/target code is reresented by Helvetian/courier font resectively. Letters, v, and m to denote the elements of,, resectively. 3. Princile of attern matching In the conventional aroaches for code generation which are based on attern matching, the machine descrition is searated from the code generation algorithm. They emloy a formal machine descrition and use a code-generator-generator to automatically code generators. In this scheme, attern matching is used to relace interretation with case analysis. Rewriting rules may be tree-structured [3] or linear [7]. Corresondingly, attern matching is erformed by heuristic search or arsing Rewriting rules A attern matching system R is a finite set of rewriting rules, each of the form l r, where l and r are terms built from the set of labelled symbols and a set of atterns. We use tree structures to reresent the atterns. To illustrate this idea, consider an examle. Source 1 Syntax tree: ro Rewriting rule: R 1 : v ro v (ro tt)readpro(,v 1 ) v 1 Pattern matching: (where ro tt denotes the target tye (tt) at node ro) v R 1 ro Target code: v (TYPE)readPro(,v 2 )) where TYPE denotes the value of ro tt. In this examle, suose that the variable v 1 in the target code has been declared corresonding to the source variable v 1, in an aroriate maing. Consider another examle. Suose the olymorhic function TYPE sum(type,...), where TYPE is an aroriate target tye, reresents the source exression v 1 +v v n by sum(v 1,v 2,...,v n ) for any n > 1. This code can be matched by the following atterns: R 2 : R 3 : R 4 : v 1 1 lus v 2 v sum( 1, 2 ) lus 1, 2 2 v In the above rules, denotes a nonterminal symbol while the code of consist of arguments for a function call. E.g. given an exression v 1 +v 2 +v 3, the syntax tree is lus lus V3 V2. The matching rocedure can be R 4 lus R 3 R 2 V lus R 4 V2 R 4 V3 so that the target code is v sum(v 1,v 2,v 3 ). (1) Note that the matching strategy is not unique. Another matching rocedure can be R 4 lus R 4 V2 R 2 V R 2 R 3 V so that the target code is lus R 4 V3

5 4 v sum(sum(v 1,v 2 ),v 3 ). (2) As a reliminary estimation, code (1) is better than code (2), since in (1) only one function invocation is required. As another examle consider an array with multile dimensions. Suose a target function VOID arr(array,int,...) reresents reading a source exression v 0 [v 1 ][v 2 ]...[v n ] by (TYPE)arr(v 0,v 1,...,v n ) where TYPE is the target tye of the source exression. The corresonding rewriting rules are defined as follows: R 5 : v arr v (arr tt)arr(,v 1 ) R 6 : v 1 arr 1,v 1 v R 7 : v v E.g. given an exression v 0 [v 1 ][v 2 ], the syntax tree is arr arr v 2 v 0 v 1 The matching rocedure can be R 5 arr v R arr 6 v 2 R v 7 0 v 1 and the corresonding code is v (TYPE)arr(v 0,v 1,v 2 ). Again there are several different matching rocedures, e.g. another matching will generate the code v (TYPE)arr((ARRAY)arr(v 0,v 1 ),v 2 ) Costs of rules (3) In the conventional aroach, each rewriting rule has a designated cost, so that the otimization degree for the target code can be measured by the total cost of rules matched. In the conventional aroach, the target code of each rewriting rule consists of hardware-oriented instructions. It is relatively easy to designate a cost to a rule, because the instructions are relatively simle. However, in our frontend aroach where the target code is comosed of a series of function calls, the cost of a rule relies on how the target functions are imlemented. Generally seaking, the cost of a rule can be estimated either by analyzing the function imlementation, or by counting u the average execution time corresonding to the individual function calls. In some situations, the cost of a general function call deends not only on the function imlementation itself, but also on what the actual arguments are. For examle, suose function union(set 1,SET 2 ) is the target code for a source exressions that builds the union of two sets. Thus, the cost of the function union will dynamically deend on the sace-comlexity of the arguments. Unfortunately, analyzing this sace comlexity at the comilation-time is a difficult task and in some cases imossible. This fact leads to an aroach where each function call gets assigned an estimated average cost regardless of the dynamic sace comlexity of the arguments. There are two kinds of target functions: functions with a fixed arity, and functions with a variable arity. In the first case, the cost of a function call is a fixed nonnegative value; in the second case, the cost of a function call deends linearly on the number of the arguments. For instance, consider the function sum where a variable number of arguments is allowed. The cost of this function call can be calculated by the following formula: cost(sum(arg 1, arg 2,..., arg n )) = c 0 + n c a where c 0 is the cost in the case no arguments are resent, and c a is the incremental cost for each new aended argument. This linear model is motivated by the following fact: in the body of a function, a loo is always used in order to access iteratively the arguments aearing in the function call. Normally, the number this loo is executed linearly deends on the number of the arguments. Meanwhile, the cost of the function call will linearly deend on the number of these runs. For the exression v 1 +v 2 +v 3 two different target codes were generated. By the above model, the costs of alternatives (1) and (2) are c 0 + 3c a and 2c 0 + 3c a, resectively. Therefore, as we have stated, alternative (1) is better than (2). According to this model, the costs of rules R 2, R 3, and R 4 must be designated as c 0, 0, and c a, resectively. The discussion above shows that a target function call may be generated by matching a sequence of rewriting rules. Therefore, the cost of a function call is equal to the sum of the costs of the corresonding rules. In order to simlify the cost model, the set of rewriting rules is restricted in a way that only the root can have variable arity. In general, the cost of a rule is a nonnegative val-

6 5 ue, which may deend on the arity of the root of the treeattern, if the root has variable arity Evaluation order In a syntax tree, the evaluation order among its nodes is always fixed, e.g. left-right or right-left. On the other hand, the evaluation order in the target code is also fixed. It is necessary to ensure that both evaluation orders are conformable. We denote the set of rewriting rules by. Let oerand 1 and oerand 2 be two arbitrary different oerands of the syntax tree. Let arg 1 and arg 2 be the corresonding oerands of the target code. Now two kinds of orders are considered. One is the evaluation order between oerand 1 and oerand 2 in the syntax tree. The other one is the evaluation order between arg 1 and arg 2 in the target code. We say, is consistent, if these orders are conformable for all airs of oerands. In the context of this aer, we assume that the evaluation order in the syntax tree is right-left and in the target code the arguments of a function call are also evaluated in right-left order. A sufficient criteria to ensure that the set of atterns is consistent is that if an oerand aears on the right-hand side of another one then the code corresonding to the first oerand must aear on the right-hand side of the code corresonding to the second one. It is clear that a non-consistent set of rewriting rules or illegal traversal order of the syntax tree can result in a target code with an illegal evaluation order. However, the correct traversal order of the syntax tree as well a consistent set of rewriting rules are still insufficient to ensure the correct evaluation order in the target code by any attern matching. The roblem is the following. A method m may cause side effects modifying some roerties in * (m). If a statement or exression contains m as well as some roerties of (m), then the evaluation order between m and the roerties in * (m) must be conformable between the source- and the target-code. This will be illustrated by an examle. On the one hand, the target code of m can be matched by the following rules: R 8 : v mc v m() m R 9 : v mc-dth v disatch( m,) m R 10 : ex-list * v v * R 8 and R 9 describe the rules for method calls in the context of static binding and dynamic disatching. In R 10, the iteration notion * indicates that the arity of node ex-list is variable and 0. Corresondingly, the code of consists of the concatenation of the code son s code. Later this will form the arguments of a function call. Therefore, given an exression m(v 1 )[@v 2 ], the syntax tree is arr mc m ex-list v 1 ro V2 Matched by rules R 1, R 5, R 7, R 8, and R 10, the target code is v (TYPE)arr(m(v 1 ),readpro(,v 2 )). (5) Consider the case that the following new rule R 11 : v arr v arr(v 1,,v 2 ) v 1 ro V2 is introduced in order to translate the source exression v 1 [@v 2 ] into v (TYPE)arr(v 1,,v 2 ) Here the roerty is dereferenced in the function body arr but the value of v 1 is evaluated in the argument art, i.e. is evaluated after v 1. In this case the evaluation order is not sensitive, so that the code is still correct. However, if the tree (4) is matched by the rules R 8, R 10 and R 11, then the target code becomes v (TYPE)arr(m(v 1 ), 2,v 2 ). (6) In the case * (m), thus the evaluation order between the method m and the roerty is illegal. This examle illustrates that the roblem of illegal evaluation order does not result from the traversal strategy for the syntax tree, but does result from the control in attern matching. In this source-to-source background, the issue of evaluation order comes from method calls which may cause side effects. Besides this case, the evaluation order is not sensitive where the code generator may evaluate exressions in an order that reduces the cost of evaluation. (4)

7 Temoral variables So far we merely considered the rewriting rules which are used to read exressions. However, for rules involving reading and writing of variables or roerties a roblem arises. Consider the source statement v 1.:=v 3 with the following syntax tree ro assign v 2 v 1 (7) As we assumed in section 2, the target code must be writepro(,v 1,v 2 ). However, if rule R 1 is chosen to match the shadowed art as follows R ro 1 v v1 assign v 2 the target code would be wrong, since the code of R 1 just returns the value of v 1. and does not erform the actual udate. Consequently, the target code only changes the (hidden) temorary v but v Control in attern matching Several tree-attern matching algorithms have been resented. For code generation alications, a scheme roosed by Hoffman and O Donnell [13] aears romising, and it is successfully alied in the system Twig for code generator-generators by Aho, Ganaathi, and Tjiang [3]. They suggested that temlate matching can be done efficiently by extending the Aho-Corasick multile-keyword attermatching algorithm [1] into a to-down tree-attern matching algorithm. Afterwards, alying the bottom-u heuristic search, the cheaest tree-attern matching can be found. This algorithm can be extended to our alication. In this aer we do not intend to discuss the details of the algorithm. Instead, we state some key roblems which occur in our alication, but do not occur in the conventional aroaches and resent our solutions Controlling the evaluation order Controlling the evaluation order can be divided into two categories. One is the order between methods and methods. Another one is the order between methods and roerties. Without loss of generality, in this section we can assume that the method call is always in the context of static binding. From the view of controlling the evaluation order, a method call in the context of static binding or dynamic disatching does not make an essential difference. In the syntax tree, we introduce the notion nm if node m is an ancestor of node n, and the notion nm if n=m or nm. We have the following results. THEOREM 1. Suose the set of rewriting rules is consistent and that only rules R 8 and R 9 contain nodes for method calls. Then for any attern matching the evaluation order between methods and methods is always correct. PROOF: Let m 1, m 2 and mc 1 and mc 2 their corresonding nodes in the subject tree c. Let the traversal of the subject tree be the bottom-u and the right to left order. Suose node mc 1 aears before node mc 2. Now we rove that, by any attern matching, the code of m 1 is always evaluated before m 2. Clearly in the case that mc 1 mc 2 the code for m 1 is embedded in the argument of a function call which is the code for node m 2. Hence, the code for m 1 is evaluated before that for m 2. Note that the case mc 1 mc 2 can not occur. Consider the remaining case of mc 1mc 2. Suose node n is the first common ancestor of nodes mc 1 and mc 2. By any matching, there always exists a node n f (n f n) such that at n f there is a function call f generated. According to the assumtion that only the rules R 8 and R 9 contain nodes for method calls, the code of m 1 and m 2 must be embedded in two different arguments, arg i and arg j. Moreover, arg i and arg j are not identifier-references (c.f. the definition of rule R 8 ). Suose the code arg i and arg j are generated at nodes n i and n j resectively. Hence, the relation nn i mc 1 and nn j mc 2 holds, while n i must be on the right-hand side of n j since mc 1 is on the right-hand side of mc 2. mc 2 n j n f m 2 m 1 n n i mc 1 Therefore, in the function call f, argument arg i must be on the right-hand side of argument arg j so that all code in arg i is evaluated before code in arg j, hence the code of m 1 is evaluated before m 2.

8 7 Before discussing how to control the evaluation order between methods and roerties, we introduce some notations. For each node n in the syntax tree let (n) be the set of those methods which occur in the subtree rooted at node n. Moreover, at node n, let * (n) be the set of those roerties which may be effected by the methods in (n), i.e. * (n) = m(n) * (m). At node n, denote the target code associated with label l as code(l, n). Here we can regard code(l, n) as a form of some arguments 3. Let * code(l, n) be the set of those roerties which occur as identifier-references arguments in code(l, n). For examle if code(l, n) is 1,f(v, 2 ), 3 then * code(l, n) = { 1, 3 }. Note that 2 does not belong to * code(l, n) because f(v, 2 ) is an argument and but 2 is not. THEOREM 2. Suose the set of rewriting rules is consistent and that only rules R 8 and R 9 contain nodes for method calls. Given a syntax tree, suose is matched by a set M = {[R i, n i ]} where the root of rewriting rule R i matches at node n i in. Assume that label l j is the j th leaf (counted in i left-right order) of R i and matches at node n j in. The target code generated by M has a correct evaluation order be- i tween methods and roerties iff the following condition holds: * (n k i ) * code(l j i, nj i ) =, for all i, j and k such that k < j. PROOF: In the syntax tree, let, m and let mc be the corresonding mc-node. Assume that the code of m and the code of are involved in a (nested) function call. It is easy to verify, that the code of occurs on the right hand side of m iff node aears before the node mc during the traversal of the subject tree in the bottom-u and the right-left order. Sufficiency: According to the restriction that in the set of rewriting rules only rules R 8 and R 9 contain nodes for method calls, if the code of occurs on the left-hand side of m, then their evaluation order is always correct, since is always evaluated after m. Now assume that the code of occurs on the right-hand side of m and * (m), while in the 3. In the case that the code is a function call, we can regard the whole function call as an argument target code the content of is evaluated after m. This means that there is a function call in the form of f(...,code m,...,,...), where code m acts as an argument of f and directly or indirectly includes the code of m. Therefore, there must be a match like the following: m n k i mc n f... n i match n j i ro l k i R i : where the function call f is generated at node n f and k < j. Now * (m) * ( n k) and i * code(l j, i nj ). This leads to a i contradiction since * (n k) i * code(l j, i nj). i... Necessity: Assume that there is a match as above such that * (n k) i * code(l j, i nj ), i.e. there exists a in the i subtree rooted at node n j (so that * i code(l j, i nj )) and a i node mc in the subtree rooted at node n k i (such that * (m) * ( n k i )). By this match, there is a function call of the form f(...,code m,...,,...) generated. Similar to the first art of the roof, the code code m acts as an argument of f and directly or indirectly includes the code of m. Consequently, in the function call f, m is evaluated before. This leads to a illegal evaluation order between m and which is a contradiction. In an algorithm, (n) can be calculated recursively in a bottom-u order for each node n in the syntax tree. It is indeendent of any attern matching. On the other hand, the value of * code(l, n) must be ket at node n associated with the label l during attern matching. In the conventional aroaches, the bottom-u heuristic search is alied, where at each node n associated with the relevant label l only the cheaest match of all rewriting rules l r is stored [3, 13]. In our algorithm, however, at each node n associated with the relevant label l, different matches that can generate different * code(l, n) must be stored (due to theorem 2). As a consequence, our algorithm for attern matching will use more sace than the conventional one. l j i

9 Handling of temoral variables One way of handling udates for temoral variables is to aly the attern matching only to certain subtrees of the syntax tree. Given a source statement which modifies an object, the ath from the node corresonding to the modified object to the node corresonding to the modifying oeration 4 is called writing-ath. If a syntax tree includes a writing-ath, then attern matching is only alied to those subtrees which do not include nodes of the writing-ath. In other words, for the subtree which includes nodes of the writing-ath, code generation must be erformed by traditional case analysis, since the current matching strategies are not suited for syntax trees containing writing-aths. Informally seaking, given a syntax tree which includes a writing-ath, attern matching is alied to the subtrees obtained after deleting the nodes of the writing-ath as well as the edges leading to those nodes. For examle, in the tree (7), the bold ath is the writing ath so that attern matching is only alied to the subtrees and v 2 (they are already nodes). For a more illustrative examle consider the statement, v 1 [v 0 +v 2 ] := v 1 [v 0 ]. The syntax tree is assign arr (t lus 2 ) v 0 V2 arr (t 1 ) where the bold ath is the writing-ath. Thus, attern matching is alied to the shadowed subtrees (t 1 ) and (t 2 ). Afterwards, the syntax tree becomes arr assign v tm2 v tm1 which must be treated by traditional case analysis. 4. We do not regard that the node of method call mc is a modified oeration, although certain method calls can cause side effect. v 0 5. Exerience We imlemented this front-end aroach successfully to translate the schema language VML into C++ [5]. The general issues of the VML comiler are described in [16]. VML is the modelling language of the object-oriented database system VODAK develoed at GMD-IPSI. The target language C++ satisfies the requirements stated in section 2. In fact, from the oint of view of comilation at statement level, we did not rely on other object-oriented features of C++. By this exerience several notes can be concluded as follows. First, assigning costs to rewriting rules is a difficult task and may undergo several revisions in order to reflect the changes during the system maintenance. When introducing new rewriting rules, the following assumtion must be obeyed: ASSUMPTION 1. The semantics of rewriting rules does not rely on the costs of the rules. Secondly, we assumed that the arguments of a target function call are evaluated in right-to-left order. However, if the arguments consist of more than one identifier-reference (E.g. we can define a olymorhic function call sumpro( 1,v 1,..., n,v n ) to reresent a source exression n, for any n > 0.), then the evaluation order among these arguments will rely on the function imlementation. For instance, in the function sumpro the values of 1 to n must be evaluated in right-to-left order. Nevertheless, this requirement somehow can lead to an imlementation in a zigzag way. E.g. in the body of function sumpro, the arguments should be counted in left-to-right order, because a variable number of arguments is allowed. Thus, it is necessary to introduce a stack in order to ush all arguments, and latter to o them in the reverse order for the urose of dereferencing these identifier-reference arguments. Clearly this way more sace would be required comared to the more direct way of dereferencing these arguments as soon as they are encountered. Fortunately, the correctness of theorem 1 and 2 does not rely on this restriction. ASSUMPTION 2. The bodies of target functions do not rely on the order in which their identifier-reference arguments are evaluated. Third, as mentioned above, attern matching only needs to control the evaluation order either between methods and methods or between methods and roerties. If a rewriting rule secifies more than one method call or a mix-

10 9 ture of method calls and roerties, then attern matching would be owerless to control the dereferencing order among these method-calls and/or roerties, since the control is already transferred to the body of target functions. As a consequence of assumtion 2, this case would not be under control. Therefore, there is a necessity to restrict the atterns to searate method calls from other kinds of nodes. ASSUMPTION 3. The set of rewriting rules must be consistent, such that only rules R 8 and R 9 contain nodes for method calls. 6. Comarison with revious work Previous research in attern-directed code generation can be broadly classified into two categories: LR arsing and tree-attern matching. With the former one, the code generator is constructed as a syntax-directed translator in which a linearized refix form of the IR tree is arsed by an LR arser built from a context-free grammar that describes the target machine [7, 8, 10-12]. With the later one, the aroach emloyed direct tree-attern matching techniques [1-3, 6, 13]. But all of them are focusing on source-to-machinecode translation. On the other hand, the current aroach for source-tosource code generation is still the traditional case analysis. This has been very useful for many alications. In general, the algorithm for case analysis is distributively defined at each node in the tree, and refers to the synthesized and inherited attributes. In the source-to-source background, one target instruction may cover a variable deth of the tree while there may be different alternatives to be chosen for the same tree. It is necessary for case analysis to consider the different combinations from the current node to its children and/or arent, and even to deeer levels. By far the largest roblem of this aroach is that the definitions of the target instructions are difficult to modify, since the algorithm for case analysis must follow this modification also. Benefited from the theoretical and ractical work that has been done on the conventional dynamic rogramming, this aer extends the tree attern matching into source-tosource code generation. However, there are several differences. The main oint is that the attern matching algorithm must exlicitly control the evaluation order. In our source-to-source background, instructions are function calls in which roerties are assed as identifier-reference arguments. As a result, the dereferencing order may violate the semantic. In conventional aroaches, however, the issue of evaluation order is not resolved in the hase of attern matching. It is assumed that the evaluation order is correct rovided a traversal strategy for the syntax tree secifies a legal order [14], since the syntax tree must be rewritten into machine-level (intermediate reresentation) before alying the attern matching. Consequently, the rewritten tree already uniquely determines the evaluation order. Suose, for examle, the syntax tree (4) is translated into machine code. Before alying attern matching, the tree must be rewritten into a form of function calls so that choosing the machine code corresonding to code (5) or (6), which secify different evaluation orders, is actually already determined in this hase, not in attern matching. 7. Discussion & Conclusion This aer extends conventional dynamic rogramming into source-to-source code generation. Based uon this aroach, the rocedure for otimization shows good oenness. In the conventional background, target instructions are redefined by hardware and are fixed. In contrast, in our alication the target instructions are a series of function calls and can be develoed incrementally. Generally seaking, initially rimitive instructions can be defined in the target-library. Latter, secial comosite instructions can be added to imrove the efficiency, esecially frequently occurring grous of rimitive instructions can be defined as comosite instructions. Although from the oint of view of semantic comleteness, the comosite instructions are redundant, but they lay an imortant role in the otimization, since more direct reresentations lead to a higher erformance. To facilitate an incremental develoment based on the imrovements of the target-library, a modular design is needed. The dynamic rogramming aroach aims to achieve this goal. Imrovements of the target-library require only modifications of the rewriting rules since those are searated from the attern matching algorithm. Acknowledgements We thank Wolfgang Klas and Peter Muth, for reading a reliminary version of this aer and suggesting imrovements for its resentation. References 1. AHO, A. V., AND CORASICK, M. J. Efficient string matching: An aid to bibliograhic search. Comm. ACM 18,6 (June 1975),

11 10 2. AHO, A. V., AND GANAPATHI, M. Efficient string matching: An aid to code generation. In Proc. of the ACM Sym. on Princiles of Programming Languages. ACM, New York, 1985, AHO, A. V., GANAPATHI, M., AND TJIANG, S. W. K. Code Generation Using Tree Matching and Dynamic Programming. ACM Trans. Program. Lang. Syst (Oct. 1989) AGRAWAL, R., DAR, S., AND GEHANI, N. The O++ database Programming Language: Imlementation and Exerience. Proc. on Data Engerienging CHEN, W.-M., AND TURAU, V. VML Code Generatin Based on Tree-Pattern Matching and Dynamic Programming. Tech. Re. 755, 1992, GMD-IPSI. 6. FRASER, C. W. Automatic Generation of code generators. Ph.D. Dissertation, Yale University, New Haven, Conn., GLANVILLE, R. S. A Machine Indeendent Algorithm for Code Generation and Its Use In Retargetable Comilers. Ph.D. Dissertation, University of California, Berkeley, Dec GLANVILLE, R. S., AND GRAHAM, S. L. A new method for comiler code generation. In Proc. ACM Sym. on Princiles of Programming Language. ACM, New York, 1978, GORLEN, K., ORLOW, S., AND PLEXICO, P. Data Abstraction and Object-Oriented Programming in C++. John Wiley & Sons, HENRY, R. R. Graham-Glanville Code Generators, Ph.D Dissertation, Comuter Science Division, Electrical Engineering and Comuter Science, Univ. of California, Berkeley, HENRY, R. R., AND DAMRON, P. C. Performance of Table-Driven Code Generators Using Tree-Pattern Matching. Tech. Re , Det. of Comuter Science, University of Washington, Seattle. Feb HENRY, R. R. Encoding Otimal Pattern Selection in a Table-Driven Bottom-U Tree-Pattern Matcher. Tech. Re , Det. of Comuter Science, University of Washington, Seattle. Feb HOFFMAN, C. W., AND O DONNELL, M. J. Pattern Matching in Trees. J. ACM 29, 1 (1982), LANDWEHR, R., JANSOHN, H. S., AND GOOS, G. Exerience with an automatic Code Generator Generator. ACM SIGPLAN Notices 23, 7 (1982), RICHARDSON. J. E., AND CAREY. M. J. Persistence in the E Language: Issues and Imlementation. Software Practice & Exerience 19, 12(Dec. 1989), TURAU, V., AND CHEN, W.-M. VML Comiler: Issues and Imlementation. (submitted for ublication)

12

Shuigeng Zhou. May 18, 2016 School of Computer Science Fudan University

Shuigeng Zhou. May 18, 2016 School of Computer Science Fudan University Query Processing Shuigeng Zhou May 18, 2016 School of Comuter Science Fudan University Overview Outline Measures of Query Cost Selection Oeration Sorting Join Oeration Other Oerations Evaluation of Exressions

More information

Relations with Relation Names as Arguments: Algebra and Calculus. Kenneth A. Ross. Columbia University.

Relations with Relation Names as Arguments: Algebra and Calculus. Kenneth A. Ross. Columbia University. Relations with Relation Names as Arguments: Algebra and Calculus Kenneth A. Ross Columbia University kar@cs.columbia.edu Abstract We consider a version of the relational model in which relation names may

More information

An Efficient Video Program Delivery algorithm in Tree Networks*

An Efficient Video Program Delivery algorithm in Tree Networks* 3rd International Symosium on Parallel Architectures, Algorithms and Programming An Efficient Video Program Delivery algorithm in Tree Networks* Fenghang Yin 1 Hong Shen 1,2,** 1 Deartment of Comuter Science,

More information

AUTOMATIC GENERATION OF HIGH THROUGHPUT ENERGY EFFICIENT STREAMING ARCHITECTURES FOR ARBITRARY FIXED PERMUTATIONS. Ren Chen and Viktor K.

AUTOMATIC GENERATION OF HIGH THROUGHPUT ENERGY EFFICIENT STREAMING ARCHITECTURES FOR ARBITRARY FIXED PERMUTATIONS. Ren Chen and Viktor K. inuts er clock cycle Streaming ermutation oututs er clock cycle AUTOMATIC GENERATION OF HIGH THROUGHPUT ENERGY EFFICIENT STREAMING ARCHITECTURES FOR ARBITRARY FIXED PERMUTATIONS Ren Chen and Viktor K.

More information

IMS Network Deployment Cost Optimization Based on Flow-Based Traffic Model

IMS Network Deployment Cost Optimization Based on Flow-Based Traffic Model IMS Network Deloyment Cost Otimization Based on Flow-Based Traffic Model Jie Xiao, Changcheng Huang and James Yan Deartment of Systems and Comuter Engineering, Carleton University, Ottawa, Canada {jiexiao,

More information

Equality-Based Translation Validator for LLVM

Equality-Based Translation Validator for LLVM Equality-Based Translation Validator for LLVM Michael Ste, Ross Tate, and Sorin Lerner University of California, San Diego {mste,rtate,lerner@cs.ucsd.edu Abstract. We udated our Peggy tool, reviously resented

More information

EE678 Application Presentation Content Based Image Retrieval Using Wavelets

EE678 Application Presentation Content Based Image Retrieval Using Wavelets EE678 Alication Presentation Content Based Image Retrieval Using Wavelets Grou Members: Megha Pandey megha@ee. iitb.ac.in 02d07006 Gaurav Boob gb@ee.iitb.ac.in 02d07008 Abstract: We focus here on an effective

More information

Efficient Processing of Top-k Dominating Queries on Multi-Dimensional Data

Efficient Processing of Top-k Dominating Queries on Multi-Dimensional Data Efficient Processing of To-k Dominating Queries on Multi-Dimensional Data Man Lung Yiu Deartment of Comuter Science Aalborg University DK-922 Aalborg, Denmark mly@cs.aau.dk Nikos Mamoulis Deartment of

More information

Truth Trees. Truth Tree Fundamentals

Truth Trees. Truth Tree Fundamentals Truth Trees 1 True Tree Fundamentals 2 Testing Grous of Statements for Consistency 3 Testing Arguments in Proositional Logic 4 Proving Invalidity in Predicate Logic Answers to Selected Exercises Truth

More information

Submission. Verifying Properties Using Sequential ATPG

Submission. Verifying Properties Using Sequential ATPG Verifying Proerties Using Sequential ATPG Jacob A. Abraham and Vivekananda M. Vedula Comuter Engineering Research Center The University of Texas at Austin Austin, TX 78712 jaa, vivek @cerc.utexas.edu Daniel

More information

Identity-sensitive Points-to Analysis for the Dynamic Behavior of JavaScript Objects

Identity-sensitive Points-to Analysis for the Dynamic Behavior of JavaScript Objects Identity-sensitive Points-to Analysis for the Dynamic Behavior of JavaScrit Objects Shiyi Wei and Barbara G. Ryder Deartment of Comuter Science, Virginia Tech, Blacksburg, VA, USA. {wei,ryder}@cs.vt.edu

More information

Space-efficient Region Filling in Raster Graphics

Space-efficient Region Filling in Raster Graphics "The Visual Comuter: An International Journal of Comuter Grahics" (submitted July 13, 1992; revised December 7, 1992; acceted in Aril 16, 1993) Sace-efficient Region Filling in Raster Grahics Dominik Henrich

More information

Introduction to Parallel Algorithms

Introduction to Parallel Algorithms CS 1762 Fall, 2011 1 Introduction to Parallel Algorithms Introduction to Parallel Algorithms ECE 1762 Algorithms and Data Structures Fall Semester, 2011 1 Preliminaries Since the early 1990s, there has

More information

Object and Native Code Thread Mobility Among Heterogeneous Computers

Object and Native Code Thread Mobility Among Heterogeneous Computers Object and Native Code Thread Mobility Among Heterogeneous Comuters Bjarne Steensgaard Eric Jul Microsoft Research DIKU (Det. of Comuter Science) One Microsoft Way University of Coenhagen Redmond, WA 98052

More information

An Efficient Coding Method for Coding Region-of-Interest Locations in AVS2

An Efficient Coding Method for Coding Region-of-Interest Locations in AVS2 An Efficient Coding Method for Coding Region-of-Interest Locations in AVS2 Mingliang Chen 1, Weiyao Lin 1*, Xiaozhen Zheng 2 1 Deartment of Electronic Engineering, Shanghai Jiao Tong University, China

More information

Sensitivity Analysis for an Optimal Routing Policy in an Ad Hoc Wireless Network

Sensitivity Analysis for an Optimal Routing Policy in an Ad Hoc Wireless Network 1 Sensitivity Analysis for an Otimal Routing Policy in an Ad Hoc Wireless Network Tara Javidi and Demosthenis Teneketzis Deartment of Electrical Engineering and Comuter Science University of Michigan Ann

More information

10. Parallel Methods for Data Sorting

10. Parallel Methods for Data Sorting 10. Parallel Methods for Data Sorting 10. Parallel Methods for Data Sorting... 1 10.1. Parallelizing Princiles... 10.. Scaling Parallel Comutations... 10.3. Bubble Sort...3 10.3.1. Sequential Algorithm...3

More information

Texture Mapping with Vector Graphics: A Nested Mipmapping Solution

Texture Mapping with Vector Graphics: A Nested Mipmapping Solution Texture Maing with Vector Grahics: A Nested Mimaing Solution Wei Zhang Yonggao Yang Song Xing Det. of Comuter Science Det. of Comuter Science Det. of Information Systems Prairie View A&M University Prairie

More information

Stereo Disparity Estimation in Moment Space

Stereo Disparity Estimation in Moment Space Stereo Disarity Estimation in oment Sace Angeline Pang Faculty of Information Technology, ultimedia University, 63 Cyberjaya, alaysia. angeline.ang@mmu.edu.my R. ukundan Deartment of Comuter Science, University

More information

Non-Strict Independence-Based Program Parallelization Using Sharing and Freeness Information

Non-Strict Independence-Based Program Parallelization Using Sharing and Freeness Information Non-Strict Indeendence-Based Program Parallelization Using Sharing and Freeness Information Daniel Cabeza Gras 1 and Manuel V. Hermenegildo 1,2 Abstract The current ubiuity of multi-core rocessors has

More information

Information Flow Based Event Distribution Middleware

Information Flow Based Event Distribution Middleware Information Flow Based Event Distribution Middleware Guruduth Banavar 1, Marc Kalan 1, Kelly Shaw 2, Robert E. Strom 1, Daniel C. Sturman 1, and Wei Tao 3 1 IBM T. J. Watson Research Center Hawthorne,

More information

Extracting Optimal Paths from Roadmaps for Motion Planning

Extracting Optimal Paths from Roadmaps for Motion Planning Extracting Otimal Paths from Roadmas for Motion Planning Jinsuck Kim Roger A. Pearce Nancy M. Amato Deartment of Comuter Science Texas A&M University College Station, TX 843 jinsuckk,ra231,amato @cs.tamu.edu

More information

Improved heuristics for the single machine scheduling problem with linear early and quadratic tardy penalties

Improved heuristics for the single machine scheduling problem with linear early and quadratic tardy penalties Imroved heuristics for the single machine scheduling roblem with linear early and quadratic tardy enalties Jorge M. S. Valente* LIAAD INESC Porto LA, Faculdade de Economia, Universidade do Porto Postal

More information

Multicast in Wormhole-Switched Torus Networks using Edge-Disjoint Spanning Trees 1

Multicast in Wormhole-Switched Torus Networks using Edge-Disjoint Spanning Trees 1 Multicast in Wormhole-Switched Torus Networks using Edge-Disjoint Sanning Trees 1 Honge Wang y and Douglas M. Blough z y Myricom Inc., 325 N. Santa Anita Ave., Arcadia, CA 916, z School of Electrical and

More information

A CLASS OF STRUCTURED LDPC CODES WITH LARGE GIRTH

A CLASS OF STRUCTURED LDPC CODES WITH LARGE GIRTH A CLASS OF STRUCTURED LDPC CODES WITH LARGE GIRTH Jin Lu, José M. F. Moura, and Urs Niesen Deartment of Electrical and Comuter Engineering Carnegie Mellon University, Pittsburgh, PA 15213 jinlu, moura@ece.cmu.edu

More information

in Distributed Systems Department of Computer Science, Keio University into four forms according to asynchrony and real-time properties.

in Distributed Systems Department of Computer Science, Keio University into four forms according to asynchrony and real-time properties. Asynchrony and Real-Time in Distributed Systems Mario Tokoro? and Ichiro Satoh?? Deartment of Comuter Science, Keio University 3-14-1, Hiyoshi, Kohoku-ku, Yokohama, 223, Jaan Tel: +81-45-56-115 Fax: +81-45-56-1151

More information

Efficient Dynamic Programming for Optimal Multi-Location Robot Rendezvous with Proofs

Efficient Dynamic Programming for Optimal Multi-Location Robot Rendezvous with Proofs Efficient Dynamic Programming for Otimal Multi-Location Robot Rendezvous with Proofs Ken Alton and Ian M. Mitchell Deartment of Comuter Science University of British Columbia Vancouver, BC, V6T 1Z4, Canada

More information

aclass: ClassDeclaration (name=name) aspectstatement: Statement (place=name) methods method: MethodDeclaration

aclass: ClassDeclaration (name=name) aspectstatement: Statement (place=name) methods method: MethodDeclaration Asect Weaving with Grah Rewriting Uwe A mann and Andreas Ludwig Institut f r Programmstrukturen und Datenorganisation Universit t Karlsruhe, RZ, Postfach 6980, 76128 Karlsruhe, Germany (assmannjludwig)@id.info.uni-karlsruhe.de

More information

CMSC 425: Lecture 16 Motion Planning: Basic Concepts

CMSC 425: Lecture 16 Motion Planning: Basic Concepts : Lecture 16 Motion lanning: Basic Concets eading: Today s material comes from various sources, including AI Game rogramming Wisdom 2 by S. abin and lanning Algorithms by S. M. LaValle (Chats. 4 and 5).

More information

Constrained Path Optimisation for Underground Mine Layout

Constrained Path Optimisation for Underground Mine Layout Constrained Path Otimisation for Underground Mine Layout M. Brazil P.A. Grossman D.H. Lee J.H. Rubinstein D.A. Thomas N.C. Wormald Abstract The major infrastructure comonent reuired to develo an underground

More information

Randomized algorithms: Two examples and Yao s Minimax Principle

Randomized algorithms: Two examples and Yao s Minimax Principle Randomized algorithms: Two examles and Yao s Minimax Princile Maximum Satisfiability Consider the roblem Maximum Satisfiability (MAX-SAT). Bring your knowledge u-to-date on the Satisfiability roblem. Maximum

More information

AN INTEGER LINEAR MODEL FOR GENERAL ARC ROUTING PROBLEMS

AN INTEGER LINEAR MODEL FOR GENERAL ARC ROUTING PROBLEMS AN INTEGER LINEAR MODEL FOR GENERAL ARC ROUTING PROBLEMS Philie LACOMME, Christian PRINS, Wahiba RAMDANE-CHERIF Université de Technologie de Troyes, Laboratoire d Otimisation des Systèmes Industriels (LOSI)

More information

Hardware-Accelerated Formal Verification

Hardware-Accelerated Formal Verification Hardare-Accelerated Formal Verification Hiroaki Yoshida, Satoshi Morishita 3 Masahiro Fujita,. VLSI Design and Education Center (VDEC), University of Tokyo. CREST, Jaan Science and Technology Agency 3.

More information

Leak Detection Modeling and Simulation for Oil Pipeline with Artificial Intelligence Method

Leak Detection Modeling and Simulation for Oil Pipeline with Artificial Intelligence Method ITB J. Eng. Sci. Vol. 39 B, No. 1, 007, 1-19 1 Leak Detection Modeling and Simulation for Oil Pieline with Artificial Intelligence Method Pudjo Sukarno 1, Kuntjoro Adji Sidarto, Amoranto Trisnobudi 3,

More information

The Anubis Service. Paul Murray Internet Systems and Storage Laboratory HP Laboratories Bristol HPL June 8, 2005*

The Anubis Service. Paul Murray Internet Systems and Storage Laboratory HP Laboratories Bristol HPL June 8, 2005* The Anubis Service Paul Murray Internet Systems and Storage Laboratory HP Laboratories Bristol HPL-2005-72 June 8, 2005* timed model, state monitoring, failure detection, network artition Anubis is a fully

More information

Directed File Transfer Scheduling

Directed File Transfer Scheduling Directed File Transfer Scheduling Weizhen Mao Deartment of Comuter Science The College of William and Mary Williamsburg, Virginia 387-8795 wm@cs.wm.edu Abstract The file transfer scheduling roblem was

More information

OMNI: An Efficient Overlay Multicast. Infrastructure for Real-time Applications

OMNI: An Efficient Overlay Multicast. Infrastructure for Real-time Applications OMNI: An Efficient Overlay Multicast Infrastructure for Real-time Alications Suman Banerjee, Christoher Kommareddy, Koushik Kar, Bobby Bhattacharjee, Samir Khuller Abstract We consider an overlay architecture

More information

1.5 Case Study. dynamic connectivity quick find quick union improvements applications

1.5 Case Study. dynamic connectivity quick find quick union improvements applications . Case Study dynamic connectivity quick find quick union imrovements alications Subtext of today s lecture (and this course) Stes to develoing a usable algorithm. Model the roblem. Find an algorithm to

More information

Signature File Hierarchies and Signature Graphs: a New Index Method for Object-Oriented Databases

Signature File Hierarchies and Signature Graphs: a New Index Method for Object-Oriented Databases Signature File Hierarchies and Signature Grahs: a New Index Method for Object-Oriented Databases Yangjun Chen* and Yibin Chen Det. of Business Comuting University of Winnieg, Manitoba, Canada R3B 2E9 ABSTRACT

More information

split split (a) (b) split split (c) (d)

split split (a) (b) split split (c) (d) International Journal of Foundations of Comuter Science c World Scientic Publishing Comany ON COST-OPTIMAL MERGE OF TWO INTRANSITIVE SORTED SEQUENCES JIE WU Deartment of Comuter Science and Engineering

More information

TOPP Probing of Network Links with Large Independent Latencies

TOPP Probing of Network Links with Large Independent Latencies TOPP Probing of Network Links with Large Indeendent Latencies M. Hosseinour, M. J. Tunnicliffe Faculty of Comuting, Information ystems and Mathematics, Kingston University, Kingston-on-Thames, urrey, KT1

More information

Matlab Virtual Reality Simulations for optimizations and rapid prototyping of flexible lines systems

Matlab Virtual Reality Simulations for optimizations and rapid prototyping of flexible lines systems Matlab Virtual Reality Simulations for otimizations and raid rototying of flexible lines systems VAMVU PETRE, BARBU CAMELIA, POP MARIA Deartment of Automation, Comuters, Electrical Engineering and Energetics

More information

Improving Trust Estimates in Planning Domains with Rare Failure Events

Improving Trust Estimates in Planning Domains with Rare Failure Events Imroving Trust Estimates in Planning Domains with Rare Failure Events Colin M. Potts and Kurt D. Krebsbach Det. of Mathematics and Comuter Science Lawrence University Aleton, Wisconsin 54911 USA {colin.m.otts,

More information

Skip List Based Authenticated Data Structure in DAS Paradigm

Skip List Based Authenticated Data Structure in DAS Paradigm 009 Eighth International Conference on Grid and Cooerative Comuting Ski List Based Authenticated Data Structure in DAS Paradigm Jieing Wang,, Xiaoyong Du,. Key Laboratory of Data Engineering and Knowledge

More information

Source Coding and express these numbers in a binary system using M log

Source Coding and express these numbers in a binary system using M log Source Coding 30.1 Source Coding Introduction We have studied how to transmit digital bits over a radio channel. We also saw ways that we could code those bits to achieve error correction. Bandwidth is

More information

Chapter 8: Adaptive Networks

Chapter 8: Adaptive Networks Chater : Adative Networks Introduction (.1) Architecture (.2) Backroagation for Feedforward Networks (.3) Jyh-Shing Roger Jang et al., Neuro-Fuzzy and Soft Comuting: A Comutational Aroach to Learning and

More information

Efficient Sequence Generator Mining and its Application in Classification

Efficient Sequence Generator Mining and its Application in Classification Efficient Sequence Generator Mining and its Alication in Classification Chuancong Gao, Jianyong Wang 2, Yukai He 3 and Lizhu Zhou 4 Tsinghua University, Beijing 0084, China {gaocc07, heyk05 3 }@mails.tsinghua.edu.cn,

More information

Lecture 2: Fixed-Radius Near Neighbors and Geometric Basics

Lecture 2: Fixed-Radius Near Neighbors and Geometric Basics structure arises in many alications of geometry. The dual structure, called a Delaunay triangulation also has many interesting roerties. Figure 3: Voronoi diagram and Delaunay triangulation. Search: Geometric

More information

SPITFIRE: Scalable Parallel Algorithms for Test Set Partitioned Fault Simulation

SPITFIRE: Scalable Parallel Algorithms for Test Set Partitioned Fault Simulation To aear in IEEE VLSI Test Symosium, 1997 SITFIRE: Scalable arallel Algorithms for Test Set artitioned Fault Simulation Dili Krishnaswamy y Elizabeth M. Rudnick y Janak H. atel y rithviraj Banerjee z y

More information

MSO Exam January , 17:00 20:00

MSO Exam January , 17:00 20:00 MSO 2014 2015 Exam January 26 2015, 17:00 20:00 Name: Student number: Please read the following instructions carefully: Fill in your name and student number above. Be reared to identify yourself with your

More information

Efficient Parallel Hierarchical Clustering

Efficient Parallel Hierarchical Clustering Efficient Parallel Hierarchical Clustering Manoranjan Dash 1,SimonaPetrutiu, and Peter Scheuermann 1 Deartment of Information Systems, School of Comuter Engineering, Nanyang Technological University, Singaore

More information

Lecture 18. Today, we will discuss developing algorithms for a basic model for parallel computing the Parallel Random Access Machine (PRAM) model.

Lecture 18. Today, we will discuss developing algorithms for a basic model for parallel computing the Parallel Random Access Machine (PRAM) model. U.C. Berkeley CS273: Parallel and Distributed Theory Lecture 18 Professor Satish Rao Lecturer: Satish Rao Last revised Scribe so far: Satish Rao (following revious lecture notes quite closely. Lecture

More information

search(i): Returns an element in the data structure associated with key i

search(i): Returns an element in the data structure associated with key i CS161 Lecture 7 inary Search Trees Scribes: Ilan Goodman, Vishnu Sundaresan (2015), Date: October 17, 2017 Virginia Williams (2016), and Wilbur Yang (2016), G. Valiant Adated From Virginia Williams lecture

More information

Analyzing Borders Between Partially Contradicting Fuzzy Classification Rules

Analyzing Borders Between Partially Contradicting Fuzzy Classification Rules Analyzing Borders Between Partially Contradicting Fuzzy Classification Rules Andreas Nürnberger, Aljoscha Klose, Rudolf Kruse University of Magdeburg, Faculty of Comuter Science 39106 Magdeburg, Germany

More information

An empirical analysis of loopy belief propagation in three topologies: grids, small-world networks and random graphs

An empirical analysis of loopy belief propagation in three topologies: grids, small-world networks and random graphs An emirical analysis of looy belief roagation in three toologies: grids, small-world networks and random grahs R. Santana, A. Mendiburu and J. A. Lozano Intelligent Systems Grou Deartment of Comuter Science

More information

An Indexing Framework for Structured P2P Systems

An Indexing Framework for Structured P2P Systems An Indexing Framework for Structured P2P Systems Adina Crainiceanu Prakash Linga Ashwin Machanavajjhala Johannes Gehrke Carl Lagoze Jayavel Shanmugasundaram Deartment of Comuter Science, Cornell University

More information

The concept of set is a very basic one. It is simple; yet, it suffices as the basis on which all abstract notions in mathematics can be built.

The concept of set is a very basic one. It is simple; yet, it suffices as the basis on which all abstract notions in mathematics can be built. Chater 1 Sets and functions Section 1.1 Sets The concet of set is a very basic one. It is simle; yet, it suffices as the basis on which all abstract notions in mathematics can be built. A set is determined

More information

Swift Template Matching Based on Equivalent Histogram

Swift Template Matching Based on Equivalent Histogram Swift emlate Matching ased on Equivalent istogram Wangsheng Yu, Xiaohua ian, Zhiqiang ou * elecommunications Engineering Institute Air Force Engineering University Xi an, PR China *corresonding author:

More information

Distributed Estimation from Relative Measurements in Sensor Networks

Distributed Estimation from Relative Measurements in Sensor Networks Distributed Estimation from Relative Measurements in Sensor Networks #Prabir Barooah and João P. Hesanha Abstract We consider the roblem of estimating vectorvalued variables from noisy relative measurements.

More information

Face Recognition Using Legendre Moments

Face Recognition Using Legendre Moments Face Recognition Using Legendre Moments Dr.S.Annadurai 1 A.Saradha Professor & Head of CSE & IT Research scholar in CSE Government College of Technology, Government College of Technology, Coimbatore, Tamilnadu,

More information

Lecture 3: Geometric Algorithms(Convex sets, Divide & Conquer Algo.)

Lecture 3: Geometric Algorithms(Convex sets, Divide & Conquer Algo.) Advanced Algorithms Fall 2015 Lecture 3: Geometric Algorithms(Convex sets, Divide & Conuer Algo.) Faculty: K.R. Chowdhary : Professor of CS Disclaimer: These notes have not been subjected to the usual

More information

Complexity Issues on Designing Tridiagonal Solvers on 2-Dimensional Mesh Interconnection Networks

Complexity Issues on Designing Tridiagonal Solvers on 2-Dimensional Mesh Interconnection Networks Journal of Comuting and Information Technology - CIT 8, 2000, 1, 1 12 1 Comlexity Issues on Designing Tridiagonal Solvers on 2-Dimensional Mesh Interconnection Networks Eunice E. Santos Deartment of Electrical

More information

Near-Optimal Routing Lookups with Bounded Worst Case Performance

Near-Optimal Routing Lookups with Bounded Worst Case Performance Near-Otimal Routing Lookus with Bounded Worst Case Performance Pankaj Guta Balaji Prabhakar Stehen Boyd Deartments of Electrical Engineering and Comuter Science Stanford University CA 9430 ankaj@stanfordedu

More information

Privacy Preserving Moving KNN Queries

Privacy Preserving Moving KNN Queries Privacy Preserving Moving KNN Queries arxiv:4.76v [cs.db] 4 Ar Tanzima Hashem Lars Kulik Rui Zhang National ICT Australia, Deartment of Comuter Science and Software Engineering University of Melbourne,

More information

We will then introduce the DT, discuss some of its fundamental properties and show how to compute a DT directly from a given set of points.

We will then introduce the DT, discuss some of its fundamental properties and show how to compute a DT directly from a given set of points. Voronoi Diagram and Delaunay Triangulation 1 Introduction The Voronoi Diagram (VD, for short) is a ubiquitious structure that aears in a variety of discilines - biology, geograhy, ecology, crystallograhy,

More information

The Spatial Skyline Queries

The Spatial Skyline Queries The Satial Skyline Queries Mehdi Sharifzadeh Comuter Science Deartment University of Southern California Los Angeles, CA 90089-078 sharifza@usc.edu Cyrus Shahabi Comuter Science Deartment University of

More information

J. Parallel Distrib. Comput.

J. Parallel Distrib. Comput. J. Parallel Distrib. Comut. 71 (2011) 288 301 Contents lists available at ScienceDirect J. Parallel Distrib. Comut. journal homeage: www.elsevier.com/locate/jdc Quality of security adatation in arallel

More information

PREDICTING LINKS IN LARGE COAUTHORSHIP NETWORKS

PREDICTING LINKS IN LARGE COAUTHORSHIP NETWORKS PREDICTING LINKS IN LARGE COAUTHORSHIP NETWORKS Kevin Miller, Vivian Lin, and Rui Zhang Grou ID: 5 1. INTRODUCTION The roblem we are trying to solve is redicting future links or recovering missing links

More information

Models for Advancing PRAM and Other Algorithms into Parallel Programs for a PRAM-On-Chip Platform

Models for Advancing PRAM and Other Algorithms into Parallel Programs for a PRAM-On-Chip Platform Models for Advancing PRAM and Other Algorithms into Parallel Programs for a PRAM-On-Chi Platform Uzi Vishkin George C. Caragea Bryant Lee Aril 2006 University of Maryland, College Park, MD 20740 UMIACS-TR

More information

A New and Efficient Algorithm-Based Fault Tolerance Scheme for A Million Way Parallelism

A New and Efficient Algorithm-Based Fault Tolerance Scheme for A Million Way Parallelism A New and Efficient Algorithm-Based Fault Tolerance Scheme for A Million Way Parallelism Erlin Yao, Mingyu Chen, Rui Wang, Wenli Zhang, Guangming Tan Key Laboratory of Comuter System and Architecture Institute

More information

MATHEMATICAL MODELING OF COMPLEX MULTI-COMPONENT MOVEMENTS AND OPTICAL METHOD OF MEASUREMENT

MATHEMATICAL MODELING OF COMPLEX MULTI-COMPONENT MOVEMENTS AND OPTICAL METHOD OF MEASUREMENT MATHEMATICAL MODELING OF COMPLE MULTI-COMPONENT MOVEMENTS AND OPTICAL METHOD OF MEASUREMENT V.N. Nesterov JSC Samara Electromechanical Plant, Samara, Russia Abstract. The rovisions of the concet of a multi-comonent

More information

Record Route IP Traceback: Combating DoS Attacks and the Variants

Record Route IP Traceback: Combating DoS Attacks and the Variants Record Route IP Traceback: Combating DoS Attacks and the Variants Abdullah Yasin Nur, Mehmet Engin Tozal University of Louisiana at Lafayette, Lafayette, LA, US ayasinnur@louisiana.edu, metozal@louisiana.edu

More information

10 File System Mass Storage Structure Mass Storage Systems Mass Storage Structure Mass Storage Structure FILE SYSTEM 1

10 File System Mass Storage Structure Mass Storage Systems Mass Storage Structure Mass Storage Structure FILE SYSTEM 1 10 File System 1 We will examine this chater in three subtitles: Mass Storage Systems OERATING SYSTEMS FILE SYSTEM 1 File System Interface File System Imlementation 10.1.1 Mass Storage Structure 3 2 10.1

More information

A DEA-bases Approach for Multi-objective Design of Attribute Acceptance Sampling Plans

A DEA-bases Approach for Multi-objective Design of Attribute Acceptance Sampling Plans Available online at htt://ijdea.srbiau.ac.ir Int. J. Data Enveloment Analysis (ISSN 2345-458X) Vol.5, No.2, Year 2017 Article ID IJDEA-00422, 12 ages Research Article International Journal of Data Enveloment

More information

Sensitivity of multi-product two-stage economic lotsizing models and their dependency on change-over and product cost ratio s

Sensitivity of multi-product two-stage economic lotsizing models and their dependency on change-over and product cost ratio s Sensitivity two stage EOQ model 1 Sensitivity of multi-roduct two-stage economic lotsizing models and their deendency on change-over and roduct cost ratio s Frank Van den broecke, El-Houssaine Aghezzaf,

More information

Short Papers. Symmetry Detection by Generalized Complex (GC) Moments: A Close-Form Solution 1 INTRODUCTION

Short Papers. Symmetry Detection by Generalized Complex (GC) Moments: A Close-Form Solution 1 INTRODUCTION 466 IEEE TRANSACTIONS ON PATTERN ANALYSIS AND MACHINE INTELLIGENCE VOL 2 NO 5 MAY 999 Short Paers Symmetry Detection by Generalized Comlex (GC) Moments: A Close-Form Solution Dinggang Shen Horace HS I

More information

A BICRITERION STEINER TREE PROBLEM ON GRAPH. Mirko VUJO[EVI], Milan STANOJEVI] 1. INTRODUCTION

A BICRITERION STEINER TREE PROBLEM ON GRAPH. Mirko VUJO[EVI], Milan STANOJEVI] 1. INTRODUCTION Yugoslav Journal of Oerations Research (00), umber, 5- A BICRITERIO STEIER TREE PROBLEM O GRAPH Mirko VUJO[EVI], Milan STAOJEVI] Laboratory for Oerational Research, Faculty of Organizational Sciences University

More information

A Model-Adaptable MOSFET Parameter Extraction System

A Model-Adaptable MOSFET Parameter Extraction System A Model-Adatable MOSFET Parameter Extraction System Masaki Kondo Hidetoshi Onodera Keikichi Tamaru Deartment of Electronics Faculty of Engineering, Kyoto University Kyoto 66-1, JAPAN Tel: +81-7-73-313

More information

A Study of Protocols for Low-Latency Video Transport over the Internet

A Study of Protocols for Low-Latency Video Transport over the Internet A Study of Protocols for Low-Latency Video Transort over the Internet Ciro A. Noronha, Ph.D. Cobalt Digital Santa Clara, CA ciro.noronha@cobaltdigital.com Juliana W. Noronha University of California, Davis

More information

CardS4: Modal Theorem Proving on Java Smartcards

CardS4: Modal Theorem Proving on Java Smartcards CardS4: Modal Theorem Proving on Java Smartcards Rajeev Prabhakar Goré and Phuong Thê Nguyên Abstract We describe a successful imlementation of a theorem rover for modal logic S4 that runs on a Java smart

More information

Theoretical Analysis of Graphcut Textures

Theoretical Analysis of Graphcut Textures Theoretical Analysis o Grahcut Textures Xuejie Qin Yee-Hong Yang {xu yang}@cs.ualberta.ca Deartment o omuting Science University o Alberta Abstract Since the aer was ublished in SIGGRAPH 2003 the grahcut

More information

A Novel Iris Segmentation Method for Hand-Held Capture Device

A Novel Iris Segmentation Method for Hand-Held Capture Device A Novel Iris Segmentation Method for Hand-Held Cature Device XiaoFu He and PengFei Shi Institute of Image Processing and Pattern Recognition, Shanghai Jiao Tong University, Shanghai 200030, China {xfhe,

More information

Applying the fuzzy preference relation to the software selection

Applying the fuzzy preference relation to the software selection Proceedings of the 007 WSEAS International Conference on Comuter Engineering and Alications, Gold Coast, Australia, January 17-19, 007 83 Alying the fuzzy reference relation to the software selection TIEN-CHIN

More information

Model-Based Annotation of Online Handwritten Datasets

Model-Based Annotation of Online Handwritten Datasets Model-Based Annotation of Online Handwritten Datasets Anand Kumar, A. Balasubramanian, Anoo Namboodiri and C.V. Jawahar Center for Visual Information Technology, International Institute of Information

More information

Fast Distributed Process Creation with the XMOS XS1 Architecture

Fast Distributed Process Creation with the XMOS XS1 Architecture Communicating Process Architectures 20 P.H. Welch et al. (Eds.) IOS Press, 20 c 20 The authors and IOS Press. All rights reserved. Fast Distributed Process Creation with the XMOS XS Architecture James

More information

CASCH - a Scheduling Algorithm for "High Level"-Synthesis

CASCH - a Scheduling Algorithm for High Level-Synthesis CASCH a Scheduling Algorithm for "High Level"Synthesis P. Gutberlet H. Krämer W. Rosenstiel Comuter Science Research Center at the University of Karlsruhe (FZI) HaidundNeuStr. 1014, 7500 Karlsruhe, F.R.G.

More information

A GPU Heterogeneous Cluster Scheduling Model for Preventing Temperature Heat Island

A GPU Heterogeneous Cluster Scheduling Model for Preventing Temperature Heat Island A GPU Heterogeneous Cluster Scheduling Model for Preventing Temerature Heat Island Yun-Peng CAO 1,2,a and Hai-Feng WANG 1,2 1 School of Information Science and Engineering, Linyi University, Linyi Shandong,

More information

Earthenware Reconstruction Based on the Shape Similarity among Potsherds

Earthenware Reconstruction Based on the Shape Similarity among Potsherds Original Paer Forma, 16, 77 90, 2001 Earthenware Reconstruction Based on the Shae Similarity among Potsherds Masayoshi KANOH 1, Shohei KATO 2 and Hidenori ITOH 1 1 Nagoya Institute of Technology, Gokiso-cho,

More information

To appear in IEEE TKDE Title: Efficient Skyline and Top-k Retrieval in Subspaces Keywords: Skyline, Top-k, Subspace, B-tree

To appear in IEEE TKDE Title: Efficient Skyline and Top-k Retrieval in Subspaces Keywords: Skyline, Top-k, Subspace, B-tree To aear in IEEE TKDE Title: Efficient Skyline and To-k Retrieval in Subsaces Keywords: Skyline, To-k, Subsace, B-tree Contact Author: Yufei Tao (taoyf@cse.cuhk.edu.hk) Deartment of Comuter Science and

More information

Efficiently building a parse tree from a regular expression?

Efficiently building a parse tree from a regular expression? ACTA Informatica ManuscritNr. (will be inserted by hand later) Efficiently building a arse tree from a regular exression? Danny Dubé and Marc Feeley?? Université de Montréal C.P. 6128, succ. centreville,

More information

An improved algorithm for Hausdorff Voronoi diagram for non-crossing sets

An improved algorithm for Hausdorff Voronoi diagram for non-crossing sets An imroved algorithm for Hausdorff Voronoi diagram for non-crossing sets Frank Dehne, Anil Maheshwari and Ryan Taylor May 26, 2006 Abstract We resent an imroved algorithm for building a Hausdorff Voronoi

More information

The VEGA Moderately Parallel MIMD, Moderately Parallel SIMD, Architecture for High Performance Array Signal Processing

The VEGA Moderately Parallel MIMD, Moderately Parallel SIMD, Architecture for High Performance Array Signal Processing The VEGA Moderately Parallel MIMD, Moderately Parallel SIMD, Architecture for High Performance Array Signal Processing Mikael Taveniku 2,3, Anders Åhlander 1,3, Magnus Jonsson 1 and Bertil Svensson 1,2

More information

Improved Symmetric Lists

Improved Symmetric Lists Imroved Symmetric Lists Prerint February, 24 Christian Bachmaier and Marcus Raitner University of Passau, 943 Passau, Germany {bachmaier,raitner}@fmi.uni-assau.de Abstract. We introduce a new data structure

More information

Brief Contributions. A Geometric Theorem for Network Design 1 INTRODUCTION

Brief Contributions. A Geometric Theorem for Network Design 1 INTRODUCTION IEEE TRANSACTIONS ON COMPUTERS, VOL. 53, NO., APRIL 00 83 Brief Contributions A Geometric Theorem for Network Design Massimo Franceschetti, Member, IEEE, Matthew Cook, and Jehoshua Bruck, Fellow, IEEE

More information

GEOMETRIC CONSTRAINT SOLVING IN < 2 AND < 3. Department of Computer Sciences, Purdue University. and PAMELA J. VERMEER

GEOMETRIC CONSTRAINT SOLVING IN < 2 AND < 3. Department of Computer Sciences, Purdue University. and PAMELA J. VERMEER GEOMETRIC CONSTRAINT SOLVING IN < AND < 3 CHRISTOPH M. HOFFMANN Deartment of Comuter Sciences, Purdue University West Lafayette, Indiana 47907-1398, USA and PAMELA J. VERMEER Deartment of Comuter Sciences,

More information

AN ANALYTICAL MODEL DESCRIBING THE RELATIONSHIPS BETWEEN LOGIC ARCHITECTURE AND FPGA DENSITY

AN ANALYTICAL MODEL DESCRIBING THE RELATIONSHIPS BETWEEN LOGIC ARCHITECTURE AND FPGA DENSITY AN ANALYTICAL MODEL DESCRIBING THE RELATIONSHIPS BETWEEN LOGIC ARCHITECTURE AND FPGA DENSITY Andrew Lam 1, Steven J.E. Wilton 1, Phili Leong 2, Wayne Luk 3 1 Elec. and Com. Engineering 2 Comuter Science

More information

Computing the Convex Hull of. W. Hochstattler, S. Kromberg, C. Moll

Computing the Convex Hull of. W. Hochstattler, S. Kromberg, C. Moll Reort No. 94.60 A new Linear Time Algorithm for Comuting the Convex Hull of a Simle Polygon in the Plane by W. Hochstattler, S. Kromberg, C. Moll 994 W. Hochstattler, S. Kromberg, C. Moll Universitat zu

More information

Using Standard AADL for COMPASS

Using Standard AADL for COMPASS Using Standard AADL for COMPASS (noll@cs.rwth-aachen.de) AADL Standards Meeting Aachen, Germany; July 5 8, 06 Overview Introduction SLIM Language Udates COMPASS Develoment Roadma Fault Injections Parametric

More information

Figure 8.1: Home age taken from the examle health education site (htt:// Setember 14, 2001). 201

Figure 8.1: Home age taken from the examle health education site (htt://  Setember 14, 2001). 201 200 Chater 8 Alying the Web Interface Profiles: Examle Web Site Assessment 8.1 Introduction This chater describes the use of the rofiles develoed in Chater 6 to assess and imrove the quality of an examle

More information

An object oriented approach to lattice gas modeling

An object oriented approach to lattice gas modeling An object oriented aroach to lattice gas modeling Alexandre Duuis and Bastien Choard University of Geneva, CUI, 24, rue Général-Dufour, CH - 1211 Geneva, Switzerland [Alexandre.Duuis Bastien.Choard]@cui.unige.ch

More information