Extending Graph Rewriting for Refactoring

Size: px
Start display at page:

Download "Extending Graph Rewriting for Refactoring"

Transcription

1 Extending Graph Rewriting for Refactoring Nies Van Eetvede, Dirk Janssens University of Antwerp Departent of oputer science Middeheiaan Antwerpen {nies.vaneetvede dirk.janssens@ua.ac.be Abstract. Refactorings are transforations that change the structure of a progra, whie preserving the behavior. The topic has attracted a ot of attention recenty, since it is a proising approach towards the probe of progra erosion. Nevertheess a soid theoretica foundation is sti acking. In this paper we focus on iproving the expressive power of graph rewriting rues, so that ore refactorings can be expressed by singe rues. Two new echaniss are introduced: a notion of refineent of graphs, enabing one to treat specific substructures (e.g. syntax trees of expressions) as a whoe, and a notion of dupication, enabing one to use parts of rewriting rues as prototypes that can be instantiated severa ties. oth echaniss can be viewed as ways to specify arge or infinite sets of rues in a concise way. It is shown that the refactorings PushdownMethod, ExtractMethod and InineMethod can be expressed using the proposed techniques. 1 Introduction Refactorings are software transforations that restructure object-oriented progras whie preserving their behavior [1 3]. The key idea is to redistribute instance variabes and ethods across the cass hierarchy in order to prepare the software for future extensions. If appied we, refactorings iprove the design of software, ake software easier to understand, hep to find bugs, and hep to progra faster [1]. Refactoring is aready supported by a ot of toos (see e.g. [4]) and is even one of the cornerstones of the Extree Prograing [5] ethodoogy, but a fora basis for it is sti acking. This paper continues the exporation of graph transforation as such a fora basis. In [6] and [7] the basic idea is to represent the progra source code as a sipe, typed graph, and ode these refactorings as graph transforations on this etaode. Unfortunatey, any refactorings cannot be expressed directy as rues, ainy because it is difficut to express coon operations ike the copying and oving of progra trees. One possibe soution is to break down the refactorings into saer steps, which then correspond to singe rue appications. This approach has been used in [7], Work partiay supported through FWO - project A Fora Foundation for Software Refactoring and EU-TMR network SegraVis through Universiteit Antwerpen

2 II where refactorings correspond to transforation units [8]. A disadvantage of this approach is that such description ay be ess transparent than one where each refactoring corresponds to a singe rue: one ay end up with a description where ost of the copexity is in the contro structure of the transforation unit, and where the rues are reativey trivia. Thus in this paper we ai at extending the notion of a graph rewriting rue in an existing ebedding-based approach in such a way that the effect of each refactoring is described by just one rue. Two echaniss are presented: the first one is a notion of refineent (for abes, graphs and rues) oosey based on the notion of a hierarchica graph [9, 10]. In contrast to the approach in [10], however, both nodes and edges are refined, and the refineent is based on abes. The second echanis enabes one to dupicate certain parts of a rue. oth echaniss can be viewed as ways to specify arge or infinite sets of rues in a concise way. There are two ain approaches to graph rewriting: on the one hand the approach based on doube pushouts, and on the other hand the one based on ebedding. This paper uses graph transforation with ebedding, where appying a rue to a graph G happens in three stages: a subgraph of G is reoved, it is repaced by a new graph, and this new graph is connected to the reaining part of G according to an ebedding echanis that is provided as part of the rue. It is we known that a rue with ebedding ay be viewed as a specification of a potentiay infinite set of (siper) rues in the doube pushout approach. Since, in this paper, it is our ai to ake singe rues ore expressive, it is natura to choose for the ebedding-based approach. For ore inforation about the various approaches to graph rewriting we refer to [11]. In Section 2 soe basic notions and notations concerning graphs and graph rewriting are recaed. In Section 3 the two ain constructions, refineent and dupication, are otivated in ters of rues describing refactorings. In Sections 5 and 4 the two constructions are introduced, and iustrated using the Push Down Method refactoring. Finay, in Section 6 it is deonstrated that the constructions provide sufficient expressive power to aow singe rue descriptions of the refactorings Extract Method and Inine Method. 2 Graphs and Graph Transforation In this section we reca soe basic notions and notation concerning graphs and ebedding-based graph rewriting. We consider graphs over an aphabet Σ = Σ v Σ e, where Σ v and Σ e are the sets of node and edge abes, respectivey. 2.1 Graphs Definition 1 (graph). A graph is a 3 - tupe (V, E, ab) where V is a finite set, E (V Σ e V ), and ab : V Σ v. The atos of G is the set A G = {V G E G. For an edge e = (v, a, w), we denote ab(e) = a. Hence ab is viewed as a abeing function defined on A G. The

3 III foowing notations wi be used throughout this paper. Let G be a graph, and et x be an ato of G. Then G x is the graph defined as foows: if x V G, then G x is the discrete graph consisting of the node x, abeed by ab G (x). if x E G, x = (u, a, w), then G x is the graph consisting of the edge x and its source u and target w, where u and w are abeed by ab G (u) and ab G (w), respectivey. The adjacency set Adj(G) of a graph G is defined by Adj(G) = {(e, v) e E G, v V G, v = source(e) {(v, e) e E G, v V G, v = target(e). The induced subgraph of a graph G = (V, E, ab) on a set of nodes S V is the graph G = (S, E, ab ) such that E = E (S Σ e S) and ab is the restriction of ab to S. 2.2 Graph Rewriting The basic idea of graph rewriting is that oca transforations of graphs are described as appications of rues. The approach used in this paper is a specia case of Loca Action Systes [12], and a variant of ESM systes [13]. The presentation used here is soewhat ore basic, since the ephasis is on the for of individua rues, rather than on the description of concurrent processes coposed fro the. A rue consists of four coponents: the first two are graphs, caed the eft-hand side and the right-hand side of the rue, respectivey. The other two coponents specify the ebedding echanis, as in [14]. A rue r is appied to a graph G by atching the eft-hand side with a subgraph of G, repacing this subgraph by a copy of the right-hand side, and finay connecting this copy to the reaining part of G using the ebedding echanis. Foray, the fact that a graph G is transfored into a graph H, using a specific atching orphis i L and specific orphiss i R and i rest, ay be expressed using the notion of a step. Definition 2 (rue). A rue is a 4-tupe (L, R, in, out) where L, R are graphs and in, out V L V R Σ e Σ e. Definition 3 (step). A step is a 5-tupe (G, H, P, i L, i R, i rest ) such that the foowing hods: 1. G and H are graphs, P = (L, R, in, out) is a rue, i L : L G L is an isoorphis of L onto a subgraph G L of G, i R : R H R is an isoorphis of R onto a subgraph of H, and i rest : G rest H rest is an isoorphis, where G rest and H rest are the induced subgraphs of G and H on (V G \i L (V L )) and (V H \ i R (V R )), respectivey 2. For each x i R (V R ), y V H \i R (V R ), a Σ e, (x, a, y) E H if and ony if there exists an edge (x, a, y ) E G such that x i L (V L ), y V G \i L (V L ), y = i rest (y ) and (i 1 L (x ), i 1 R (x), a, a) out

4 IV 3. For each x i R (V R ), y V H \i R (V R ), a Σ e, (y, a, x) E H if and ony if there exists an edge (y, a, x ) E G such that x i L (V L ), y V G \i L (V L ), y = i rest (y ) and (i 1 L (x ), i 1 R (x), a, a) in. Thus, inforay, an occurrence G L of L, is repaced by an occurrence H R of R. An ite (v, w, λ, δ) in is used to redirect incoing edges fro i L (v) to i R (w), at the sae tie changing its abe fro λ to δ. The interpretation for out is siiar, but for outgoing edges. L i R G G L R i L H H R i rest Fig. 1. A step 3 Refactoring as Graph Transforation To describe refactorings as graph transforations, a graph representation of progras is needed. The representation used in this paper is a sipified version of the one in [6], and is siiar to a syntax tree. It contains ony four types of nodes:, M, V and E. The first three node types ode the basic entities in object-oriented progras: casses, ethods and variabes. No distinction is ade between variabes, attributes and fora paraeters of ethods because this inforation can be easiy extracted fro the context (e.g. a V -node connected to a cass is an attribute). The fourth type of node is E, which can be any other syntax tree eeent, ike an assignent, a ca, or a bock structure node. To express the reations between the progra entities, a set of edge abes is introduced. A suary of the types is given in Tabe 1. To ake the representation of the refactorings in Section 6 easier to understand, a few subtypes of the E type are introduced. They are a, As, for ethod cas, assignents and bock structure nodes. 3.1 Exape In [15], a java progra for the siuation of a token ring Loca Area Network is considered. Such a network consists of a set of nodes, which are connected

5 V Edge description Node description ethod ookup ass entity ebership M Method Signature i inheritance V Variabe a read/write access E Syntax Tree Node p actua/fora paraeter c dynaic ca e cascaded expression hs eft hand side of assignent rhs right hand side of assignent v oca variabe Tabe 1. Types of nodes and edges in the graph representation to each other. Packet forwarding is done on a hop by hop basis. Different types of nodes can exist on the network, ike nodes offering printing services, or user workstations. In Figure 2 a sipified progra graph representing this siuation is given. The cass Node has two ethods accept and send for forwarding packets (odeed with the Packet cass), and an originate ethod for creating packets. Two subtypes of Node exist: PrintServer and Workstation, which provide printing and security services. To keep the exape cear, the paraeter reations between the different ethods and the Packet cass are oitted. It is Node, i accept, M send, M originate, M Packet, PrintServer, print, M Workstation, encode, M Node, i PrintServer, print, M accept, M originate, M send, M Packet, Workstation, encode, M Fig. 2. Part of a progra graph for a LAN siuation progra Fig. 3. The LAN progra after the Push Down Method refactoring obvious that this design is not optia, because a printing server shoud not originate new packets athough it inherits this ethod fro its parent cass. It turns out that the originate ethod is too specific for the Node cass. The Push Down Method refactoring can sove this probe by oving this behaviour fro the Node cass to its subcasses. The resuting progra is given in Figure 3. Note that, for guaranteeing the preservation of behaviour, the refactoring dupicates

6 VI the ethod to a of the subcasses. A further refactoring step shoud then reove the originate ipeentation fro PrintServer when there are no references to the ethod fro other casses. The required graph rewriting rue is depicted in Figure 4, and the ebedding reation for it is given in Tabe 2. Note that in this case no edges need to be reabeed: for each ite of the tabe, the 3 rd and 4 th coponents are equa. It is however cear that this rue needs to be adapted whenever the ethod body of the originate ethod changes. Hence it woud be usefu to introduce a ore abstract representation of the rue, as depicted in Figure 5, where the abe of node 4 serves as a variabe for trees representing ethod bodies. Such a rue coud then be refined by repacing this node by the desired syntax tree. A construction aowing this is presented in Section 5. 1 Node, i i 2 3 Workstation, PrintServer, ' Node, i i 2' 3' Workstation, PrintServer, 4' 4'' 5' 5'' 6' 7' 6'' 7'' Fig. 4. oncrete rue for the push down ethod Incoing Outgoing (1, 1, x, x) (1, 1, x, x) (2, 2, x, x) (2, 2, x, x) (3, 3, x, x) (3, 3, x, x) (4, 4, x, x), (4, 4, x, x) (4, 4, x, x), (4, 4, x, x) (5, 5, x, x), (5, 5, x, x) (5, 5, x, x), (5, 5, x, x) (6, 6, x, x), (6, 6, x, x) (6, 6, x, x), (6, 6, x, x) (7, 7, x, x), (7, 7, x, x) (7, 7, x, x), (7, 7, x, x) Tabe 2. Ebedding reation for the Push Down Method rue A second probe becoes apparent when one reaizes that the nuber of subcasses of Node is not necessariy fixed. If a new subcass DHPServer is added, a new refactoring rue has to be created. Rather than to specify a new rue for each nuber of subcasses, one woud ike to have a echanis to designate a part of a rue that ay be dupicated an arbitrary nuber of ties, yieding

7 VII 1 i i ' 2' 4' i i 3' 4'' Fig. 5. Metarue for the push down ethod ore, siiar rues. Hence the designated part serves as a prototype for the dupicated versions. In the case of Push Down Method the rue woud specify expicity how one subcass is handed, as in Figure 6, and then the part of the rue consisting of the nodes 2, 2 and 3 coud be used as the part to be dupicated. 1 1' i i 2 3 2' 3' Fig. 6. Prototype rue for the push down ethod refactoring The exape suggests that two echaniss are needed to iprove the expressivity of ebedding based rues: one aowing for the refineent of ites, an one aowing dupication. The atter, which is the siper one, is introduced in the next section, whereas refineent is introduced in Section 5. 4 Dupication in rewrite rues The ai of this section is to introduce a notion of dupication in productions. The part of a rue P = (L, R, in, out) that is to be dupicated is designated by giving its set of nodes: a subset D of V L V R, caed the dupication set. For each n N +, a new version P n of P is constructed by creating n new copies G n of the subgraph G of L R induced by D. (L R is the graph obtained by

8 VIII putting together L and R, without overap, and considering the as one graph.) Hence in genera each new copy G i contains a part of the eft-hand side as we as a part of the right-hand side of P n. The new copies G i of G are connected by edges to the nodes of L and R outside D in the sae way as G is in L R, and they are not connected to each other. The notion of dupication is foray defined as foows: Definition 4 (dupication). Let G be the subgraph of L R induced by D, and et G 1, G 2,..., G n be pairwise disjoint copies of G. For each v D, et v i be its iage in G i and et G i = (V i, E i, ab i ). Let G rest be the induced subgraph of L R on V (L R) \D. Then the rue P n is constructed as foows: V Pn = (V (L R) \D) ( n i=1 V i) ab Pn (w) = { abl R (w) if w V (L R) \D ab L R (v) if w = v i for soe i E Pn = E Grest ( n i=1 E i) {(w, a, v i ) w V (L R) \D, v D, (w, a, v) E L R {(v i, a, w) w V (L R) \D, (v, a, w), v D, E L R The ebedding reation in n of P n contains, for each ite (v, w, a, b) in the origina ebedding reation in, the foowing ites. For a node v of D, et v i denote the corresponding node of G i. If v, w D, then (v, w, a, b) in n If v D, w D, then (v i, w, a, b) in n, for each i : 1 i n If v D, w D, then ((v, w i, a, b) in n, for each i : 1 i n If v D, w D, then (v i, w i, a, b) in n, for each i : 1 i n The reation out n is obtained in a siiar way. A scheatic representation of dupication in a rue is depicted in Figure 7. L P R L P 3 R D G1 G 2 G 3 Fig. 7. Scheatic representation of the dupication

9 IX 5 Refineent The notion of refineent aows one to view a graph in a hierarchica way: soe nodes and edges on the higher eve represent graphs, and these graphs serve as buiding bocks to construct the ower eve graph. The notion is inspired by the work of [10] on hierarchica graphs. However there are severa differences: not ony nodes, but aso edges are refined, and there are ony two eves in the hierarchy. Moreover the refineent of graphs is based on refineent of abes. Thus it is assued that the inforation about the reationship between high-eve abes and the corresponding sets of buiding bocks, as we as about the way these buiding bocks shoud be connected to each other, is provided together with the aphabets. In this way the probe of specifying the refineent is decouped fro the probe of designing rues. In this section, first the inforation associated to the aphabets is considered. Then it is described how this is used to obtain a notion of refineent for graphs. Finay, the atter notion is cobined with that of graph rewriting, eading to a echanis for the appication of so-caed etarues (rues containing abes that can be refined). 5.1 aphabets The notion of refineent is based on the introduction of new high eve abes. These abes are variabes in the sense that they represent an arbitrary eeent of a set of graphs (e.g. syntax trees of ethod bodies). Thus this set of graphs serves as the type or set of possibe vaues of the variabe. Thus, foray, the set Σ = Σ v Σ e of abes is extended by a set var. The high-eve representation entioned above is a graph over the aphabet = var Σ. Since there are variabes for both nodes and edges, var = var,v var,e and v = var,v Σ v, e = var,e Σ e. For a graph G over var, an ato x of G is a variabe ato if ab G (x), and it is a constant ato otherwise. Since the graphs considered are representations of progras, the way variabe abes ay be used in the is subject to restrictions siiar to the ones that describe the etaode of Section 3. The set Adj( ) contains a pairs (, β) of node and edge abes that ay be adjacent in vaid graphs, i.e. in graphs that are vaid representations of progras in the chosen etaode. Thus Adj( ) = {(, β) v, β e, ay occur as abe of the source of a β-abeed edge {(β, ) v, β e, ay occur as abe of the target of a β-abeed edge. 5.2 Refineent of abes An iportant issue in the proposed construction is the description of the way the refined atos of a graph over are gued together. The we-known pushout construction, in the category of graphs with abe-preserving graph orphiss, is used for this, and hence the way graphs are gued is specified by spans. Definition 5 (span). Let G, H be graphs. A (G, H)-span is a 5-tupe (G, h 1, S, h 2, H) where G, H and S are graphs over Σ and h 1 : S G, h 2 : S H are injective graph orphiss.

10 X One needs spans of a restricted for to specify the way constant atos are connected with refined versions of abstract atos: 1. for a Σ v and a Σ-graph G, a (G, a)-span is a span of the for G a a 2. for b Σ e and a Σ-graph G, a (G, b)-span is a span of the for G x x (x is apped to x ). 3. for b Σ e and a Σ-graph G, a (b, G)-span is a span of the for b G x x b (x is apped to x ). The reationship between variabe abes and the sets of graphs which are their possibe refineents is deterined by a refineent set: for each variabe abe var, this refineent set is denoted R() and contains a set of graphs over Σ. Siiary, one shoud aso specify in which way the refineents of an edge abe ay be connected to (or overap whith) the refineents of the node abes of its source and target. This inforation ust be avaiabe for each (, β) Adj( ) and is given in the for of a set of spans. Furtherore, one needs to specify the inforation about the way refined versions of variabe abes ay be connected to constant nodes and edges. This can be expressed using the specia spans. Foray, it is assued that the foowing inforation is given: for each var, a set R() of graphs over Σ. for each pair (, β) Adj( ), a set R(, β) such that if, β are variabes, then R(, β) is a set of (x, y)-spans where x R() and y R(β). if is variabe and β is constant, then R(, β) is a set of (x, β)-spans where x R(). if is constant and β is variabe, then R(, β) is a set of (, x)-spans where x R(β). Moreover it is assued that, for each variabe, each G R(), and each constant β such that (, β) Adj( ), R(, β) contains exacty one (G, β)- span, and siiar for the syetric case ( constant and β variabe). Hence, inforay, there is ony one way to connect the refined version of a variabe to a concrete ato. This restriction is not fundaenta to the notion of a refineent; it just turns out that we do not need the ore genera case for the purpose of this paper. The use of these sets can be iustrated by the Push Down Method refactoring. For exape, a variabe in Figure 5 is used for representing a syntax tree, thus, R() is the set of trees representing ethod bodies. A typica exape for the specia spans is the connection between the constant -edge and the variabe -node. This is specified in the set R(, ). 5.3 Refineent of graphs A graph G containing variabe atos can be refined by repacing each variabe ato with abe by a graph chosen in R(), and guing the so obtained buiding

11 XI bocks together according to the pairs (e, v) and (v, e) in Adj(G). Foray we define a refineent to be an assignent of graphs and spans to the atos and the eeents of Adj(G), respectivey. Evidenty, this assignent has to be consistent with the inforation about refineent given together with the aphabets. Definition 6 (refineent). Let G be a graph over. A refineent of G is a apping ref defined on A G Adj(G), such that 1. for each ato x A G : ref(x) is a graph over Σ 2. for each (x, y) Adj(G), ref(x, y) is a (ref(x), ref(y))-span 3. for each variabe ato x of G, ref(x) R(ab G (x)) 4. for each constant ato x of G, ref(x) = G x 5. for each (x, y) Adj(G) such that at east one of x and y is a variabe ato, ref(x, y) R(ab G (x), ab G (y)) 6. for each (x, y) Adj(G) such that both x and y are constant, ref(x, y) is the span (G x G y id Gy ) if x is an edge and y is a node, and (G x id Gx G y ) if x is a node and y is an edge. Here id denotes the identity apping. The notion is iustrated by Figure 8. Observe that the refineent ref is copetey deterined by the eeents ref(x) and ref(x, y) where both x and y are variabe atos. Given a graph G over and a refineent ref of G, one ay now use the graphs ref(x) as buiding bocks which are gued together using the spans ref(x, y). It is we known that this construction can be defined foray using the notion of a pushout in the category of graphs. Definition 7 (refined version of a graph). Let G be a graph over and et ref be a refineent. The refined version of G, denoted ref(g), is the coon pushout object of the graphs ref(x), x A G, and the spans ref(x, y), (x, y) Adj(G). The pushout object ref(g) is unique up to isoorphis, Thus ref(g) is in fact a set of isoorphic graphs (i.e. an abstract graph). For our purpose it suffices to choose an arbitrary concrete representative. Aso, observe that each constant ato of G corresponds to a unique ite of ref(g). Thus it akes sense to distinguish between two kinds of atos in ref(g): constant atos, that correspond to constant atos of G atos that beong to the refined versions of variabe ites of G 5.4 obining refineent with graph rewriting As expained earier, our ai is to introduce graph rewriting rues over the extended aphabet, i.e. incuding variabe abes. Such a rue, caed a etarue, can be refined, yieding a possiby arge or infinite set of rues over Σ. These can be appied in the usua way to graphs representing progras. Athough, in principe, one coud generate a rues corresponding to a etarue r = (L, R, in, out), and then appy one of the to a graph G, it is ore reaistic, fro an ipeentation point of view, to do the instantiation on-the-fy and appy the etarue to G, going through the foowing phases.

12 XII φ β τ γ φ β τ γ A F T G G A T F Fig. 8. refineent schee for three connected nodes a. Find an occurrence, i.e. deterine the pace in G where a rue, derived fro the etarue, fits: this resuts in a refined version L ow of L as we as in a graph orphis reating L ow to a subgraph of G. b. Using this occurrence, and in particuar the refineent deterined by it, to construct a refined version R ow of the right-hand side R. c. construct the ebedding reations of the refined rue. d. appy the so constructed rue to the occurrence chosen in a. The situation is depicted in Figure 9. We wi now expain in ore detai how the steps a - c are carried out and ead to a fora definition of a etarue. Deterine an occurrence The usua situation in graph rewriting is that the pace where a rue ay be appied is deterined by an injective graph orphis fro the eft-hand side of the rue into the graph that is rewritten. When appying a etarue to a graph G over Σ, the situation is sighty ore copex: finding an occurrence now is a cobination of finding a suitabe refineent as we as a orphis. Definition 8 (occurrence). Let G be a graph over and et H be a graph over Σ. An occurrence of G in H is a tripe (ref, Ĝ, ) where ref is a refineent of G, Ĝ is a concrete representative of ref(g), and is an injective orphis of Ĝ into H. The refineent shoud be copatibe with the abeing of G: if x, x are variabe atos of G and ab G (x) = ab G (x ), then ref(x) = ref(x ) if (x, y), (x, y ) Adj(G), (ab G (x), ab G (y)) = (ab G (x ), ab G (y )), and at east one of x, y is variabe, then ref(x, y) = ref(x, y ) Thus, the sae abes and pairs of abes are refined in the sae way throughout G. For the purpose of this paper, i.e. when the echanis is used to describe refactoring, it is usefu to consider ony axia occurrences, i.e. occurrences such that the iage of Ĝ in H is axia (foray, there exists no occurrence (ref, Ĝ, ) such that Ĝ Ĝ and there is an injective orphis fro Ĝ into Ĝ ). This restriction wi avoid a situation where the refined rue atches e.g., not a copete ethod body but ony a part of it.

13 XIII onstruction of ref(r) To be abe to construct a unique refineent of the right hand side of a etarue, given a specific occurrence of its eft hand side L, it is essentia that the reevant variabe abes and pairs of abes of the rue have a unique refineent assigned to the by the occurrence. Therefore, for each variabe ite x in R, an ato x of L, carrying the sae abe, shoud exist. And siiary, for each cobination of variabe atos (x, y) in Adj(R), ( x, ỹ) Adj(L). Then an occurrence of L deterines a refineent ref of R: For each variabe ato x of R : ref(x) = ref( x) For each (x, y) Adj(R) with x, y variabe: ref(x, y) = ref( x, ỹ) Refineent of the ebedding The refineent of a etarue requires the refineent of its ebedding reations as we. One distinguishes between two kinds of nodes in the refined versions of L and R: those that correspond to constant nodes of L or R, and the other nodes. For the nodes of the first kind, the ebedding reations are expicity given as part of the etarue. Nodes of the second kind beong to the refineent of a variabe ite. ecause of the restrictions on etarues, each node x of this kind in R has a counterpart x in L. When the refined rue is appied, then the ebedding edges of x are redirected to x. Hence a eeents ( x, x, a, a), for each abe a of Σ, ust be added to the ebedding reations of the etarue to obtain the ebedding reations of the refined rue. Fro the previous paragraphs, the fora definition of a etarue can now be deduced. Definition 9 (etarue). A etarue is a rue r = (L, R, in, out) over the extended aphabet, but satisfying the foowing restrictions: 1. Ony constant nodes of L and R occur in the ebedding reations in and out. 2. For each variabe ite x of R, there exists an ite x of L such that ab R (x) = ab L ( x). 3. If x, y are variabe ites of R, and (x, y) Adj R, then ( x, ỹ) Adj L L high R high ref ref G L ow R ow H Fig. 9. Appication of a etarue

14 XIV 5.5 Appication to Push Down Method The fina version of the refactoring corresponds indeed to the one in Figure 6. This rue is caed the prototype rue and contains ony one supercass. The dupication set is D = {2, 2, 3 (i.e. on both sides of the rue, equay any copies of the subcass node have to be ade, but the ethod body ony needs to be dupicated on the right hand side). 5.6 obining refineent and dupication As dupication is intended to be appied to a etarue before refineent, it ust be abe to hande variabe ato dupication. Therefore a few adaptations to the definition of dupication are usefu to strengthen the expressivity of the rues. onsider a variabe ato x with abe in the dupication set D. In the dupication operation, as defined in Section 4, the part of the production corresponding to D is dupicated, incuding the variabe ite. Thus, if dupicated i ties, eads to i versions of x, a abeed. In an occurrence this atches ony a graph containing i identica substructures, each of which is a refineent of. However, often one wants soething ese: one wants to aow different refineents for each version (for exape, the γ variabe in the Inine Method refactoring, described in Section 6.2). Therefore, soe of the variabe abes ay be designated as specia. For specia abes, a new version is created for each dupicate. Foray, et specia var be the set of specia abes. For each specia abe specia, et 1, 2,... be new variabe abes, et R( i ) = R() and et R( i, β) = R(, β) for each abe β. Let for each, and i 1, { if is not specia φ i () = i if is specia The definition of dupication (Definition 4) is odified as foows: The G i = (V i, E i, ab i ) are pairwise disjoint and there exists a function f i : V G V i such that f i is bijective for each x V i, such that x = f i (v): ab i (x) = φ i (v) E i = {(f i (x), φ i (a), f i (y)) (x, a, y) E G E Pn contains the edges E Grest ( n i=1 E i) {(w, φ i (a), f i (v)) w V (L R) \D, v D, (w, a, v) E L R {(f i (v), φ i (a), w) w V (L R) \D, v D, (v, a, w) E L R 6 Using etarues for refactoring In this section, two other refactorings which can be expressed using the proposed extensions are presented: Extract Method and Inine Method. For each, an infora definition and a sketch of the etarue is given.

15 XV 6.1 Extract Method The Extract Method refactoring sipifies ethods by identifying arge parts of existing ethods as stand-aone ethods. The input for the refactoring is a bock of code inside the ethod, specified by the prograer. A sa code exape iustrating the refactoring is given beow. On the eft side, the origina progra is isted. When the prograer decides that the ethod sequence a(), b(x), c() is a coherent part of the ethod, this sequence can be grouped in a new ethod. Inside the origina ethod, a ca to the new ethod is added. The refactored code is shown in the right hand side: pubic cass c1 { void ethod1(int ) { int x; start(); a(); b(x); c(); stop(); pubic cass c1 { void execute(int, int x) { a(); b(x); c(); void ethod1(int ) { int x; start(); execute(, x); stop(); When odeing this refactoring by a etarue, one needs to consider the different variabe aspects of the refactoring: 1. The expression bock seected by the prograer is variabe (e.g. the prograer coud have chosen to extract ony the a();b(x) sequence). 2. The position of the expression inside the origina ethod body is variabe 3. The variabes can be accessed fro arbitrary points in the syntax tree (e.g. the variabe x coud be accessed by the ethod b instead of a) 4. The nuber of oca variabes and paraeters accessed by the expression is unknown. This inforation is needed because these variabes shoud be passed as paraeters to the new ethod (e.g. there coud be a second oca variabe y, accessed by the expression bock). This variabe shoud then be added to the paraeter ist of execute(). The first probe is soved using a variabe node abe δ, siiar to the abe for the ethod body in the Push Down Method refactoring. The second probe is soved using an edge with variabe abe, can be refined into a path fro the root of the ethod body to the start of the expression. The third probe can aso be odeed using the refineent of edges. In this case, the refined version of the high eve edge contains a set of access edges fro the syntax tree to the paraeters and oca variabes. Such an edge is needed for every oca variabe and paraeter. The prototype refactoring, showing the etarue for a situation

16 XVI where ony one ethod paraeter and one oca variabe is accessed, is depicted in Figure 10. The fourth probe is soved by defining two dupication sets with 1 p 2 M β 3 4 v γ 5 δ V V 1' p 2' M 3' 4' v 8' c 5' 9' a M β 6' p p 6'' p p δ β V V E E V V 7' 7'' a a Fig. 10. The Extract Method Metarue the refactoring, the first one for the oca variabes: D 1 = {4, 4, 6, 7, and the second one for the paraeters: D 2 = {2, 2, 6, 7. The ebedding reation for this refactoring is very sipe: a incoing and outgoing edges to or fro nodes on the eft hand are redirected to the corresponding nodes on the right hand side. 6.2 Inine Method The Inine Method is the opposite refactoring of Extract Method and repaces a ca to a ethod by an inined version of this ethod. Athough this refactoring sees in genera not a good idea, because it causes code dupication, it ight be a good choice for a software engineer because it aows one to reduce the nuber of (short) cass ethods and, consequenty, the copexity of the cass interface. The refactoring is iustrated in the code exape beow. The ethod print of the cass 1 is very short, actuay it does nothing ore than caing the siiar syste function. In the refactored version, it is therefore repaced by an inined version of the ethod. The etarue is depicted in Figure 11. oth the ethod containing the ca (node 3) and the obsoete ethod (node 7) are invoved in the rue. The ethod ca can occur at any pace inside the ethod. Thus, the syntax tree path fro

17 XVII pubic cass 1 { void print(int i) { Syste.out.printn(i); void ethod(int a, int b) { dosoethingwith(a, b); print(a); pubic cass 1 { void ethod(int a, int b) { dosoethingwith(a, b); Syste.out.printn(a); the ethod root to the ca is odeed by the variabe edge. A specia abe γ is used to ode the actua paraeters of the od ethod, because the dupication of this variabe node requires that each copy shoud be refined to a different actua paraeter. The access edges fro the syntax tree of the od ethod to its oca variabes need to be odeed as we. This is done using the variabe edge with abe δ. The genera outine of the refactoring execution is sipe: at the pace of the ca a new codebock is added. At the start of the bock, a new oca variabe is created for every paraeter, and the actua paraeter expression is assigned to it. Finay, the syntax tree is copied and and the references to the paraeters are updated to becoe references to the new oca variabes. One dupication set d = {5, 5, 8, 8, 7 is used, to take care of the unknown nuber of paraeters of the ethod. Note that this version of Inine ethod is not very optia, because of the creation of new variabes. The code can sti be ade ore efficient by appying subsequent refactorings such as Inine Teporary Variabe [1] to reove redundant variabes. The ebedding is siiar as in the previous case. 1 1' 2 3 M 4 p 5 E γ c δ β p M V e 2' 3' M 4' v 7' E V 8' As 6' β hs 5' rhs γ δ Fig. 11. The Inine Method Metarue

18 XVIII References 1. Fower, M.: Refactoring - Iproving the Design of Existing ode. Addison Wesey (1999) 2. Opdyke, W.F.: Refactoring Object-Oriented Fraeworks. PhD thesis, University of Iinois, Urbana-hapaign, IL, USA (1992) 3. Roberts, D.: Practica Anaysis for Refactoring. PhD thesis, University of Iinois at Urbana-hapaign (1999) 4. Roberts, D., rant, J., Johnson, R.: A refactoring too for Satak. Theory and Practice of Object Systes 3 (1997) eck, K., Fower, M.: Panning extree prograing. Addison-Wesey (2001) 6. Mens, T., Deeyer, S., Janssens, D.: Foraising behaviour preserving progra transforations. In: Graph Transforation. Voue 2505 of Lecture Notes in oputer Science., Springer-Verag (2002) Proc. 1st Int onf. Graph Transforation 2002, arceona, Spain. 7. Paoo ottoni, Francesco Parisi Presicce, G.T.: Specifying integrated refactoring with distributed graph transforations. In: Proceedings of AGTIVE (2003) Kreowski, H.J., Kuske, S.: Graph transforation units with intereaving seantics. Fora Aspects of oputing 11 (1999) Enges, G., Schürr, A.: Encapsuated hierarchica graphs, graph types and eta types. Eectronic Notes in Theoretica oputer Science 2 (1995) 10. Drewes, F., Hoffann,., Pup, D.: Hierarchica graph transforation. Lecture Notes in oputer Science 1784 (2000) Engefriet, J., Rozenberg, G.: Handbook of Graph Graars and oputing by Graph Transforation. Voue 1. Word Scientific (1997) 12. Janssens, D.: Actor graars and Loca Actions. In: Handbook of Graph Graars and oputing by Graph Transforation. Word Scientific (1999) Janssens, D.: ESM systes and the coposition of their coputations. Graph Transforations in oputer Science 776 (1994) Janssens, D., Mens, T.: Abstract seantics for ESM systes. Fundaenta Inforaticae 26 (1996) Janssens, D., Deeyer, S., Mens, T.: ase study: Siuation of a LAN. In: Eectronic Notes in Theoretica oputer Science. Voue 72, issue 4., Esevier (2002)

Formalising Refactorings with Graph Transformations

Formalising Refactorings with Graph Transformations Fundaenta Inforaticae XXI (200) 00 022 00 IOS Press Foraising Refactorings with Graph Transforations To Mens C Prograing Technoogy Lab Vrije Universiteit Brusse Peinaan 2, 050 Brusse, Begiu to.ens@vub.ac.be

More information

Origami Axioms. O2 Given two marked points P and Q, we can fold a marked line that places P on top of Q.

Origami Axioms. O2 Given two marked points P and Q, we can fold a marked line that places P on top of Q. Origai Axios Given a piece of paper, it is possibe to fod ots of different ines on it. However, ony soe of those ines are constructibe ines, eaning that we can give precise rues for foding the without

More information

A Fast Recovery Technique for Multi-Point to Multi-Point MPLS tunnels

A Fast Recovery Technique for Multi-Point to Multi-Point MPLS tunnels M. Chaitou and J. L. Roux / IJECCT 01, Vo. (3) 34 A Fast Recovery Technique for Muti-Point to Muti-Point MPLS tunnes Mohaad Chaitou and Jean-Louis Le RouxOrange Labs avenue Pierre Marzin, 300 Lannion France

More information

Database Replication Algorithm Performance in High Speed Networks Under Load Balancing

Database Replication Algorithm Performance in High Speed Networks Under Load Balancing Database Repication Agorith Perforance in High Speed Networks Under Load Baancing Rekh Nath Singh 1, Raghura Singh 2 1 Research Schoar, A. P. J. Abdu Kaa Technica University, Lucknow, India. 2 Director,

More information

Lines and Angles. introduction

Lines and Angles. introduction 9 Lines and nges intrductin In cass VI, you have earnt soe basic concepts and ters of geoetry point, ine, pane, ine segent, ray, ange and types of anges. In this chapter, we sha earn about soe pairs of

More information

Language Identification for Texts Written in Transliteration

Language Identification for Texts Written in Transliteration Language Identification for Texts Written in Transiteration Andrey Chepovskiy, Sergey Gusev, Margarita Kurbatova Higher Schoo of Economics, Data Anaysis and Artificia Inteigence Department, Pokrovskiy

More information

Alpha labelings of straight simple polyominal caterpillars

Alpha labelings of straight simple polyominal caterpillars Apha abeings of straight simpe poyomina caterpiars Daibor Froncek, O Nei Kingston, Kye Vezina Department of Mathematics and Statistics University of Minnesota Duuth University Drive Duuth, MN 82-3, U.S.A.

More information

Performance Modeling of Database Servers in a Telecommunication Service Management System

Performance Modeling of Database Servers in a Telecommunication Service Management System ICDT : The Seventh Internationa Conference on Digita Teecounications Perforance Modeing of Database Servers in a Teecounication Service Manageent Syste Maria Kih, Paya Aani, Anders Robertsson, Gabriea

More information

Solutions to the Final Exam

Solutions to the Final Exam CS/Math 24: Intro to Discrete Math 5//2 Instructor: Dieter van Mekebeek Soutions to the Fina Exam Probem Let D be the set of a peope. From the definition of R we see that (x, y) R if and ony if x is a

More information

Outerjoins, Constraints, Triggers

Outerjoins, Constraints, Triggers Outerjoins, Constraints, Triggers Lecture #13 Autumn, 2001 Fa, 2001, LRX #13 Outerjoins, Constraints, Triggers HUST,Wuhan,China 358 Outerjoin R S = R S with danging tupes padded with nus and incuded in

More information

TRANSFORMATIONS AND SYMMETRY

TRANSFORMATIONS AND SYMMETRY TRNSFORMTIONS ND SYMMETRY 1.2.1 1.2.5 Studing transforations of geoetric shapes buids a foundation for a ke idea in geoetr: congruence. In this introduction to transforations, the students epore three

More information

Further Concepts in Geometry

Further Concepts in Geometry ppendix F Further oncepts in Geometry F. Exporing ongruence and Simiarity Identifying ongruent Figures Identifying Simiar Figures Reading and Using Definitions ongruent Trianges assifying Trianges Identifying

More information

TRANSFORMATIONS AND SYMMETRY

TRANSFORMATIONS AND SYMMETRY 2 Transforations Defense Practice TRNSFORMTIONS ND SYMMETRY 1.2.1 1.2.5 Studing transforations of geoetric shapes buids a foundation for a ke idea in geoetr: congruence. In this introduction to transforations,

More information

A Design Method for Optimal Truss Structures with Certain Redundancy Based on Combinatorial Rigidity Theory

A Design Method for Optimal Truss Structures with Certain Redundancy Based on Combinatorial Rigidity Theory 0 th Word Congress on Structura and Mutidiscipinary Optimization May 9 -, 03, Orando, Forida, USA A Design Method for Optima Truss Structures with Certain Redundancy Based on Combinatoria Rigidity Theory

More information

Shaped Generic Graph Transformation

Shaped Generic Graph Transformation Shaped Generic Graph Transforation Frank Drewes, Berthold Hoffann, Dirk Janssens 3, ark inas 4, and Niels an Eetvelde 3 Ueå universitet, Sweden Universität Breen, Gerany 3 Universiteit Antwerpen, Belgiu

More information

file://j:\macmillancomputerpublishing\chapters\in073.html 3/22/01

file://j:\macmillancomputerpublishing\chapters\in073.html 3/22/01 Page 1 of 15 Chapter 9 Chapter 9: Deveoping the Logica Data Mode The information requirements and business rues provide the information to produce the entities, attributes, and reationships in ogica mode.

More information

understood as processors that match AST patterns of the source language and translate them into patterns in the target language.

understood as processors that match AST patterns of the source language and translate them into patterns in the target language. A Basic Compier At a fundamenta eve compiers can be understood as processors that match AST patterns of the source anguage and transate them into patterns in the target anguage. Here we wi ook at a basic

More information

Special Edition Using Microsoft Excel Selecting and Naming Cells and Ranges

Special Edition Using Microsoft Excel Selecting and Naming Cells and Ranges Specia Edition Using Microsoft Exce 2000 - Lesson 3 - Seecting and Naming Ces and.. Page 1 of 8 [Figures are not incuded in this sampe chapter] Specia Edition Using Microsoft Exce 2000-3 - Seecting and

More information

As Michi Henning and Steve Vinoski showed 1, calling a remote

As Michi Henning and Steve Vinoski showed 1, calling a remote Reducing CORBA Ca Latency by Caching and Prefetching Bernd Brügge and Christoph Vismeier Technische Universität München Method ca atency is a major probem in approaches based on object-oriented middeware

More information

The Big Picture WELCOME TO ESIGNAL

The Big Picture WELCOME TO ESIGNAL 2 The Big Picture HERE S SOME GOOD NEWS. You don t have to be a rocket scientist to harness the power of esigna. That s exciting because we re certain that most of you view your PC and esigna as toos for

More information

Automatic Conversion Software for the Safety Verification of Goal-Based Control Programs

Automatic Conversion Software for the Safety Verification of Goal-Based Control Programs Subitted, 2009 Internationa Conference on Software Engineering (ICSE) http://www.cds.catech.edu/~urray/papers/2008t_h09-icse.ht Autoatic Conversion Software for the Safety Verification of Goa-Based Contro

More information

A Petrel Plugin for Surface Modeling

A Petrel Plugin for Surface Modeling A Petre Pugin for Surface Modeing R. M. Hassanpour, S. H. Derakhshan and C. V. Deutsch Structure and thickness uncertainty are important components of any uncertainty study. The exact ocations of the geoogica

More information

A NEW METHOD FOR OPTIMAL LOCATION OF FACTS CONTROLLERS USING GENETIC ALGORITHM

A NEW METHOD FOR OPTIMAL LOCATION OF FACTS CONTROLLERS USING GENETIC ALGORITHM Journa of heoretica and Appied Inforation echnoogy 200-2007 JAI. A rights reserved. www.atit.org A NEW MEHOD FOR OPIMAL LOCAION OF FACS CONROLLERS USING GENEIC ALGORIHM 1 K. Vayakuar, 2 Dr. R. P. Kuudinidevi

More information

Hiding secrete data in compressed images using histogram analysis

Hiding secrete data in compressed images using histogram analysis University of Woongong Research Onine University of Woongong in Dubai - Papers University of Woongong in Dubai 2 iding secrete data in compressed images using histogram anaysis Farhad Keissarian University

More information

An Introduction to Design Patterns

An Introduction to Design Patterns An Introduction to Design Patterns 1 Definitions A pattern is a recurring soution to a standard probem, in a context. Christopher Aexander, a professor of architecture Why woud what a prof of architecture

More information

Running Tite: Conict-Free Access of Paths Address for Correspondence: M.C. Pinotti IEI-CNR Via S. Maria, Pisa ITALY E-ai:

Running Tite: Conict-Free Access of Paths Address for Correspondence: M.C. Pinotti IEI-CNR Via S. Maria, Pisa ITALY E-ai: Mappings for Conict-Free Access of Paths in Bidiensiona Arrays, Circuar Lists, and Copete Trees Aan A. Bertossi y and M. Cristina Pinotti Istituto di Eaborazione de' Inforazione Nationa Counci of Research

More information

Relational Model. Lecture #6 Autumn, Fall, 2001, LRX

Relational Model. Lecture #6 Autumn, Fall, 2001, LRX Reationa Mode Lecture #6 Autumn, 2001 #06 Reationa Mode HUST,Wuhan,China 121 Reationa Mode Tabe = reation. Coumn headers = attributes. Row = tupe Reation schema = name(attributes). Exampe: Beers(name,

More information

DETERMINING INTUITIONISTIC FUZZY DEGREE OF OVERLAPPING OF COMPUTATION AND COMMUNICATION IN PARALLEL APPLICATIONS USING GENERALIZED NETS

DETERMINING INTUITIONISTIC FUZZY DEGREE OF OVERLAPPING OF COMPUTATION AND COMMUNICATION IN PARALLEL APPLICATIONS USING GENERALIZED NETS DETERMINING INTUITIONISTIC FUZZY DEGREE OF OVERLAPPING OF COMPUTATION AND COMMUNICATION IN PARALLEL APPLICATIONS USING GENERALIZED NETS Pave Tchesmedjiev, Peter Vassiev Centre for Biomedica Engineering,

More information

A Comparison of a Second-Order versus a Fourth- Order Laplacian Operator in the Multigrid Algorithm

A Comparison of a Second-Order versus a Fourth- Order Laplacian Operator in the Multigrid Algorithm A Comparison of a Second-Order versus a Fourth- Order Lapacian Operator in the Mutigrid Agorithm Kaushik Datta (kdatta@cs.berkeey.edu Math Project May 9, 003 Abstract In this paper, the mutigrid agorithm

More information

Concise Papers. Main Memory Indexing: The Case for BD-Tree 1 INTRODUCTION 3 COST ANALYSIS 2 THE MEMORY-BASED BD-TREE

Concise Papers. Main Memory Indexing: The Case for BD-Tree 1 INTRODUCTION 3 COST ANALYSIS 2 THE MEMORY-BASED BD-TREE 870 IEEE TRANSACTIONS ON KNOWLEDGE AND DATA ENGINEERING, VOL. 16, NO. 7, JULY 2004 Concise Papers Main Meory Indexing: The Case for BD-Tree BinCui,BengChinOoi,Meber, IEEE, Jianwen Su, Senior Meber, IEEE,

More information

Dynamic Symbolic Execution of Distributed Concurrent Objects

Dynamic Symbolic Execution of Distributed Concurrent Objects Dynamic Symboic Execution of Distributed Concurrent Objects Andreas Griesmayer 1, Bernhard Aichernig 1,2, Einar Broch Johnsen 3, and Rudof Schatte 1,2 1 Internationa Institute for Software Technoogy, United

More information

Traversal Graphs: Characterization and Efficient Implementation

Traversal Graphs: Characterization and Efficient Implementation Traversa Graphs: Characterization and Efficient Impementation Ahmed Abdemeged Therapon Skotiniotis Panagiotis Manoios Kar Lieberherr Coege of Computer & Information Science Northeastern University, 60

More information

More Relation Model: Functional Dependencies

More Relation Model: Functional Dependencies More Reation Mode: Functiona Dependencies Lecture #7 Autumn, 2001 Fa, 2001, LRX #07 More Reation Mode: Functiona Dependencies HUST,Wuhan,China 152 Functiona Dependencies X -> A = assertion about a reation

More information

Further Optimization of the Decoding Method for Shortened Binary Cyclic Fire Code

Further Optimization of the Decoding Method for Shortened Binary Cyclic Fire Code Further Optimization of the Decoding Method for Shortened Binary Cycic Fire Code Ch. Nanda Kishore Heosoft (India) Private Limited 8-2-703, Road No-12 Banjara His, Hyderabad, INDIA Phone: +91-040-3378222

More information

Neural Network Enhancement of the Los Alamos Force Deployment Estimator

Neural Network Enhancement of the Los Alamos Force Deployment Estimator Missouri University of Science and Technoogy Schoars' Mine Eectrica and Computer Engineering Facuty Research & Creative Works Eectrica and Computer Engineering 1-1-1994 Neura Network Enhancement of the

More information

Space-Time Trade-offs.

Space-Time Trade-offs. Space-Time Trade-offs. Chethan Kamath 03.07.2017 1 Motivation An important question in the study of computation is how to best use the registers in a CPU. In most cases, the amount of registers avaiabe

More information

MosaicShape: Stochastic Region Grouping with Shape Prior

MosaicShape: Stochastic Region Grouping with Shape Prior Boston University Coputer Science Technica Report No. 2005-008, Feb. 2005. To appear in Proc. CVPR, 2005. MosaicShape: Stochastic Region Grouping with Shape Prior Jingbin Wang Erdan Gu Margrit Bete Coputer

More information

An Optimizing Compiler

An Optimizing Compiler An Optimizing Compier The big difference between interpreters and compiers is that compiers have the abiity to think about how to transate a source program into target code in the most effective way. Usuay

More information

Improving Memory Energy Using Access Pattern Classification

Improving Memory Energy Using Access Pattern Classification Iproving Meory Energy Using Access Pattern Cassification Mahut Kandeir Microsystes Design Lab Pennsyvania State University University Par, PA 16802 andeir@cse.psu.edu Ugur Sezer ECE Departent University

More information

Outline. Parallel Numerical Algorithms. Forward Substitution. Triangular Matrices. Solving Triangular Systems. Back Substitution. Parallel Algorithm

Outline. Parallel Numerical Algorithms. Forward Substitution. Triangular Matrices. Solving Triangular Systems. Back Substitution. Parallel Algorithm Outine Parae Numerica Agorithms Chapter 8 Prof. Michae T. Heath Department of Computer Science University of Iinois at Urbana-Champaign CS 554 / CSE 512 1 2 3 4 Trianguar Matrices Michae T. Heath Parae

More information

Straight-line code (or IPO: Input-Process-Output) If/else & switch. Relational Expressions. Decisions. Sections 4.1-6, , 4.

Straight-line code (or IPO: Input-Process-Output) If/else & switch. Relational Expressions. Decisions. Sections 4.1-6, , 4. If/ese & switch Unit 3 Sections 4.1-6, 4.8-12, 4.14-15 CS 1428 Spring 2018 Ji Seaman Straight-ine code (or IPO: Input-Process-Output) So far a of our programs have foowed this basic format: Input some

More information

PARALLEL database systems are essential to important

PARALLEL database systems are essential to important IEEE TRANSACTIONS ON PARALLEL AND DISTRIBUTED SYSTEMS, VOL. 13, NO. 12, DECEMBER 2002 1211 Load Baanced and Optia Disk Aocation Strategy for Partia Match Queries on Mutidiensiona Fies Saja K. Das, Meber,

More information

1682 IEEE TRANSACTIONS ON FUZZY SYSTEMS, VOL. 22, NO. 6, DECEMBER Backward Fuzzy Rule Interpolation

1682 IEEE TRANSACTIONS ON FUZZY SYSTEMS, VOL. 22, NO. 6, DECEMBER Backward Fuzzy Rule Interpolation 1682 IEEE TRANSACTIONS ON FUZZY SYSTEMS, VOL. 22, NO. 6, DECEMBER 2014 Bacward Fuzzy Rue Interpoation Shangzhu Jin, Ren Diao, Chai Que, Senior Member, IEEE, and Qiang Shen Abstract Fuzzy rue interpoation

More information

Lecture outline Graphics and Interaction Scan Converting Polygons and Lines. Inside or outside a polygon? Scan conversion.

Lecture outline Graphics and Interaction Scan Converting Polygons and Lines. Inside or outside a polygon? Scan conversion. Lecture outine 433-324 Graphics and Interaction Scan Converting Poygons and Lines Department of Computer Science and Software Engineering The Introduction Scan conversion Scan-ine agorithm Edge coherence

More information

Mobile App Recommendation: Maximize the Total App Downloads

Mobile App Recommendation: Maximize the Total App Downloads Mobie App Recommendation: Maximize the Tota App Downoads Zhuohua Chen Schoo of Economics and Management Tsinghua University chenzhh3.12@sem.tsinghua.edu.cn Yinghui (Catherine) Yang Graduate Schoo of Management

More information

RDF Objects 1. Alex Barnell Information Infrastructure Laboratory HP Laboratories Bristol HPL November 27 th, 2002*

RDF Objects 1. Alex Barnell Information Infrastructure Laboratory HP Laboratories Bristol HPL November 27 th, 2002* RDF Objects 1 Aex Barne Information Infrastructure Laboratory HP Laboratories Bristo HPL-2002-315 November 27 th, 2002* E-mai: Andy_Seaborne@hp.hp.com RDF, semantic web, ontoogy, object-oriented datastructures

More information

and its spectrum 1. Notation and preliminaries ~~~(AI-A(G)) of A(G) by G{\), and refer to

and its spectrum 1. Notation and preliminaries ~~~(AI-A(G)) of A(G) by G{\), and refer to BULL. AUSTRAL. MATH. SOC. VOL. 18 (1978), 21-28. A new graph product and its spectrum C.D. Godsi and B.D. McKay A new graph product is introduced, and the characteristic poynomia of a graph so-formed is

More information

Quality of Service Evaluations of Multicast Streaming Protocols *

Quality of Service Evaluations of Multicast Streaming Protocols * Quaity of Service Evauations of Muticast Streaming Protocos Haonan Tan Derek L. Eager Mary. Vernon Hongfei Guo omputer Sciences Department University of Wisconsin-Madison, USA {haonan, vernon, guo}@cs.wisc.edu

More information

A Method for Calculating Term Similarity on Large Document Collections

A Method for Calculating Term Similarity on Large Document Collections $ A Method for Cacuating Term Simiarity on Large Document Coections Wofgang W Bein Schoo of Computer Science University of Nevada Las Vegas, NV 915-019 bein@csunvedu Jeffrey S Coombs and Kazem Taghva Information

More information

INTEGRATION OF A TERRESTRIAL LASER SCANNER WITH GPS/IMU ORIENTATION SENSORS

INTEGRATION OF A TERRESTRIAL LASER SCANNER WITH GPS/IMU ORIENTATION SENSORS INTEGRATION OF A TERRESTRIAL LASER SCANNER WITH GPS/IMU ORIENTATION SENSORS J.Taaya, R.Aaus, E.Bosch, A.Serra, W.Kornus, A.Baron Institut Cartogràfic de Cataunya (ICC), Parc de Montjuïc, E-08038 Barceona

More information

Gromov-Hausdorff Distance Between Metric Graphs

Gromov-Hausdorff Distance Between Metric Graphs Groov-Hausdorff Distance Between Metric Graphs Jiwon Choi St Mark s School January, 019 Abstract In this paper we study the Groov-Hausdorff distance between two etric graphs We copute the precise value

More information

MCSE Training Guide: Windows Architecture and Memory

MCSE Training Guide: Windows Architecture and Memory MCSE Training Guide: Windows 95 -- Ch 2 -- Architecture and Memory Page 1 of 13 MCSE Training Guide: Windows 95-2 - Architecture and Memory This chapter wi hep you prepare for the exam by covering the

More information

An Exponential Time 2-Approximation Algorithm for Bandwidth

An Exponential Time 2-Approximation Algorithm for Bandwidth An Exponentia Time 2-Approximation Agorithm for Bandwidth Martin Fürer 1, Serge Gaspers 2, Shiva Prasad Kasiviswanathan 3 1 Computer Science and Engineering, Pennsyvania State University, furer@cse.psu.edu

More information

Extended Node-Arc Formulation for the K-Edge-Disjoint Hop-Constrained Network Design Problem

Extended Node-Arc Formulation for the K-Edge-Disjoint Hop-Constrained Network Design Problem Extended Node-Arc Formuation for the K-Edge-Disjoint Hop-Constrained Network Design Probem Quentin Botton Université cathoique de Louvain, Louvain Schoo of Management, (Begique) botton@poms.uc.ac.be Bernard

More information

Privacy Preserving Subgraph Matching on Large Graphs in Cloud

Privacy Preserving Subgraph Matching on Large Graphs in Cloud Privacy Preserving Subgraph Matching on Large Graphs in Coud Zhao Chang,#, Lei Zou, Feifei Li # Peing University, China; # University of Utah, USA; {changzhao,zouei}@pu.edu.cn; {zchang,ifeifei}@cs.utah.edu

More information

THE PERCENTAGE OCCUPANCY HIT OR MISS TRANSFORM

THE PERCENTAGE OCCUPANCY HIT OR MISS TRANSFORM 17th European Signa Processing Conference (EUSIPCO 2009) Gasgow, Scotand, August 24-28, 2009 THE PERCENTAGE OCCUPANCY HIT OR MISS TRANSFORM P. Murray 1, S. Marsha 1, and E.Buinger 2 1 Dept. of Eectronic

More information

Functions. 6.1 Modular Programming. 6.2 Defining and Calling Functions. Gaddis: 6.1-5,7-10,13,15-16 and 7.7

Functions. 6.1 Modular Programming. 6.2 Defining and Calling Functions. Gaddis: 6.1-5,7-10,13,15-16 and 7.7 Functions Unit 6 Gaddis: 6.1-5,7-10,13,15-16 and 7.7 CS 1428 Spring 2018 Ji Seaman 6.1 Moduar Programming Moduar programming: breaking a program up into smaer, manageabe components (modues) Function: a

More information

AN EVOLUTIONARY APPROACH TO OPTIMIZATION OF A LAYOUT CHART

AN EVOLUTIONARY APPROACH TO OPTIMIZATION OF A LAYOUT CHART 13 AN EVOLUTIONARY APPROACH TO OPTIMIZATION OF A LAYOUT CHART Eva Vona University of Ostrava, 30th dubna st. 22, Ostrava, Czech Repubic e-mai: Eva.Vona@osu.cz Abstract: This artice presents the use of

More information

Arithmetic Coding. Prof. Ja-Ling Wu. Department of Computer Science and Information Engineering National Taiwan University

Arithmetic Coding. Prof. Ja-Ling Wu. Department of Computer Science and Information Engineering National Taiwan University Arithmetic Coding Prof. Ja-Ling Wu Department of Computer Science and Information Engineering Nationa Taiwan University F(X) Shannon-Fano-Eias Coding W..o.g. we can take X={,,,m}. Assume p()>0 for a. The

More information

A METHOD FOR GRIDLESS ROUTING OF PRINTED CIRCUIT BOARDS. A. C. Finch, K. J. Mackenzie, G. J. Balsdon, G. Symonds

A METHOD FOR GRIDLESS ROUTING OF PRINTED CIRCUIT BOARDS. A. C. Finch, K. J. Mackenzie, G. J. Balsdon, G. Symonds A METHOD FOR GRIDLESS ROUTING OF PRINTED CIRCUIT BOARDS A C Finch K J Mackenzie G J Basdon G Symonds Raca-Redac Ltd Newtown Tewkesbury Gos Engand ABSTRACT The introduction of fine-ine technoogies to printed

More information

Load Balancing by MPLS in Differentiated Services Networks

Load Balancing by MPLS in Differentiated Services Networks Load Baancing by MPLS in Differentiated Services Networks Riikka Susitaiva, Jorma Virtamo, and Samui Aato Networking Laboratory, Hesinki University of Technoogy P.O.Box 3000, FIN-02015 HUT, Finand {riikka.susitaiva,

More information

l Tree: set of nodes and directed edges l Parent: source node of directed edge l Child: terminal node of directed edge

l Tree: set of nodes and directed edges l Parent: source node of directed edge l Child: terminal node of directed edge Trees & Heaps Week 12 Gaddis: 20 Weiss: 21.1-3 CS 5301 Fa 2016 Ji Seaman 1 Tree: non-recursive definition Tree: set of nodes and directed edges - root: one node is distinguished as the root - Every node

More information

Resource Optimization to Provision a Virtual Private Network Using the Hose Model

Resource Optimization to Provision a Virtual Private Network Using the Hose Model Resource Optimization to Provision a Virtua Private Network Using the Hose Mode Monia Ghobadi, Sudhakar Ganti, Ghoamai C. Shoja University of Victoria, Victoria C, Canada V8W 3P6 e-mai: {monia, sganti,

More information

Navigating and searching theweb

Navigating and searching theweb Navigating and searching theweb Contents Introduction 3 1 The Word Wide Web 3 2 Navigating the web 4 3 Hyperinks 5 4 Searching the web 7 5 Improving your searches 8 6 Activities 9 6.1 Navigating the web

More information

index.pdf March 17,

index.pdf March 17, index.pdf March 17, 2013 1 ITI 1121. Introduction to omputing II Marce Turcotte Schoo of Eectrica Engineering and omputer Science Linked List (Part 2) Tai pointer ouby inked ist ummy node Version of March

More information

The optimization design of microphone array layout for wideband noise sources

The optimization design of microphone array layout for wideband noise sources PROCEEDINGS of the 22 nd International Congress on Acoustics Acoustic Array Systes: Paper ICA2016-903 The optiization design of icrophone array layout for wideband noise sources Pengxiao Teng (a), Jun

More information

Area Efficient Implementation of Elliptic Curve Point Multiplication Algorithm

Area Efficient Implementation of Elliptic Curve Point Multiplication Algorithm (IJACSA) Internationa Journa of Advanced Coputer Science and Appications, Vo. 6, No., 5 Area Efficient Ipeentation of Eiptic Curve Point Mutipication Agorith Suni Devidas Bobade Research Schoar S.G.B.Aravati

More information

May 13, Mark Lutz Boulder, Colorado (303) [work] (303) [home]

May 13, Mark Lutz Boulder, Colorado (303) [work] (303) [home] "Using Python": a Book Preview May 13, 1995 Mark Lutz Bouder, Coorado utz@kapre.com (303) 546-8848 [work] (303) 684-9565 [home] Introduction. This paper is a brief overview of the upcoming Python O'Reiy

More information

A Memory Grouping Method for Sharing Memory BIST Logic

A Memory Grouping Method for Sharing Memory BIST Logic A Memory Grouping Method for Sharing Memory BIST Logic Masahide Miyazai, Tomoazu Yoneda, and Hideo Fuiwara Graduate Schoo of Information Science, Nara Institute of Science and Technoogy (NAIST), 8916-5

More information

Computer Networks. College of Computing. Copyleft 2003~2018

Computer Networks. College of Computing.   Copyleft 2003~2018 Computer Networks Computer Networks Prof. Lin Weiguo Coege of Computing Copyeft 2003~2018 inwei@cuc.edu.cn http://icourse.cuc.edu.cn/computernetworks/ http://tc.cuc.edu.cn Attention The materias beow are

More information

M. Badent 1, E. Di Giacomo 2, G. Liotta 2

M. Badent 1, E. Di Giacomo 2, G. Liotta 2 DIEI Dipartimento di Ingegneria Eettronica e de informazione RT 005-06 Drawing Coored Graphs on Coored Points M. Badent 1, E. Di Giacomo 2, G. Liotta 2 1 University of Konstanz 2 Università di Perugia

More information

Special Edition Using Microsoft Office Sharing Documents Within a Workgroup

Special Edition Using Microsoft Office Sharing Documents Within a Workgroup Specia Edition Using Microsoft Office 2000 - Chapter 7 - Sharing Documents Within a.. Page 1 of 8 [Figures are not incuded in this sampe chapter] Specia Edition Using Microsoft Office 2000-7 - Sharing

More information

Real-Time Image Generation with Simultaneous Video Memory Read/Write Access and Fast Physical Addressing

Real-Time Image Generation with Simultaneous Video Memory Read/Write Access and Fast Physical Addressing Rea-Time Image Generation with Simutaneous Video Memory Read/rite Access and Fast Physica Addressing Mountassar Maamoun 1, Bouaem Laichi 2, Abdehaim Benbekacem 3, Daoud Berkani 4 1 Department of Eectronic,

More information

Priority Queueing for Packets with Two Characteristics

Priority Queueing for Packets with Two Characteristics 1 Priority Queueing for Packets with Two Characteristics Pave Chuprikov, Sergey I. Nikoenko, Aex Davydow, Kiri Kogan Abstract Modern network eements are increasingy required to dea with heterogeneous traffic.

More information

Register Allocation. Consider the following assignment statement: x = (a*b)+((c*d)+(e*f)); In posfix notation: ab*cd*ef*++x

Register Allocation. Consider the following assignment statement: x = (a*b)+((c*d)+(e*f)); In posfix notation: ab*cd*ef*++x Register Aocation Consider the foowing assignment statement: x = (a*b)+((c*d)+(e*f)); In posfix notation: ab*cd*ef*++x Assume that two registers are avaiabe. Starting from the eft a compier woud generate

More information

A New Supervised Clustering Algorithm Based on Min-Max Modular Network with Gaussian-Zero-Crossing Functions

A New Supervised Clustering Algorithm Based on Min-Max Modular Network with Gaussian-Zero-Crossing Functions 2006 Internationa Joint Conference on Neura Networks Sheraton Vancouver Wa Centre Hote, Vancouver, BC, Canada Juy 16-21, 2006 A New Supervised Custering Agorithm Based on Min-Max Moduar Network with Gaussian-Zero-Crossing

More information

Advances in Crystallographic Image Processing for Scanning Probe Microscopy

Advances in Crystallographic Image Processing for Scanning Probe Microscopy Advances in Crystaographic Iage Processing for Scanning Probe Microscopy P. Moeck Nano-Crystaography Group, Departent of Physics, Portand State University, 1719 SW 10 th Avenue (SRTC), Portand, OR 97201,

More information

Windows NT, Terminal Server and Citrix MetaFrame Terminal Server Architecture

Windows NT, Terminal Server and Citrix MetaFrame Terminal Server Architecture Windows NT, Termina Server and Citrix MetaFrame - CH 3 - Termina Server Architect.. Page 1 of 13 [Figures are not incuded in this sampe chapter] Windows NT, Termina Server and Citrix MetaFrame - 3 - Termina

More information

Distance Weighted Discrimination and Second Order Cone Programming

Distance Weighted Discrimination and Second Order Cone Programming Distance Weighted Discrimination and Second Order Cone Programming Hanwen Huang, Xiaosun Lu, Yufeng Liu, J. S. Marron, Perry Haaand Apri 3, 2012 1 Introduction This vignette demonstrates the utiity and

More information

A Fast Block Matching Algorithm Based on the Winner-Update Strategy

A Fast Block Matching Algorithm Based on the Winner-Update Strategy In Proceedings of the Fourth Asian Conference on Computer Vision, Taipei, Taiwan, Jan. 000, Voume, pages 977 98 A Fast Bock Matching Agorithm Based on the Winner-Update Strategy Yong-Sheng Chenyz Yi-Ping

More information

Layout Conscious Approach and Bus Architecture Synthesis for Hardware-Software Co-Design of Systems on Chip Optimized for Speed

Layout Conscious Approach and Bus Architecture Synthesis for Hardware-Software Co-Design of Systems on Chip Optimized for Speed Layout Conscious Approach and Bus Architecture Synthesis for Hardware-Software Co-Design of Systems on Chip Optimized for Speed Nattawut Thepayasuwan, Member, IEEE and Aex Doboi, Member, IEEE Abstract

More information

Endoscopic Motion Compensation of High Speed Videoendoscopy

Endoscopic Motion Compensation of High Speed Videoendoscopy Endoscopic Motion Compensation of High Speed Videoendoscopy Bharath avuri Department of Computer Science and Engineering, University of South Caroina, Coumbia, SC - 901. ravuri@cse.sc.edu Abstract. High

More information

Coupled Oscillators. Description. Easy Java Simulations step-by-step series of examples

Coupled Oscillators. Description. Easy Java Simulations step-by-step series of examples Easy Java Siuations step-by-step series of eapes Coupe Osciators page of 8 Coupe Osciators Description We siuate the otion of two partice asses connecte by three springs. One spring connects the two asses

More information

Authorization of a QoS Path based on Generic AAA. Leon Gommans, Cees de Laat, Bas van Oudenaarde, Arie Taal

Authorization of a QoS Path based on Generic AAA. Leon Gommans, Cees de Laat, Bas van Oudenaarde, Arie Taal Abstract Authorization of a QoS Path based on Generic Leon Gommans, Cees de Laat, Bas van Oudenaarde, Arie Taa Advanced Internet Research Group, Department of Computer Science, University of Amsterdam.

More information

Lecture Notes for Chapter 4 Part III. Introduction to Data Mining

Lecture Notes for Chapter 4 Part III. Introduction to Data Mining Data Mining Cassification: Basic Concepts, Decision Trees, and Mode Evauation Lecture Notes for Chapter 4 Part III Introduction to Data Mining by Tan, Steinbach, Kumar Adapted by Qiang Yang (2010) Tan,Steinbach,

More information

Fastest-Path Computation

Fastest-Path Computation Fastest-Path Computation DONGHUI ZHANG Coege of Computer & Information Science Northeastern University Synonyms fastest route; driving direction Definition In the United states, ony 9.% of the househods

More information

Lecture 3. Jamshaid Yousaf Department of Computer Sciences Cristian college of Business, Arts and Technology Gujranwala.

Lecture 3. Jamshaid Yousaf Department of Computer Sciences Cristian college of Business, Arts and Technology Gujranwala. Lecture 3 Jamshaid Yousaf jamshaid.yousaf@ccbat.com.pk Department of Computer Sciences Cristian coege of Business, Arts and Technoogy Gujranwaa. Overview Importance of text in a mutimedia presentation.

More information

Chapter 3: Introduction to the Flash Workspace

Chapter 3: Introduction to the Flash Workspace Chapter 3: Introduction to the Fash Workspace Page 1 of 10 Chapter 3: Introduction to the Fash Workspace In This Chapter Features and Functionaity of the Timeine Features and Functionaity of the Stage

More information

METAMORPHOSIS OF PERIODIC SURFACE MODELS

METAMORPHOSIS OF PERIODIC SURFACE MODELS Proceedings of ASE 2009 Internationa Design Engineering echnica Conferences & Coputers and Inforation in Engineering Conference IDEC/CIE 2009 August 0 Septeber 2, 2009, San Diego, Caifornia, USA DEC2009/DAC-870

More information

Binarized support vector machines

Binarized support vector machines Universidad Caros III de Madrid Repositorio instituciona e-archivo Departamento de Estadística http://e-archivo.uc3m.es DES - Working Papers. Statistics and Econometrics. WS 2007-11 Binarized support vector

More information

Sect 8.1 Lines and Angles

Sect 8.1 Lines and Angles 7 Sect 8. Lines and nges Objective a: asic efinitions. efinition Iustration Notation point is a ocation in space. It is indicated by aking a dot. Points are typicay abeed with capita etters next to the

More information

Section 3: Exploring 3D shapes

Section 3: Exploring 3D shapes Section 3: Exporing 3D shapes Contents Section 3: Exporing 3D shapes 3 1. Using practica work 3 2. A cross-curricuar approach 5 3. Using practica work to consoidate earning 6 Resource 1: Coecting and making

More information

DISTANCE TRANSFORMATION FOR NETWORK DESIGN PROBLEMS

DISTANCE TRANSFORMATION FOR NETWORK DESIGN PROBLEMS DISTANCE TRANSFORMATION FOR NETWORK DESIGN PROBLEMS A Ridha Mahjoub, Michae Poss, Luidi Simonetti, Eduardo Uchoa To cite this version: A Ridha Mahjoub, Michae Poss, Luidi Simonetti, Eduardo Uchoa. DISTANCE

More information

Bottom-Up Parsing LR(1)

Bottom-Up Parsing LR(1) Bottom-Up Parsing LR(1) Previousy we have studied top-down or LL(1) parsing. The idea here was to start with the start symbo and keep expanding it unti the whoe input was read and matched. In bottom-up

More information

The Internal Conflict of a Belief Function

The Internal Conflict of a Belief Function The Internal Conflict of a Belief Function Johan Schubert Abstract In this paper we define and derive an internal conflict of a belief function We decopose the belief function in question into a set of

More information

Telephony Trainers with Discovery Software

Telephony Trainers with Discovery Software Teephony Trainers 58 Series Teephony Trainers with Discovery Software 58-001 Teephony Training System 58-002 Digita Switching System 58-003 Digita Teephony Training System 58-004 Digita Trunk Network System

More information

The University of British Columbia

The University of British Columbia The Univesity of Bitish Coubia Copute Science 304 Midte Exaination Febuay 5, 2007 Tie: 50 inutes Tota aks: 38 Instucto: Rache Pottinge Nae ANSWER KEY (PRINT) (Last) (Fist) Signatue This exaination has

More information

NCH Software Express Delegate

NCH Software Express Delegate NCH Software Express Deegate This user guide has been created for use with Express Deegate Version 4.xx NCH Software Technica Support If you have difficuties using Express Deegate pease read the appicabe

More information

Mapping Data in Peer-to-Peer Systems: Semantics and Algorithmic Issues

Mapping Data in Peer-to-Peer Systems: Semantics and Algorithmic Issues Mapping Data in Peer-to-Peer Systes: Seantics and Algorithic Issues Anastasios Keentsietsidis Marcelo Arenas Renée J. Miller Departent of Coputer Science University of Toronto {tasos,arenas,iller}@cs.toronto.edu

More information

Delay Budget Partitioning to Maximize Network Resource Usage Efficiency

Delay Budget Partitioning to Maximize Network Resource Usage Efficiency Deay Budget Partitioning to Maximize Network Resource Usage Efficiency Kartik Gopaan Tzi-cker Chiueh Yow-Jian Lin Forida State University Stony Brook University Tecordia Technoogies kartik@cs.fsu.edu chiueh@cs.sunysb.edu

More information