Aachen. Syntax-Directed Derivative Code (Part I: Tangent-Linear Code) Department of Computer Science. Technical Report.

Size: px
Start display at page:

Download "Aachen. Syntax-Directed Derivative Code (Part I: Tangent-Linear Code) Department of Computer Science. Technical Report."

Transcription

1 Aachen Department of Computer Science Technical Report Syntax-Directed Derivative Code (Part I: Tangent-Linear Code) Uwe Naumann ISSN Aachener Informatik Berichte AIB RWTH Aachen Department of Computer Science August 2005

2 The publications of the Department of Computer Science of RWTH Aachen University are in general accessible through the World Wide Web.

3 Syntax-Directed Derivative Code (Part I: Tangent-Linear Code) Uwe Naumann LuFG Software and Tools for Computational Engineering, Department of Computer Science RWTH Aachen University, D Aachen Germany WWW: Abstract. This is the first instance in a series of papers on single-pass generation of various types of derivative code by syntax-directed translation. We consider the automatic generation of tangent-linear code by forward mode automatic differentiation implemented as the bottom-up propagation of synthesized attributes on the abstract syntax tree. A proof-of-concept implementation is presented based on a simple LALR(1) parser generated by the parser generator bison. The proposed technique can be generalized easily to provide a method for computing directional derivatives of mathematical vector functions that are implemented as computer programs in the context of computer algebra systems and compilers for scientific computing. The main advantage of the syntax-directed approach to automatic differentiation is its elegance in terms of the implementation. 1 Motivation and Summary of Results This paper presents a method for generating tangent-linear versions of numerical simulation programs 1 that implement vector functions F : IR n IR m, y = F (x), x = (x k ) k=1,...,n, y = (y l ) l=1,...,m, (1) automatically by syntax-directed translation. Such tangent-linear programs F = F (x, ẋ) compute directional derivatives ẏ, that is, products of the Jacobian matrix ( ) l=1,...,m F = (f l,k )l=1,...,m k=1,...,n yl IR m n (2) x k k=1,...,n with a direction ẋ in the input space IR n. Formally, ẏ = F (x, ẋ) F ẋ. (3) To motivate the need for tangent-linear codes we consider a system of nonlinear equations F (x) = 0, F : IR n IR n. (4) Given a good start estimate x 0, the system can be solved by Newton s method with quadratic convergence as follows: δx i = (F (x i )) 1 F (x i ) x i+1 = x i + δx i for increasing integer values i. At each step the algorithm requires the Jacobian F of F at the current estimate x i. Finite difference quotients can be used to 1 Without loss of generality, we focus on a subset of C.

4 approximate the entries of the Jacobian at the cost of n + 1 and 2n function evaluations when using forward (or backward) and centered differences, respectively. However, it is well-known that step size control is a problem as illustrated in Figure 1 and discussed, for example, in [13]. To avoid these problems, the tangent-linear program can be run with ẋ ranging over the Cartesian basis vectors in IR n to obtain F at roughly the same cost as that of (centered) finite differences but with machine accuracy. 1.6e-05 "abs(tl-fd).data" "abs(tl-100*cos(100*x)).data" 1.4e e-05 1e-05 8e-06 6e-06 4e-06 2e e-09 2e-09 3e-09 4e-09 5e-09 6e-09 7e-09 8e-09 9e-09 1e-08 Fig. 1. Problems with finite differences: We show the absolute error of finite difference approximation of y for y = sin(100 x) at x = 0.5 and h x (10 10, 10 8 ) (marked with + symbols). The values computed by the tangent-linear code are identical with those of the hand-coded derivative (correct up to machine accuracy) y = 100 cos(100 x). The points mark the x vanishing absolute error for this case. Choosing a matrix-free approach, the Newton step can be obtained as the solution of the linear system F (x i )δx i = F (x i ) (5) at each Newton iteration i. Direct methods may be prohibitive due to the potentially large size of the problem. Iterative methods are likely to be more suitable. For example, iterative refinement computes the iterates as δx i+1 = δx i + B(F (x i ) F (x i ) δx i ) (6) for a suitable preconditioner B, such as an approximate inverse of F (x i ). Note that Equation (6), as well as matrix-free Krylov methods such as GMRES, involves the computation of the product of the Jacobian with a vector. A (forward) finite difference approximation of the Jacobian vector product in Equation (3) can be computed by perturbing the scalar input of the modified function F : IR IR m, ỹ = F (s) F ((s 1) ẋ + x) (7) 4

5 at s = 1. 2 Hence, we compute y = F (x) and y = F (h ẋ + x) to get ẏ y y h. There is no need to form the whole Jacobian explicitly. Additional scaling in dependence of the value of a norm of ẋ may be required to avoid numerical instabilities as pointed out, for example, in [14]. Moreover, the usual problems with finite differences may occur. Tangent-linear codes should be used in order to circumvent both problems. The structure of this paper is as follows. In Section 2 we summarize the theoretical concepts behind forward mode automatic differentiation in the context of tangent-linear code generation by source transformation. The syntax-directed translation algorithm for straight-line programs is introduced in Section 3 the heart of this paper. Generalizations for subroutines with intraprocedural flow of control and programs with interprocedural flow of control are discussed. A simple proof-of-concept implementation is presented in Section 4, making detailed references to the source code that is appended in Section A. We draw conclusions in Section 5 and give an outlook to part II of this paper which deals with the syntax-directed generation of adjoint code. 2 Fundamentals For a given implementation of a vector function as defined in Equation (1) as a computer program 3 we use automatic differentiation (AD) [17], [9] 4 by source transformation to generate code for computing directional first derivatives of F. Therefore the computation of y = F (x) is expected to decompose into a sequence of elemental assignments v j = ϕ j (v i ) i j (8) for j = 1,..., p+m, and i j if and only if v i is an argument of ϕ j. Equation (8) is also referred to as the code list of F. We set v i n = x i for i = 1,..., n and v p+j = y j for j = 1,..., m. The v k, k = 1 n,..., p + m, are called code list variables. Forward mode AD transforms F into the tangent-linear model F that computes a total (or directional) derivative as defined in Equation (3). The m n Jacobian of F is defined in Equation (2). The transformation of the program semantics is achieved by applying well-known differentiation rules to the elemental functions 2 The basic idea is the following: We need ϕ j {+,,, /, sin, exp,...} 5 x i s = ẋi for i = 1,..., n. Therefore, we set x = ẋ s + x to determine suitable values for x. For s = 1 the right-hand side of x x ẋ can be substituted in F (x) to get Equation (7). 3 From now on we will use F to refer to this implementation as a computer program. 4 We follow the notation therein as closely as possible. 5 We consider a subset of the arithmetic operators and intrinsic functions provided by most programming languages. 5

6 followed by the exploitation of the chain rule as v j = i j c ji v i (9) for j = 1,..., p + m and total derivatives v k of the code list variables v k, k = 1 n,..., p + m. The elemental functions ϕ j are assumed to be continuously differentiable in a neighborhood of the current argument. The corresponding local partial derivatives are denoted by c ji = ϕ j v i for j = 1,..., p + m, i j, where the independent variables v i n = x i, i = 1,..., n, are assumed to be mutually independent. The basic approach dates back to [19]. Since then, AD has been used in the context of a large number of projects in computational science and engineering providing fast and accurate derivative information for a wide variety of highly relevant applications. Many of them are documented in the proceedings of the four international conferences [7], [2], [6], and [5]. Source transformation tools for AD (see, for example, ADIFOR [3], ADIC [4], the differentiation-enabled NAGWare Fortran 95 compiler [16], TAPENADE [12], TAF [8], and OpenAD [20]) that provide a basic forward mode generate tangent-linear code as an augmentation of the code list by statements for computing directional derivatives as illustrated by the following example which shows the tangent-linear code of y = sin(x 2). v 1 = ẋ v 1 = x v 2 = 0 v 2 = 2 v 3 = v 1 v 2 + v 1 v 2 v 3 = v 1 v 2 v 4 = cos(v 3 ) v 3 v 4 = sin(v 3 ) ẏ = v 4 y = v 4. Less trivial examples follow after explaining the syntax-directed approach to the generation of tangent-linear code in the following section. 3 Syntax-Directed Tangent-Linear Codes The main conceptual issues of the syntax-directed construction of tangent-linear codes can be discussed in the context of simple sequences of scalar assignments as defined in Definition 1. The presence of control-flow structures both intra- (loops, branches, or arbitrary jumps in the form of goto statements) and interprocedural (subroutine calls and calls of user-defined functions) adds little to the algorithmic details behind the proposed method as explained in Section 3.4 and in Section 3.5. Definition 1. A straight-line program (SLP) is a sequence of scalar assignments described by the context-free grammar G = (N, T, P, s) with nonterminal symbols N = { } s (straight-line program) a (assignment) e (expression) 6

7 terminal symbols V (program variables; see line 16 in Section A.2, Listing 1.5) C (constants; line 21) T = F (unary intrinsic; line 15) O (binary operator; line 27), ; ) ( (remaining single character tokens; line 27) start symbol s, and production rules (P 1) s :: a (see line 32 in Section A.3, Listing 1.6) (P 2) s :: as (line 36) (P 3) a :: V = e; (line 68) P = (P 4) e :: V (line 102) (P 5) e :: C (line 109) (P 6) e :: F (e) (line 94) (P 7) e :: eoe (line 76 and line 85) a::v.=e; V 4 a s::.a.as a::.v=e; a s::a.s s::.a.as a::.v=e; 0 2 a s a s::a. s::as. 1 3 e::f(e). 16 = 15 ) 5 a::v=.e; e::.v.c.eoe.f(e) F e::f.(e) 10 F e::f(e.) e V e ( V 12 e::f(.e) e::.v.c.eoe.f(e) e a::v=e.; ; 6 C e::v. 8 C e e::e.oe 11 O e:eoe. 14 a::v=e;. 7 e::c. 9 V C 13 e::eo.e e::.v.c.eoe.f(e) e Fig. 2. Characteristic finite automaton of SLPs References to the source code of a simple proof-of-concept implementation (see also Section 4) are given for terminal symbols (references into the grammar configuration file of the lexical analyzer) and production rules (references into the grammar configuration file of the syntax analyzer). 7

8 By considering unary intrinsics and binary arithmetic operators we cover a large fraction of the elemental functions provided by modern programming languages. A generalization to include other potentially relevant cases such as unary operators or intrinsics that take more than one argument complicates the grammar and thus the parsing procedure while not adding anything conceptual to the approach of generating tangent-linear code by syntax-directed translation. Hence we decided to limit the amount of syntax to a minimum that allows us to introduce the theoretical idea behind syntax-directed compilation of tangent-linear code and to verify the numerical correctness of the generated code. The latter is done by comparing the values of the directional derivatives with approximations obtained by finite difference quotients as described in Section 4. Programs come as sequences of ASCII characters that need to be transformed into a structured form to allow for semantic transformation according to welldefined syntactic rules. A lexical analyzer is used to partition the input code into a sequence of tokens that correspond to terminal symbols in Definition 1. The correctness of the input in form of the token stream is verified by a shift-reduce parser. See [1] for the technical details. We use an LALR(1)-parsing algorithm based on a push-down automaton (PDA) A = (α, σ) that consists of a characteristic finite automaton (CFA) α and a shift-reduce stack (SRS) σ to store states of α. The CFA α = (V α, E α ) of an SLP is defined as follows 0 = [a as V = e; ] 1 = [P1] 2 = [s a as V = e; ] 3 = [P2] 4 = [= e; ] 5 = [e; V C F (e) eoe] 6 = [; ] 7 = [P3] 8 = [P4] V α = 9 = [P5] 10 = [(e)] 11 = [Oe] 12 = [e) V C F (e) eoe] 13 = [e V C F (e) eoe] 14 = [P6] 15 = [)] 16 = [P7] (0,1)[a], (0, 2)[a], (0, 4)[V ] (2,1)[a], (2, 2)[a], (2, 3)[s] (4,5)[=] (5,6)[e], (5, 8)[V ], (5, 9)[C], (5, 10)[F ], (5, 10)[e] (6,7)[; ] E α = (10,12)[(] (11,13)[O] (12,8)[V ], (12, 9)[C], (12, 10)[F ], (12, 11)[e], (12, 15)[e] (13,8)[V ], (13, 9)[C], (13, 10)[F ], (13, 11)[e], (13, 14)[e] (15,16)[)] (10) (11) The symbol is used to separate alternative parts of right-hand sides of the production rules that are associated with the CFA vertices. The CFA is nondeterministic. A graphical representation is given in Figure 2. A lookahead of one on the input token stream is required to make it deterministic. The lookahead is realized by the function λ λ(f, i) T that returns for the given position i in an SLP the next token. 8

9 3.1 Example We use the PDA to construct the abstract syntax tree (AST) A = (V, E) of the assignment y = sin(x 2); which is transformed by the lexical analyzer into the token stream V = F (V OC);. A representation of the parse table is shown in Table 1. The AST A can be σ i V α Read Action λ Line 1 0 V S V = S ,4 5 V = F S ,4,5 10 V = F ( S ,4,5,10 12 V = F (V S ,4,5,10,12 8 R(P 4) ,4,5,10 12 V=F(e S O ,4,5,10,12 11 V=F(eO S ,4,5,10,12,11 13 V=F(eOC S ,4,5,10,12,11,13 9 R(P 5) ,4,5,10,12,11 13 V=F(eOe S ) ,4,5,10,12,11,13 14 R(P 7) ,4,5,10 12 V=F(e S ) ,4,5,10,12 15 V=F(e) S ,4,5,10,12,15 16 R(P 6) ,4 5 V=e S ; ,4,5 6 V=e; S ,4,5,6 7 R(P 3) a S R(P 1) s 23 Table 1. Extended Parse Table: A total of 21 shift (S in Action column) or reduce (R in Action column together with the production rule that is matched) operations are performed. We show the contents of the stack σ, the current state i in the characteristic finite automaton, the string read so far, the lookahead token λ, and the corresponding line number in the parser configuration file in Section A.3, Listing 1.6. In row 19 we get empty lookahead as a result of the sequence of assignments containing only a single element. extracted by applying the reduce operations in reverse order. It is shown in Figure Code List The first step of the compilation of tangent-linear code is to break complex right-hand sides of assignments down to elemental assignments by constructing statement-level code lists. Initializing j = ν = 1 we extend the production rules by custom reduce actions as shown in Figure 4. We use the increment operator j++ as defined in the C standard. Otherwise, the addition + serves as a string concatenation operator. All actions performed are purely symbolic in the sense that they derive new strings from given ones according to well-defined rules stated in Section 2. The attribute a that is associated with all vertices in the AST is synthesized via concatenation of strings during the bottom-up parsing. 9

10 s (6) a (5) V ( y ) = e (4) F ( sin ) ( e (3) e (1) V ( x ) O( ) e (2) C( 2 ) ) Fig. 3. AST of V = F (V OC);. 8 (P 1) v ν.a = v ν 1.a 9 ν++ (P 2) v ν.a = v µ1.a + v µ2.a where v µ1 ˆ=a and v µ2 ˆ=s in as ν++ (P 3) v ν.a = v ν 1.a + V.a + = + v [vν 1.j] + ; c = 1; ν++ (P 4) v ν.a = v [c] + = + V.a + ; v ν.j = c++ ν++ >< (P 5) v ν.a = v [c] + = + C.a + ; P cl = v ν.j = c++ ν++ (P 6) v ν.a = v ν 1.a + v [c] + = + F.a + ( + v [vν 1.j] + ); v ν.j = c++ ν++ (P 7) v ν.a = v µ1.a + v µ2.a + v [c] + = + v [vµ1.j] + O.a + v [vµ2.j] + ; where v µ1 ˆ=e 1 and v µ2 ˆ=e 2 in e 1 Oe 2 v ν.j = c++ >: ν++ Fig. 4. Production rules for syntax-directed compilation of assignment-level code lists for SLPs. We use the notation ˆ= in the sense of corresponds to, that is for example, v µ1 is the vertex in the AST that corresponds to the first non-terminal on the right-hand side of rule (P2). >= >; 10

11 It contains the code list of the previously parsed part of the code, respectively. The second attribute j is used to store the index of the corresponding code list variable inside of expressions on the right-hand side of assignments. Expressions in square brackets depend on one of the algorithm s counters c or ν. They need to be transformed into the corresponding string, for example, v [vν 1.j] becomes v 3 if the value of the j-attribute of v ν 1 V is equal to 3. To improve the structure of the output one may think of a semicolon at the end of an assignment as followed by a newline character (see implementation in Section 4). For example, the application of the symbolic rules in Figure 4 to y = sin(x 2); proceeds as follows. (P4 with ν = 1, [c] = 1, and V.a = x ) (P5 with ν = 2, [c] = 2, and C.a = 2 ) (P7 with ν = 3, µ 1 = 1, µ 2 = 2, v µ1.a = v 1 = x;, v µ2.a = v 2 = 2;, [c] = 3, [v µ1.j] = 1, O.a =, and [v µ2.j] = 2) (P6 with ν = 4, v ν 1.a = v 1 = x; v 2 = 2; v 3 = v 1 v 2 ;, [c] = 4, F.a = sin, and [v ν 1.j] = 3) (P3 with ν = 5, v ν 1.a = v 1 = x; v 2 = 2; v 3 = v 1 v 2 ; v 4 = sin(v 3 );, V.a = y, and [v ν 1.j] = 4) (P1 with ν = 6, v ν 1.a = v 1 = x; v 2 = 2; v 3 = v 1 v 2 ; v 4 = sin(v 3 ); y = v 4 ; ) The complete AST is available after the last reduction operation (P 1) that is performed by the shift-reduce parsing procedure in Table 1. Hence, the synthesized attribute v 6.a contains the entire code list in form of a copy of v 5.a. 3.3 Tangent-Linear SLP Tangent-linear code is constructed by augmenting the code list locally with statements for computing directional derivatives of the elemental functions. The production rules for syntax-directed compilation of tangent-linear SLPs are shown in Figure 5. We use the notation V.ȧ to refer to the string that marks the directional derivative component of the variable marked by the string V.a, that is, if 11

12 8 (P 1) v ν.a = v ν 1.a ν++ (See lines in Section A.3, Listing 1.6.) (P 2) v ν.a = v µ1.a + v µ2.a where v µ1 ˆ=a and v µ2 ˆ=s in as ν++ (See lines ) (P 3) v ν.a = v ν 1.a + V.ȧ + = + v [vν 1.j] + ; + V.a + = + v [vν 1.j] + ; c = 1; ν++ (See lines ) (P 4) v ν.a = v [c] + = + V.ȧ + ; + v [c] + = + V.a + ; v ν.j = c++ ν++ (See lines ) (P 5) v ν.a = v [c] + = 0; + v [c] + = + C.a + ; >< v ν.j = c++ P tlc = ν++ (See lines ) (P 6) v ν.a = v ν 1.a + v [c] + = F.a + v [vν 1.j] + ( + v [v ν 1.j] + ); >: + v [c] + = + F.a + ( + v [vν 1.j] + ); v ν.j = c++ ν++ (See lines ) (P 7) v ν.a = v µ1.a + v µ2.a + v [c] + = + v [vµ1.j] O.a v [vµ1.j] + + O.a v [vµ2.j] + + v [v µ2.j] + ; + v [c] + = + v [vµ1.j] + O.a + v [vµ2.j] + ; v ν.j = c++ ν++ where v µ1 ˆ=e 1 and v µ2 ˆ=e 2 in e 1 Oe 2 (See lines and ) 9 >= >; Fig. 5. Production rules for syntax-directed compilation of tangent-linear SLPs. 12

13 V.a = x, then V.ȧ = ẋ. In (P6) the symbolic transformation F.a v [vν 1.j] is defined according to the differentiation rules of the elemental functions, for example, if F.a = sin and v [vν 1.j] = v 1, then F.a v [vν 1.j] = sin(v 1) = cos(v 1 ). v 1 We assume that partial derivatives of unary intrinsics are again unary functions of the same argument. The symbolic rule can be modified to account for deviations, for example, exp v [vν 1.j] = v [v ν.j]. Similarly, in (P7) O.a v [vµ1.j] = v [v µ2.j] if O.a =. The generation of the tangent-linear code for y = sin(x 2); proceeds as follows. (P4 with ν = 1, [c] = 1, and V.a = x ) (P5 with ν = 2, [c] = 2, and C.a = 2 ) (P7 with ν = 3, µ 1 = 1, µ 2 = 2, [c] = 3, v µ1.a = v 1 = ẋ; v 1 = x;, v µ2.a = v 2 = 0; v 2 = 2;, [v µ1.j] = 1, O.a =, and [v µ2.j] = 2) (P6 with ν = 4, [c] = 4, v ν 1.a = v 1 = ẋ; v 1 = x; v 2 = 0; v 2 = 2; v 3 = v 1 v 2 + v 1 v 2 ; v 3 = v 1 v 2 ;, F.a = sin, and [v ν 1.j] = 3) (P3 with ν = 5, v ν 1.a = v 1 = ẋ; v 1 = x; v 2 = 0; v 2 = 2; v 3 = v 1 v 2 + v 1 v 2 ; v 3 = v 1 v 2 ; v 4 = cos(v 3 ) v 3 ; v 4 = sin(v 3 );, V.a = y, and [v ν 1.j] = 4) (P1 with ν = 6, v ν 1.a = v 1 = ẋ; v 1 = x; v 2 = 0; v 2 = 2; 13

14 v 3 = v 1 v 2 + v 1 v 2 ; v 3 = v 1 v 2 ; v 4 = cos(v 3 ) v 3 ; v 4 = sin(v 3 ); ẏ = v 4 ; y = v 4 ; ) Again, the synthesized attribute v 6.a contains the tangent-linear code after the last reduction performed in Table Intraprocedural Flow of Control The flow of control of the tangent-linear program is the same as for the original program. Hence, any control flow statements such as loops and branches can be treated in a straight-forward fashion by simply unparsing them. In Section A we present a proof-of-concept implementation of a syntax-directed tangent-linear code generator for single subroutines using the GNU tools flex and bison. The functionality of the software is documented in Section 4. For brevity we refrain from the presentation of a corresponding formalism that does not add anything conceptually new. Obviously, the syntactic richness of the language accepted by both the scanner and the parser can be extended easily, for example, by other control-flow structures and conditional expressions. The presence of control flow statements has a more significant impact on the syntax-directed compilation of adjoint codes which will be discussed in the second part of this series of publications. 3.5 Interprocedural Flow of Control The reversal of interprocedural flow of control in the context of adjoint codes generated by syntax-directed translation represents a separate topic that will be discussed in the third part of this series of papers. For tangent-linear codes the presence of subroutine calls requires their replacement with calls of the corresponding tangent-linear subroutine. For example, if foo(x, y) implements F from Equation (1), then its call is replaced with foo(x, ẋ, y, ẏ). No conceptual difficulties arise in the context of syntax-directed translation. 3.6 Vector Mode, etc. The extension to vector mode that computes ẏ = F (x) ẋ for ẋ IR n l and, hence, ẏ IR m l is trivial. Any tangent-linear assignment v j = c j,i v i i j generated so far is simply replaced by the corresponding loop over the l components of the vectors v j and v i as follows v j k = i j c j,i v i k k = 1,..., l. 14

15 Obviously, this simple modification can be done in the context of syntax-directed translation. The same statement applies to the generation of tangent-linear code for the propagation of sparse gradients in sparse forward mode AD (see ADI- FOR s SparsLinC library [3]) and to codes for computing higher derivatives by propagation of truncated Taylor series [10]. In general, any transformation that simply augments the code list with additional statements whose syntax depends only on the code parsed so far fits into the current framework. However, we do not want to imply that the practical realization of these concepts needs to be straight-forward. Often enough the technical details require sophisticated algorithmic solutions and a high level of proficiency in computer programming. 4 Implementation The source of our simple proof-of-concept implementation (called sdtlc for syntax-directed tangent-linear code compiler) that uses the compiler tools flex 6 and bison 7 is shown in Section A. It is meant to serve as a starting point for further development of a syntax-directed tangent-linear code compiler that covers larger fractions of C and possibly C++. Moreover, given an LALR(1) grammar of some imperative programming language the generation of tangent-linear code becomes conceptually easy. We provide the source code on the project s website to support potential other development projects in this direction. In the following we present a small case study that is supposed to illustrate the current functionality of sdtlc. Listing 1.1 shows a small input file that needs to be transformed into tangentlinear code. 1 t =0; 2 while ( x<t ) { 3 i f ( x<y ) { 4 x=y+1; 5 } 6 x=s i n ( x y ) ; 7 } Listing 1.1. test.in We call sdtlc test.in > test.out to obtain the output in Listing double v1, v1 ; 2 double v2, v2 ; 3 double v3, v3 ; 4 double v4, v4 ; 5 v1 =0; v1 =0; 6 t =v1 ; t=v1 ; 7 while ( x<t ) { 8 i f ( x<y ) { 9 v1 =y ; v1=y ; 10 v2 =0; v2 =1; 11 v3 =v1 +v2 ; v3=v1+v2 ; 12 x =v3 ; x=v3 ; 13 } Listing 1.2. test.out

16 14 v1 =x ; v1=x ; 15 v2 =y ; v2=y ; 16 v3 =v1 v2+v1 v2 ; v3=v1 v2 ; 17 v4 =cos ( v3 ) v3 ; v4=s i n ( v3 ) ; 18 x =v4 ; x=v4 ; 19 } To verify the correctness of the transformation we provide a driver that compares the values of the two gradient entries as computed by the tangent-linear code with an approximation obtained by applying forward finite differences. The driver contains wrappers for the original code and the tangent-linear code in the form of the subroutines test and test. 1 #i n c l u d e <cmath> 2 #i n c l u d e < iostream > 3 4 using namespace std ; 5 6 void t e s t ( double &x, double y ) { 7 double t ; 8 #i n c l u d e t e s t. in 9 } 10 Listing 1.3. test.cpp 11 void t e s t ( double &x, double& x, double y, double y ) { 12 double t, t ; 13 #i n c l u d e t e s t. out 14 } i n t main ( ) { cout << f i n i t e d i f f e r e n c e s : < < endl ; 19 double h=1e 6, x=.5, y= 5., x =x+h, y =y ; 20 t e s t (x, y ) ; 21 t e s t ( x, y ) ; 22 cout << dx/dx= << (x x ) /h << endl ; x=.5, x =x, y =y+h ; 25 t e s t (x, y ) ; 26 t e s t ( x, y ) ; 27 cout << dx/dy= << (x x ) /h << endl ; cout << tangent l i n e a r code : < < endl ; 30 x=.5, x =1., y =0.; 31 t e s t (x, x, y, y ) ; 32 cout << dx/dx= << x << endl ; x=.5, x =0., y =1.; 35 t e s t (x, x, y, y ) ; 36 cout << dx/dy= << x << endl ; r e t u r n 0 ; 39 } The result of running the corresponding executable is shown below. finite differences: dx/dx= dx/dy=

17 tangent-linear code: dx/dx= dx/dy= Additional test cases can be found on the project s website. 5 Conclusion and Outlook This paper discussed the automatic generation of tangent-linear code by singlepass source transformation AD without building an internal representation of the program. For the presentation of the formalism we have focused on assignment statements as the relevant syntactical units for semantic transformation. Controlflow statements are simply unparsed. The proposed approach is relatively simple to implement and generalize for full programming languages. A substantial draw-back of this method is the missing static program analysis. An internal representation in form of a control flow graph on top of an implementation of the AST is required. The source transformation problem becomes much more complicated as it involves the development of a complete compiler frontend in addition to domain-specific data flow analyses [11]. However, it appears to be useful to apply the syntax-directed approach as much as possible during the first pass of a source transformation AD tool. The internal representation that becomes the subject of program analysis could already be that of a tangent-linear code. Thus, the optimization of this code amounts to the application of stateof-the-art compiler optimizations driven by domain-specific information, such as vanishing total derivatives of passive variables [11]. Preaccumulation of partial derivatives at the statement or basic block levels can be achieved by extending the syntax-directed approach by assembly of statically available parts of the code list (see [3], [15], and [18]). Pushing the limits of this method is the subject of ongoing research. In part II of this series of papers we consider the syntax-directed generation of adjoint codes. A reversal of the data flow and hence also of the control flow is required. Both can be achieved during a single-pass compilation, leading to codes that enable us to compute derivatives independent of the dimension of the input space. Established applications for adjoint numerical codes are large-scale nonlinear optimization and numerical inverse methods in general. See [5] for a collection of recent activities in these areas. 17

18 Bibliography [1] A. Aho, R. Sethi, and J. Ullman. Compilers. Principles, Techniques, and Tools. Addison-Wesley, [2] M. Berz, C. Bischof, G. Corliss, and A. Griewank, editors. Computational Differentiation: Techniques, Applications, and Tools, Proceedings Series. SIAM, [3] C. Bischof, A. Carle, P. Khademi, and A. Maurer. The ADIFOR 2.0 system for automatic differentiation of Fortran 77 programs. IEEE Comp. Sci. & Eng., 3(3):18 32, [4] C. Bischof, L. Roh, and A. Mauer. ADIC An extensible automatic differentiation tool for ANSI-C. Software: Practice and Experience, 27(12): , [5] M. Bücker, G. Corliss, P. Hovland, U. Naumann, and B. Norris, editors. Automatic Differentiation: Applications, Theory, and Tools, volume 50 of Lecture Notes in Computational Science and Engineering. Springer, [6] G. Corliss, C. Faure, A. Griewank, L. Hascoët, and U. Naumann, editors. Automatic Differentiation of Algorithms From Simulation to Optimization. Springer, [7] G. Corliss and A. Griewank, editors. Automatic Differentiation: Theory, Implementation, and Application, Proceedings Series. SIAM, [8] R. Giering and T. Kaminski. Applying TAF to generate efficient derivative code of Fortran programs. Proceedings in Applied Mathematics and Mechanics, 2(1):54 57, [9] A. Griewank. Evaluating Derivatives. Principles and Techniques of Algorithmic Differentiation. Number 19 in Frontiers in Applied Mathematics. SIAM, [10] A. Griewank, J. Utke, and A. Walther. Evaluating higher derivative tensors by forward propagation of univariate Taylor series. Mathematics of Computation, 69: , [11] L. Hascoët, U. Naumann, and V. Pascual. To be recorded analysis in reverse-mode automatic differentiation. Future Generation Computer Systems, 21(8): , [12] L. Hascoët and V. Pascual. Tapenade 2.1 user s guide. Technical report 300, INRIA, [13] M. Heath. Scientific Computing. An Introductory Survey. McGraw-Hill, [14] C. Kelley. Solving Nonlinear Equations with Newton s Method. SIAM, [15] U. Naumann. On optimal jacobian accumulation for single-expression-use programs. Preprint ANL-MCS/P , Mathematics and Computer Science Division, Argonne National Laboratory, [16] U. Naumann and J. Riehme. A differentiation-enabled Fortran 95 compiler. ACM Trans. Math. Software, (to appear, ref. TOMS ). [17] L. Rall. Automatic Differentiation: Techniques and Applications, volume 120 of LNCS. Springer, [18] J. Utke. Flattening basic blocks. In [5]

19 [19] R. Wengert. A simple automatic derivative evaluation program. Comm. ACM, 7: , [20] C. Wunsch, C. Hill, P. Heimbach, U. Naumann, J. Utke, M. Fagan, and N. Tallent. OpenAD. Preprint ANL/MCS-P , Argonne National Laboratory, February A A Proof-of-Concept Implementation A.1 ast.h The parser generator bison is told to use AST vertices of type astnodetype to enable the propagation of the synthesized attribute a based on code list indexes j. 1 typedef s t r u c t { 2 char a ; 3 i n t j ; 4 } astnodetype ; 5 6 #d e f i n e YYSTYPE astnodetype Listing 1.4. ast.h A.2 scanner.l Listing 1.5. scanner.l 1 %{ 2 #i n c l u d e a s t. h 3 #i n c l u d e p a r s e r. tab. h 4 %} 5 6 whitespace [ \ t \n]+ 7 symbol [ a z ] 8 const [0 9] 9 10 %% { whitespace } { } 13 i f { r e t u r n IF ; } 14 while { r e t u r n WHILE; } 15 s i n { r e t u r n SIN ; } 16 { symbol } { 17 y y l v a l. a = ( char ) malloc (2 s i z e o f ( char ) ) ; 18 s t r c p y ( y y l v a l. a, yytext ) ; 19 r e t u r n SYMBOL; 20 } 21 { const } { 22 y y l v a l. a = ( char ) malloc ( ( s t r l e n ( yytext ) +1) s i z e o f ( char ) ) ; 23 s t r c p y ( y y l v a l. a, yytext ) ; 24 r e t u r n CONSTANT; 25 } { r e t u r n yytext [ 0 ] ; } %% 19

20 30 31 void l e x i n i t (FILE s o u r c e ) 32 { 33 yyin=s o u r c e ; 34 } A.3 parser.y Listing 1.6. parser.y 1 %{ 2 3 #i n c l u d e < s t d l i b. h> 4 #i n c l u d e < s t d i o. h> 5 #i n c l u d e < s t r i n g. h> 6 #i n c l u d e <math. h> 7 #i n c l u d e a s t. h 8 9 extern i n t yylex ( ) ; 10 extern void l e x i n i t (FILE ) ; s t a t i c i n t c, cmax=1; %} %token SYMBOL CONSTANT SIN IF WHILE %l e f t + 19 %l e f t %% code : s e q u e n c e o f s t a t e m e n t s 24 { 25 // p r i n t d e c l a r a t i o n s o f a u x i l l a r y v a r i a b l e s 26 f o r ( c =1;c<cmax ; c++) p r i n t f ( double v%d, v%d ; \ n, c, c ) ; 27 // p r i n t tangent l i n e a r code 28 p r i n t f ( % s, $1. a ) ; 29 f r e e ( $1. a ) ; 30 } 31 ; 32 s e q u e n c e o f s t a t e m e n t s : statement 33 { 34 $$=$1 ; 35 } 36 statement s e q u e n c e o f s t a t e m e n t s 37 { 38 $$. a=(char ) malloc ( ( s t r l e n ( $1. a )+s t r l e n ( $2. a ) +1) s i z e o f ( char ) ) ; 39 s p r i n t f ( $$. a, % s%s, $1. a, $2. a ) ; 40 f r e e ( $2. a ) ; f r e e ( $1. a ) ; 41 } 42 ; 43 statement : assignment { $$=$1 ; } 44 i f s t a t e m e n t { $$=$1 ; } 45 w h i l e s t a t e m e n t { $$=$1 ; } 46 ; 47 i f s t a t e m e n t : IF ( c o n d i t i o n ) { s e q u e n c e o f s t a t e m e n t s } 48 { 49 $$. a=(char ) malloc ( ( s t r l e n ( $3. a )+s t r l e n ( $6. a ) +11) s i z e o f ( char ) ) ; 50 s p r i n t f ( $$. a, i f (% s ) {\ n%s }\n, $3. a, $6. a ) ; 20

21 51 f r e e ( $3. a ) ; f r e e ( $6. a ) ; 52 } 53 ; 54 w h i l e s t a t e m e n t : WHILE ( c o n d i t i o n ) { s e q u e n c e o f s t a t e m e n t s } 55 { 56 $$. a=(char ) malloc ( ( s t r l e n ( $3. a )+s t r l e n ( $6. a ) +14) s i z e o f ( char ) ) ; 57 s p r i n t f ( $$. a, while (% s ) {\ n%s }\n, $3. a, $6. a ) ; 58 f r e e ( $3. a ) ; f r e e ( $6. a ) ; 59 } 60 ; 61 c o n d i t i o n : SYMBOL < SYMBOL 62 { 63 $$. a=(char ) malloc ( ( s t r l e n ( $1. a )+s t r l e n ( $3. a ) +2) s i z e o f ( char ) ) ; 64 s p r i n t f ( $$. a, %s<%s, $1. a, $3. a ) ; 65 f r e e ( $1. a ) ; f r e e ( $3. a ) ; 66 } 67 ; 68 assignment : SYMBOL = { c = 1 ; } e x p r e s s i o n ; 69 { 70 $$. a=(char ) malloc ( 71 ( s t r l e n ( $4. a )+2 s t r l e n ( $1. a )+2 $4. j %10+13) s i z e o f ( char ) ) ; 72 s p r i n t f ( $$. a, % s%s =v%d ; % s=v%d ; \ n, $4. a, $1. a, $4. j, $1. a, $4. j ) ; 73 f r e e ( $1. a ) ; f r e e ( $4. a ) ; 74 } 75 ; 76 e x p r e s s i o n : e x p r e s s i o n e x p r e s s i o n 77 { 78 $$. a=(char ) malloc ( 79 ( s t r l e n ( $1. a )+s t r l e n ( $3. a )+2 c%10+3 $1. j %10+3 $3. j %10+30) s i z e o f ( char ) ) ; 80 $$. j=c ++; i f ( c>cmax ) cmax=c ; 81 s p r i n t f ( $$. a, % s%sv%d =v%d v%d+v%d v%d ; v%d=v%d v%d ; \ n, 82 $1. a, $3. a, $$. j, $1. j, $3. j, $1. j, $3. j, $$. j, $1. j, $3. j ) ; 83 f r e e ( $1. a ) ; f r e e ( $3. a ) ; 84 } 85 e x p r e s s i o n + e x p r e s s i o n 86 { 87 $$. a=(char ) malloc ( 88 ( s t r l e n ( $1. a )+s t r l e n ( $3. a )+2 c%10+2 $1. j %10+2 $3. j %10+24) s i z e o f ( char ) ) ; 89 $$. j=c ++; i f ( c>cmax ) cmax=c ; 90 s p r i n t f ( $$. a, % s%sv%d =v%d +v%d ; v%d=v%d+v%d ; \ n, 91 $1. a, $3. a, $$. j, $1. j, $3. j, $$. j, $1. j, $3. j ) ; 92 f r e e ( $1. a ) ; f r e e ( $3. a ) ; 93 } 94 SIN ( e x p r e s s i o n ) 95 { 96 $$. a=(char ) malloc ( ( s t r l e n ( $3. a )+2 c%10+3 $3. j %10+30) s i z e o f ( char ) ) ; 97 $$. j=c ++; i f ( c>cmax ) cmax=c ; 98 s p r i n t f ( $$. a, % sv%d =cos ( v%d ) v%d ; v%d=s i n ( v%d) ; \ n, 99 $3. a, $$. j, $3. j, $3. j, $$. j, $3. j ) ; 100 f r e e ( $3. a ) ; 101 } 102 SYMBOL 103 { 104 $$. a=(char ) malloc ( ( 2 c%10+2 s t r l e n ( $1. a ) +13) s i z e o f ( char ) ) ; 105 $$. j=c ++; i f ( c>cmax ) cmax=c ; 21

22 106 s p r i n t f ( $$. a, v%d =%s ; v%d=%s ; \ n, $$. j, $1. a, $$. j, $1. a ) ; 107 f r e e ( $1. a ) ; 108 } 109 CONSTANT 110 { 111 $$. a=(char ) malloc ( ( 2 c%10+s t r l e n ( $1. a ) +13) s i z e o f ( char ) ) ; 112 $$. j=c ++; i f ( c>cmax ) cmax=c ; 113 s p r i n t f ( $$. a, v%d =0; v%d=%s ; \ n, $$. j, $$. j, $1. a ) ; 114 f r e e ( $1. a ) ; 115 } 116 ; %% i n t y y e r r o r ( char msg ) { p r i n t f ( ERROR: % s \ n, msg ) ; r e t u r n 1; } i n t main ( i n t argc, char argv [ ] ) 123 { 124 FILE s o u r c e f i l e = fopen ( argv [ 1 ], r ) ; 125 l e x i n i t ( s o u r c e f i l e ) ; 126 yyparse ( ) ; 127 f c l o s e ( s o u r c e f i l e ) ; 128 r e t u r n 0 ; 129 } 22

23 Aachener Informatik-Berichte This is a list of recent technical reports. To obtain copies of technical reports please consult or send your request to: Informatik-Bibliothek, RWTH Aachen, Ahornstr. 55, Aachen, biblio@informatik.rwth-aachen.de Fachgruppe Informatik: Jahresbericht David de Frutos Escrig, Klaus Indermark: Equivalence Relations of Non- Deterministic Ianov-Schemes Manfred Nagl: A Software Development Environment based on Graph Technology Claus Lewerentz, Manfred Nagl, Bernhard Westfechtel: On Integration Mechanisms within a Graph-Based Software Development Environment Reinhard Rinn: Über Eingabeanomalien bei verschiedenen Inferenzmodellen Werner Damm, Gert Döhmen: Specifying Distributed Computer Architectures in AADL* Gregor Engels, Claus Lewerentz, Wilhelm Schäfer: Graph Grammar Engineering: A Software Specification Method Manfred Nagl: Set Theoretic Approaches to Graph Grammars Claus Lewerentz, Andreas Schürr: Experiences with a Database System for Software Documents Herbert Klaeren, Klaus Indermark: A New Implementation Technique for Recursive Function Definitions Rita Loogen: Design of a Parallel Programmable Graph Reduction Machine with Distributed Memory J. Börstler, U. Möncke, R. Wilhelm: Table compression for tree automata Gabriele Esser, Johannes Rückert, Frank Wagner: Gesellschaftliche Aspekte der Informatik Peter Martini, Otto Spaniol: Token-Passing in High-Speed Backbone Networks for Campus-Wide Environments Thomas Welzel: Simulation of a Multiple Token Ring Backbone Peter Martini: Performance Comparison for HSLAN Media Access Protocols Peter Martini: Performance Analysis of Multiple Token Rings Andreas Mann, Johannes Rückert, Otto Spaniol: Datenfunknetze Andreas Mann, Johannes Rückert: Packet Radio Networks for Data Exchange Andreas Mann, Johannes Rückert: Concurrent Slot Assignment Protocol for Packet Radio Networks W. Kremer, F. Reichert, J. Rückert, A. Mann: Entwurf einer Netzwerktopologie für ein Mobilfunknetz zur Unterstützung des öffentlichen Straßenverkehrs Kai Jakobs: Towards User-Friendly Networking Kai Jakobs: The Directory - Evolution of a Standard Kai Jakobs: Directory Services in Distributed Systems - A Survey Martine Schümmer: RS-511, a Protocol for the Plant Floor 23

24 U. Quernheim: Satellite Communication Protocols - A Performance Comparison Considering On-Board Processing Peter Martini, Otto Spaniol, Thomas Welzel: File Transfer in High Speed Token Ring Networks: Performance Evaluation by Approximate Analysis and Simulation Fachgruppe Informatik: Jahresbericht Wolfgang Thomas: Automata on Infinite Objects Michael Sonnenschein: On Petri Nets and Data Flow Graphs Heiko Vogler: Functional Distribution of the Contextual Analysis in Block-Structured Programming Languages: A Case Study of Tree Transducers Thomas Welzel: Einsatz des Simulationswerkzeuges QNAP2 zur Leistungsbewertung von Kommunikationsprotokollen Th. Janning, C. Lewerentz: Integrated Project Team Management in a Software Development Environment Joost Engelfriet, Heiko Vogler: Modular Tree Transducers Wolfgang Thomas: Automata and Quantifier Hierarchies Uschi Heuter: Generalized Definite Tree Languages Fachgruppe Informatik: Jahresbericht G. Esser, J. Rückert, F. Wagner (Hrsg.): Gesellschaftliche Aspekte der Informatik Heiko Vogler: Bottom-Up Computation of Primitive Recursive Tree Functions Andy Schürr: Introduction to PROGRESS, an Attribute Graph Grammar Based Specification Language J. Börstler: Reuse and Software Development - Problems, Solutions, and Bibliography (in German) Kai Jakobs: OSI - An Appropriate Basis for Group Communication? Kai Jakobs: ISO s Directory Proposal - Evolution, Current Status and Future Problems Bernhard Westfechtel: Extension of a Graph Storage for Software Documents with Primitives for Undo/Redo and Revision Control Peter Martini: High Speed Local Area Networks - A Tutorial P. Davids, Th. Welzel: Performance Analysis of DQDB Based on Simulation Manfred Nagl (Ed.): Abstracts of Talks presented at the WG 89 15th International Workshop on Graphtheoretic Concepts in Computer Science Peter Martini: The DQDB Protocol - Is it Playing the Game? Martine Schümmer: CNC/DNC Communication with MAP Martine Schümmer: Local Area Networks for Manufactoring Environments with hard Real-Time Requirements M. Schümmer, Th. Welzel, P. Martini: Integration of Field Bus and MAP Networks - Hierarchical Communication Systems in Production Environments G. Vossen, K.-U. Witt: SUXESS: Towards a Sound Unification of Extensions of the Relational Data Model 24

25 J. Derissen, P. Hruschka, M.v.d. Beeck, Th. Janning, M. Nagl: Integrating Structured Analysis and Information Modelling A. Maassen: Programming with Higher Order Functions Mario Rodriguez-Artalejo, Heiko Vogler: A Narrowing Machine for Syntax Directed BABEL H. Kuchen, R. Loogen, J.J. Moreno Navarro, M. Rodriguez Artalejo: Graph-based Implementation of a Functional Logic Language Fachgruppe Informatik: Jahresbericht Vera Jansen, Andreas Potthoff, Wolfgang Thomas, Udo Wermuth: A Short Guide to the AMORE System (Computing Automata, MOnoids and Regular Expressions) Jerzy Skurczynski: On Three Hierarchies of Weak SkS Formulas R. Loogen: Stack-based Implementation of Narrowing H. Kuchen, A. Wagener: Comparison of Dynamic Load Balancing Strategies Kai Jakobs, Frank Reichert: Directory Services for Mobile Communication Kai Jakobs: What s Beyond the Interface - OSI Networks to Support Cooperative Work Kai Jakobs: Directory Names and Schema - An Evaluation Ulrich Quernheim, Dieter Kreuer: Das CCITT - Signalisierungssystem Nr. 7 auf Satellitenstrecken; Simulation der Zeichengabestrecke H. Kuchen, R. Loogen, J.J. Moreno Navarro, M. Rodriguez Artalejo: Lazy Narrowing in a Graph Machine Kai Jakobs, Josef Kaltwasser, Frank Reichert, Otto Spaniol: Der Computer fährt mit Rudolf Mathar, Andreas Mann: Analyzing a Distributed Slot Assignment Protocol by Markov Chains A. Maassen: Compilerentwicklung in Miranda - ein Praktikum in funktionaler Programmierung (written in german) Manfred Nagl, Andreas Schürr: A Specification Environment for Graph Grammars A. Schürr: PROGRESS: A VHL-Language Based on Graph Grammars Marita Möller: Ein Ebenenmodell wissensbasierter Konsultationen - Unterstützung für Wissensakquisition und Erklärungsfähigkeit Eric Kowalewski: Entwurf und Interpretation einer Sprache zur Beschreibung von Konsultationsphasen in Expertensystemen Y. Ortega Mallen, D. de Frutos Escrig: A Complete Proof System for Timed Observations Manfred Nagl: Modelling of Software Architectures: Importance, Notions, Experiences H. Fassbender, H. Vogler: A Call-by-need Implementation of Syntax Directed Functional Programming Guenther Geiler (ed.), Fachgruppe Informatik: Jahresbericht B. Steffen, A. Ingolfsdottir: Characteristic Formulae for Processes with Divergence M. Portz: A new class of cryptosystems based on interconnection networks 25

26 H. Kuchen, G. Geiler: Distributed Applicative Arrays Ludwig Staiger: Kolmogorov Complexity and Hausdorff Dimension Ludwig Staiger: Syntactic Congruences for w-languages Eila Kuikka: A Proposal for a Syntax-Directed Text Processing System K. Gladitz, H. Fassbender, H. Vogler: Compiler-based Implementation of Syntax-Directed Functional Programming R. Loogen, St. Winkler: Dynamic Detection of Determinism in Functional Logic Languages K. Indermark, M. Rodriguez Artalejo (Eds.): Granada Workshop on the Integration of Functional and Logic Programming Rolf Hager, Wolfgang Kremer: The Adaptive Priority Scheduler: A More Fair Priority Service Discipline Andreas Fasbender, Wolfgang Kremer: A New Approximation Algorithm for Tandem Networks with Priority Nodes J. Börstler, A. Zündorf: Revisiting extensions to Modula-2 to support reusability J. Börstler, Th. Janning: Bridging the gap between Requirements Analysis and Design A. Zündorf, A. Schürr: Nondeterministic Control Structures for Graph Rewriting Systems Matthias Jarke, John Mylopoulos, Joachim W. Schmidt, Yannis Vassiliou: DAIDA: An Environment for Evolving Information Systems M. Jeusfeld, M. Jarke: From Relational to Object-Oriented Integrity Simplification G. Hogen, A. Kindler, R. Loogen: Automatic Parallelization of Lazy Functional Programs Prof. Dr. rer. nat. Otto Spaniol: ODP (Open Distributed Processing): Yet another Viewpoint H. Kuchen, F. Lücking, H. Stoltze: The Topology Description Language TDL S. Graf, B. Steffen: Compositional Minimization of Finite State Systems R. Cleaveland, J. Parrow, B. Steffen: The Concurrency Workbench: A Semantics Based Tool for the Verification of Concurrent Systems Rudolf Mathar, Jürgen Mattfeldt: Optimal Transmission Ranges for Mobile Communication in Linear Multihop Packet Radio Networks M. Jeusfeld, M. Staudt: Query Optimization in Deductive Object Bases J. Knoop, B. Steffen: The Interprocedural Coincidence Theorem J. Knoop, B. Steffen: Unifying Strength Reduction and Semantic Code Motion T. Margaria: First-Order theories for the verification of complex FSMs B. Steffen: Generating Data Flow Analysis Algorithms from Modal Specifications Stefan Eherer (ed.), Fachgruppe Informatik: Jahresbericht Bernhard Westfechtel: Basismechanismen zur Datenverwaltung in strukturbezogenen Hypertextsystemen S. A. Smolka, B. Steffen: Priority as Extremal Probability Matthias Jarke, Carlos Maltzahn, Thomas Rose: Sharing Processes: Team Coordination in Design Repositories 26

27 O. Burkart, B. Steffen: Model Checking for Context-Free Processes Matthias Jarke, Klaus Pohl: Information Systems Quality and Quality Information Systems Rudolf Mathar, Jürgen Mattfeldt: Analyzing Routing Strategy NFP in Multihop Packet Radio Networks on a Line Alfons Kemper, Guido Moerkotte: Grundlagen objektorientierter Datenbanksysteme Matthias Jarke, Manfred Jeusfeld, Andreas Miethsam, Michael Gocek: Towards a logic-based reconstruction of software configuration management Werner Hans: A Complete Indexing Scheme for WAM-based Abstract Machines W. Hans, R. Loogen, St. Winkler: On the Interaction of Lazy Evaluation and Backtracking Matthias Jarke, Thomas Rose: Specification Management with CAD Th. Noll, H. Vogler: Top-down Parsing with Simultaneous Evaluation on Noncircular Attribute Grammars A. Schuerr, B. Westfechtel: Graphgrammatiken und Graphersetzungssysteme(written in german) Graduiertenkolleg Informatik und Technik (Hrsg.): Forschungsprojekte des Graduiertenkollegs Informatik und Technik M. Jarke (ed.): ConceptBase V3.1 User Manual Clarence A. Ellis, Matthias Jarke (Eds.): Distributed Cooperation in Integrated Information Systems - Proceedings of the Third International Workshop on Intelligent and Cooperative Information Systems H. Kuchen, R. Loogen (eds.): Proceedings of the 4th Int. Workshop on the Parallel Implementation of Functional Languages G. Hogen, R. Loogen: PASTEL - A Parallel Stack-Based Implementation of Eager Functional Programs with Lazy Data Structures (Extended Abstract) H. Kuchen, K. Gladitz: Implementing Bags on a Shared Memory MIMD- Machine C. Rathsack, S.B. Scholz: LISA - A Lazy Interpreter for a Full-Fledged Lambda-Calculus T.A. Bratvold: Determining Useful Parallelism in Higher Order Functions S. Kahrs: Polymorphic Type Checking by Interpretation of Code M. Chakravarty, M. Köhler: Equational Constraints, Residuation, and the Parallel JUMP-Machine J. Seward: Polymorphic Strictness Analysis using Frontiers (Draft Version) D. Gärtner, A. Kimms, W. Kluge: pi-redˆ+ - A Compiling Graph- Reduction System for a Full Fledged Lambda-Calculus D. Howe, G. Burn: Experiments with strict STG code J. Glauert: Parallel Implementation of Functional Languages Using Small Processes M. Joy, T. Axford: A Parallel Graph Reduction Machine A. Bennett, P. Kelly: Simulation of Multicache Parallel Reduction 27

28 K. Langendoen, D.J. Agterkamp: Cache Behaviour of Lazy Functional Programs (Working Paper) K. Hammond, S. Peyton Jones: Profiling scheduling strategies on the GRIP parallel reducer S. Mintchev: Using Strictness Information in the STG-machine D. Rushall: An Attribute Grammar Evaluator in Haskell J. Wild, H. Glaser, P. Hartel: Statistics on storage management in a lazy functional language implementation W.S. Martins: Parallel Implementations of Functional Languages D. Lester: Distributed Garbage Collection of Cyclic Structures (Draft version) J.C. Glas, R.F.H. Hofman, W.G. Vree: Parallelization of Branch-and- Bound Algorithms in a Functional Programming Environment S. Hwang, D. Rushall: The nu-stg machine: a parallelized Spineless Tagless Graph Reduction Machine in a distributed memory architecture (Draft version) G. Burn, D. Le Metayer: Cps-Translation and the Correctness of Optimising Compilers S.L. Peyton Jones, P. Wadler: Imperative functional programming (Brief summary) W. Damm, F. Liu, Th. Peikenkamp: Evaluation and Parallelization of Functions in Functional + Logic Languages (abstract) M. Kesseler: Communication Issues Regarding Parallel Functional Graph Rewriting Th. Peikenkamp: Charakterizing and representing neededness in functional loginc languages (abstract) H. Doerr: Monitoring with Graph-Grammars as formal operational Models J. van Groningen: Some implementation aspects of Concurrent Clean on distributed memory architectures G. Ostheimer: Load Bounding for Implicit Parallelism (abstract) H. Kuchen, F.J. Lopez Fraguas, J.J. Moreno Navarro, M. Rodriguez Artalejo: Implementing Disequality in a Lazy Functional Logic Language H. Kuchen, F.J. Lopez Fraguas: Result Directed Computing in a Functional Logic Language H. Kuchen, J.J. Moreno Navarro, M.V. Hermenegildo: Independent AND-Parallel Narrowing T. Margaria, B. Steffen: Distinguishing Formulas for Free K. Pohl: The Three Dimensions of Requirements Engineering R. Stainov: A Dynamic Configuration Facility for Multimedia Communications Michael von der Beeck: Integration of Structured Analysis and Timed Statecharts for Real-Time and Concurrency Specification W. Hans, St. Winkler: Aliasing and Groundness Analysis of Logic Programs through Abstract Interpretation and its Safety Gerhard Steinke, Matthias Jarke: Support for Security Modeling in Information Systems Design B. Schinzel: Warum Frauenforschung in Naturwissenschaft und Technik 28

Aachen. CD2Alloy: A Translation of Class Diagrams to Alloy. Department of Computer Science. Technical Report

Aachen. CD2Alloy: A Translation of Class Diagrams to Alloy. Department of Computer Science. Technical Report Aachen Department of Computer Science Technical Report CD2Alloy: A Translation of Class Diagrams to Alloy Shahar Maoz and Jan Oliver Ringert and Bernhard Rumpe ISSN 0935 3232 Aachener Informatik-Berichte

More information

Aachen. Toward Adjoint OpenMP. Department of Computer Science. Technical Report. Michael Förster and Uwe Naumann and Jean Utke

Aachen. Toward Adjoint OpenMP. Department of Computer Science. Technical Report. Michael Förster and Uwe Naumann and Jean Utke Aachen Department of Computer Science Technical Report Toward Adjoint OpenMP Michael Förster and Uwe Naumann and Jean Utke ISSN 0935 3232 Aachener Informatik-Berichte AIB-2011-13 RWTH Aachen Department

More information

Aachen. Achieving Highly Reliable Embedded Software: An empirical evaluation of different approaches. Department of Computer Science.

Aachen. Achieving Highly Reliable Embedded Software: An empirical evaluation of different approaches. Department of Computer Science. Aachen Department of Computer Science Technical Report Achieving Highly Reliable Embedded Software: An empirical evaluation of different approaches Falk Salewski and Stefan Kowalewski ISSN 0935 3232 Aachener

More information

Toward Low Static Memory Jacobian Accumulation

Toward Low Static Memory Jacobian Accumulation Aachen Department of Computer Science Technical Report Toward Low Static Memory Jacobian Accumulation Ebadollah Varnik, Uwe Naumann and Andrew Lyons ISSN 935 3232 Aachener Informatik Berichte AIB-26-4

More information

Department of Computer Science. Joachim Kneis, Daniel Mölle, Stefan Richter, Peter Rossmanith. ISSN 0935 3232 Aachener Informatik Berichte AIB-2006-06

Department of Computer Science. Joachim Kneis, Daniel Mölle, Stefan Richter, Peter Rossmanith. ISSN 0935 3232 Aachener Informatik Berichte AIB-2006-06 Aachen Department of Computer Science Technical Report Divide-and-Color Joachim Kneis, Daniel Mölle, Stefan Richter, Peter Rossmanith ISSN 0935 3232 Aachener Informatik Berichte AIB-2006-06 RWTH Aachen

More information

Tampering with Motes: Real-World Physical Attacks on Wireless Sensor Networks

Tampering with Motes: Real-World Physical Attacks on Wireless Sensor Networks Aachen Department of Computer Science Technical Report Tampering with Motes: Real-World Physical Attacks on Wireless Sensor Networks Alexander Becher, Zinaida Benenson, Maximillian Dornseif ISSN 0935 3232

More information

Aachen. A Counterexample to the Fully Mixed Nash Equilibrium Conjecture. Department of Computer Science. Technical Report

Aachen. A Counterexample to the Fully Mixed Nash Equilibrium Conjecture. Department of Computer Science. Technical Report Aachen Department of Computer Science Technical Report A Counterexample to the Fully Mixed Nash Equilibrium Conjecture Simon Fischer and Berthold Vöcking ISSN 0935 3232 Aachener Informatik Berichte AIB-2005-11

More information

Aachen. Toward Adjoint OpenFOAM. Department of Computer Science. Technical Report. Niloofar Safiran and Uwe Naumann

Aachen. Toward Adjoint OpenFOAM. Department of Computer Science. Technical Report. Niloofar Safiran and Uwe Naumann Aachen Department of Computer Science Technical Report Toward Adjoint OpenFOAM Niloofar Safiran and Uwe Naumann ISSN 0935 3232 Aachener Informatik-Berichte AIB-2011-16 RWTH Aachen Department of Computer

More information

Scanning and parsing. Topics. Announcements Pick a partner by Monday Makeup lecture will be on Monday August 29th at 3pm

Scanning and parsing. Topics. Announcements Pick a partner by Monday Makeup lecture will be on Monday August 29th at 3pm Scanning and Parsing Announcements Pick a partner by Monday Makeup lecture will be on Monday August 29th at 3pm Today Outline of planned topics for course Overall structure of a compiler Lexical analysis

More information

Compiler Construction

Compiler Construction Compiler Construction Regular expressions Scanning Görel Hedin Reviderad 2013 01 23.a 2013 Compiler Construction 2013 F02-1 Compiler overview source code lexical analysis tokens intermediate code generation

More information

CSCI 3136 Principles of Programming Languages

CSCI 3136 Principles of Programming Languages CSCI 3136 Principles of Programming Languages Faculty of Computer Science Dalhousie University Winter 2013 CSCI 3136 Principles of Programming Languages Faculty of Computer Science Dalhousie University

More information

Lexical Analysis and Scanning. Honors Compilers Feb 5 th 2001 Robert Dewar

Lexical Analysis and Scanning. Honors Compilers Feb 5 th 2001 Robert Dewar Lexical Analysis and Scanning Honors Compilers Feb 5 th 2001 Robert Dewar The Input Read string input Might be sequence of characters (Unix) Might be sequence of lines (VMS) Character set ASCII ISO Latin-1

More information

Regular Expressions and Automata using Haskell

Regular Expressions and Automata using Haskell Regular Expressions and Automata using Haskell Simon Thompson Computing Laboratory University of Kent at Canterbury January 2000 Contents 1 Introduction 2 2 Regular Expressions 2 3 Matching regular expressions

More information

Properties of Stabilizing Computations

Properties of Stabilizing Computations Theory and Applications of Mathematics & Computer Science 5 (1) (2015) 71 93 Properties of Stabilizing Computations Mark Burgin a a University of California, Los Angeles 405 Hilgard Ave. Los Angeles, CA

More information

COMP 356 Programming Language Structures Notes for Chapter 4 of Concepts of Programming Languages Scanning and Parsing

COMP 356 Programming Language Structures Notes for Chapter 4 of Concepts of Programming Languages Scanning and Parsing COMP 356 Programming Language Structures Notes for Chapter 4 of Concepts of Programming Languages Scanning and Parsing The scanner (or lexical analyzer) of a compiler processes the source program, recognizing

More information

ML for the Working Programmer

ML for the Working Programmer ML for the Working Programmer 2nd edition Lawrence C. Paulson University of Cambridge CAMBRIDGE UNIVERSITY PRESS CONTENTS Preface to the Second Edition Preface xiii xv 1 Standard ML 1 Functional Programming

More information

Dynamic Project and Workflow Management for Design Processes in Chemical Engineering

Dynamic Project and Workflow Management for Design Processes in Chemical Engineering Dynamic Project and Workflow Management for Design Processes in Chemical Engineering Markus Heller, Bernhard Westfechtel Computer Science III, RWTH Aachen, D-52056 Aachen, Germany Abstract Design processes

More information

Pushdown automata. Informatics 2A: Lecture 9. Alex Simpson. 3 October, 2014. School of Informatics University of Edinburgh als@inf.ed.ac.

Pushdown automata. Informatics 2A: Lecture 9. Alex Simpson. 3 October, 2014. School of Informatics University of Edinburgh als@inf.ed.ac. Pushdown automata Informatics 2A: Lecture 9 Alex Simpson School of Informatics University of Edinburgh als@inf.ed.ac.uk 3 October, 2014 1 / 17 Recap of lecture 8 Context-free languages are defined by context-free

More information

CS143 Handout 08 Summer 2008 July 02, 2007 Bottom-Up Parsing

CS143 Handout 08 Summer 2008 July 02, 2007 Bottom-Up Parsing CS143 Handout 08 Summer 2008 July 02, 2007 Bottom-Up Parsing Handout written by Maggie Johnson and revised by Julie Zelenski. Bottom-up parsing As the name suggests, bottom-up parsing works in the opposite

More information

[Refer Slide Time: 05:10]

[Refer Slide Time: 05:10] Principles of Programming Languages Prof: S. Arun Kumar Department of Computer Science and Engineering Indian Institute of Technology Delhi Lecture no 7 Lecture Title: Syntactic Classes Welcome to lecture

More information

Advanced compiler construction. General course information. Teacher & assistant. Course goals. Evaluation. Grading scheme. Michel Schinz 2007 03 16

Advanced compiler construction. General course information. Teacher & assistant. Course goals. Evaluation. Grading scheme. Michel Schinz 2007 03 16 Advanced compiler construction Michel Schinz 2007 03 16 General course information Teacher & assistant Course goals Teacher: Michel Schinz Michel.Schinz@epfl.ch Assistant: Iulian Dragos INR 321, 368 64

More information

Programming Languages

Programming Languages Programming Languages Qing Yi Course web site: www.cs.utsa.edu/~qingyi/cs3723 cs3723 1 A little about myself Qing Yi Ph.D. Rice University, USA. Assistant Professor, Department of Computer Science Office:

More information

arxiv:cs/0101001v1 [cs.ms] 3 Jan 2001

arxiv:cs/0101001v1 [cs.ms] 3 Jan 2001 ARGONNE NATIONAL LABORATORY 9700 South Cass Avenue Argonne, Illinois 60439 arxiv:cs/0101001v1 [cs.ms] 3 Jan 2001 AUTOMATIC DIFFERENTIATION TOOLS IN OPTIMIZATION SOFTWARE Jorge J. Moré Mathematics and Computer

More information

Division of Mathematical Sciences

Division of Mathematical Sciences Division of Mathematical Sciences Chair: Mohammad Ladan, Ph.D. The Division of Mathematical Sciences at Haigazian University includes Computer Science and Mathematics. The Bachelor of Science (B.S.) degree

More information

Object-Oriented Software Specification in Programming Language Design and Implementation

Object-Oriented Software Specification in Programming Language Design and Implementation Object-Oriented Software Specification in Programming Language Design and Implementation Barrett R. Bryant and Viswanathan Vaidyanathan Department of Computer and Information Sciences University of Alabama

More information

Compiler I: Syntax Analysis Human Thought

Compiler I: Syntax Analysis Human Thought Course map Compiler I: Syntax Analysis Human Thought Abstract design Chapters 9, 12 H.L. Language & Operating Sys. Compiler Chapters 10-11 Virtual Machine Software hierarchy Translator Chapters 7-8 Assembly

More information

Syntaktická analýza. Ján Šturc. Zima 208

Syntaktická analýza. Ján Šturc. Zima 208 Syntaktická analýza Ján Šturc Zima 208 Position of a Parser in the Compiler Model 2 The parser The task of the parser is to check syntax The syntax-directed translation stage in the compiler s front-end

More information

Formal Languages and Automata Theory - Regular Expressions and Finite Automata -

Formal Languages and Automata Theory - Regular Expressions and Finite Automata - Formal Languages and Automata Theory - Regular Expressions and Finite Automata - Samarjit Chakraborty Computer Engineering and Networks Laboratory Swiss Federal Institute of Technology (ETH) Zürich March

More information

Continued Fractions and the Euclidean Algorithm

Continued Fractions and the Euclidean Algorithm Continued Fractions and the Euclidean Algorithm Lecture notes prepared for MATH 326, Spring 997 Department of Mathematics and Statistics University at Albany William F Hammond Table of Contents Introduction

More information

Chapter One Introduction to Programming

Chapter One Introduction to Programming Chapter One Introduction to Programming 1-1 Algorithm and Flowchart Algorithm is a step-by-step procedure for calculation. More precisely, algorithm is an effective method expressed as a finite list of

More information

Programming Language Pragmatics

Programming Language Pragmatics Programming Language Pragmatics THIRD EDITION Michael L. Scott Department of Computer Science University of Rochester ^ШШШШШ AMSTERDAM BOSTON HEIDELBERG LONDON, '-*i» ЩЛ< ^ ' m H NEW YORK «OXFORD «PARIS»SAN

More information

Reading 13 : Finite State Automata and Regular Expressions

Reading 13 : Finite State Automata and Regular Expressions CS/Math 24: Introduction to Discrete Mathematics Fall 25 Reading 3 : Finite State Automata and Regular Expressions Instructors: Beck Hasti, Gautam Prakriya In this reading we study a mathematical model

More information

Bachelor of Games and Virtual Worlds (Programming) Subject and Course Summaries

Bachelor of Games and Virtual Worlds (Programming) Subject and Course Summaries First Semester Development 1A On completion of this subject students will be able to apply basic programming and problem solving skills in a 3 rd generation object-oriented programming language (such as

More information

Eastern Washington University Department of Computer Science. Questionnaire for Prospective Masters in Computer Science Students

Eastern Washington University Department of Computer Science. Questionnaire for Prospective Masters in Computer Science Students Eastern Washington University Department of Computer Science Questionnaire for Prospective Masters in Computer Science Students I. Personal Information Name: Last First M.I. Mailing Address: Permanent

More information

PART-A Questions. 2. How does an enumerated statement differ from a typedef statement?

PART-A Questions. 2. How does an enumerated statement differ from a typedef statement? 1. Distinguish & and && operators. PART-A Questions 2. How does an enumerated statement differ from a typedef statement? 3. What are the various members of a class? 4. Who can access the protected members

More information

DEGREE PLAN INSTRUCTIONS FOR COMPUTER ENGINEERING

DEGREE PLAN INSTRUCTIONS FOR COMPUTER ENGINEERING DEGREE PLAN INSTRUCTIONS FOR COMPUTER ENGINEERING Fall 2000 The instructions contained in this packet are to be used as a guide in preparing the Departmental Computer Science Degree Plan Form for the Bachelor's

More information

Computer Science MS Course Descriptions

Computer Science MS Course Descriptions Computer Science MS Course Descriptions CSc I0400: Operating Systems Underlying theoretical structure of operating systems; input-output and storage systems, data management and processing; assembly and

More information

Implementation of Recursively Enumerable Languages using Universal Turing Machine in JFLAP

Implementation of Recursively Enumerable Languages using Universal Turing Machine in JFLAP International Journal of Information and Computation Technology. ISSN 0974-2239 Volume 4, Number 1 (2014), pp. 79-84 International Research Publications House http://www. irphouse.com /ijict.htm Implementation

More information

Advanced Concepts for Automatic Differentiation based on Operator Overloading

Advanced Concepts for Automatic Differentiation based on Operator Overloading TECHNISCHE UNIVERSITÄT DRESDEN FAKULTÄT INFORMATIK Advanced Concepts for Automatic Differentiation based on Operator Overloading Dissertation zur Erlangung des akademischen Grades Doktoringenieur (Dr.-Ing.)

More information

Semester Review. CSC 301, Fall 2015

Semester Review. CSC 301, Fall 2015 Semester Review CSC 301, Fall 2015 Programming Language Classes There are many different programming language classes, but four classes or paradigms stand out:! Imperative Languages! assignment and iteration!

More information

TOPIC 4: DERIVATIVES

TOPIC 4: DERIVATIVES TOPIC 4: DERIVATIVES 1. The derivative of a function. Differentiation rules 1.1. The slope of a curve. The slope of a curve at a point P is a measure of the steepness of the curve. If Q is a point on the

More information

Semantic Analysis: Types and Type Checking

Semantic Analysis: Types and Type Checking Semantic Analysis Semantic Analysis: Types and Type Checking CS 471 October 10, 2007 Source code Lexical Analysis tokens Syntactic Analysis AST Semantic Analysis AST Intermediate Code Gen lexical errors

More information

Representing Reversible Cellular Automata with Reversible Block Cellular Automata

Representing Reversible Cellular Automata with Reversible Block Cellular Automata Discrete Mathematics and Theoretical Computer Science Proceedings AA (DM-CCG), 2001, 145 154 Representing Reversible Cellular Automata with Reversible Block Cellular Automata Jérôme Durand-Lose Laboratoire

More information

The Clean programming language. Group 25, Jingui Li, Daren Tuzi

The Clean programming language. Group 25, Jingui Li, Daren Tuzi The Clean programming language Group 25, Jingui Li, Daren Tuzi The Clean programming language Overview The Clean programming language first appeared in 1987 and is still being further developed. It was

More information

How to make the computer understand? Lecture 15: Putting it all together. Example (Output assembly code) Example (input program) Anatomy of a Computer

How to make the computer understand? Lecture 15: Putting it all together. Example (Output assembly code) Example (input program) Anatomy of a Computer How to make the computer understand? Fall 2005 Lecture 15: Putting it all together From parsing to code generation Write a program using a programming language Microprocessors talk in assembly language

More information

Software Engineering

Software Engineering Software Engineering Lecture 06: Design an Overview Peter Thiemann University of Freiburg, Germany SS 2013 Peter Thiemann (Univ. Freiburg) Software Engineering SWT 1 / 35 The Design Phase Programming in

More information

Textual Modeling Languages

Textual Modeling Languages Textual Modeling Languages Slides 4-31 and 38-40 of this lecture are reused from the Model Engineering course at TU Vienna with the kind permission of Prof. Gerti Kappel (head of the Business Informatics

More information

Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science

Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science 6.035, Fall 2005 Handout 7 Scanner Parser Project Wednesday, September 7 DUE: Wednesday, September 21 This

More information

Software Modeling and Verification

Software Modeling and Verification Software Modeling and Verification Alessandro Aldini DiSBeF - Sezione STI University of Urbino Carlo Bo Italy 3-4 February 2015 Algorithmic verification Correctness problem Is the software/hardware system

More information

Regular Expressions with Nested Levels of Back Referencing Form a Hierarchy

Regular Expressions with Nested Levels of Back Referencing Form a Hierarchy Regular Expressions with Nested Levels of Back Referencing Form a Hierarchy Kim S. Larsen Odense University Abstract For many years, regular expressions with back referencing have been used in a variety

More information

Aachen. An Operational Semantics for Activity Diagrams using SMV. Department of Computer Science. Technical Report

Aachen. An Operational Semantics for Activity Diagrams using SMV. Department of Computer Science. Technical Report Aachen Department of Computer Science Technical Report An Operational Semantics for Activity Diagrams using SMV Shahar Maoz and Jan Oliver Ringert and Bernhard Rumpe ISSN 0935 3232 Aachener Informatik-Berichte

More information

C Compiler Targeting the Java Virtual Machine

C Compiler Targeting the Java Virtual Machine C Compiler Targeting the Java Virtual Machine Jack Pien Senior Honors Thesis (Advisor: Javed A. Aslam) Dartmouth College Computer Science Technical Report PCS-TR98-334 May 30, 1998 Abstract One of the

More information

PROBLEM SOLVING SEVENTH EDITION WALTER SAVITCH UNIVERSITY OF CALIFORNIA, SAN DIEGO CONTRIBUTOR KENRICK MOCK UNIVERSITY OF ALASKA, ANCHORAGE PEARSON

PROBLEM SOLVING SEVENTH EDITION WALTER SAVITCH UNIVERSITY OF CALIFORNIA, SAN DIEGO CONTRIBUTOR KENRICK MOCK UNIVERSITY OF ALASKA, ANCHORAGE PEARSON PROBLEM SOLVING WITH SEVENTH EDITION WALTER SAVITCH UNIVERSITY OF CALIFORNIA, SAN DIEGO CONTRIBUTOR KENRICK MOCK UNIVERSITY OF ALASKA, ANCHORAGE PEARSON Addison Wesley Boston San Francisco New York London

More information

Lecture L3 - Vectors, Matrices and Coordinate Transformations

Lecture L3 - Vectors, Matrices and Coordinate Transformations S. Widnall 16.07 Dynamics Fall 2009 Lecture notes based on J. Peraire Version 2.0 Lecture L3 - Vectors, Matrices and Coordinate Transformations By using vectors and defining appropriate operations between

More information

Introduction to Software Paradigms & Procedural Programming Paradigm

Introduction to Software Paradigms & Procedural Programming Paradigm Introduction & Procedural Programming Sample Courseware Introduction to Software Paradigms & Procedural Programming Paradigm This Lesson introduces main terminology to be used in the whole course. Thus,

More information

Differentiating a Time-dependent CFD Solver

Differentiating a Time-dependent CFD Solver Differentiating a Time-dependent CFD Solver Presented to The AD Workshop, Nice, April 2005 Mohamed Tadjouddine & Shaun Forth Engineering Systems Department Cranfield University (Shrivenham Campus) Swindon

More information

Introduction to Automata Theory. Reading: Chapter 1

Introduction to Automata Theory. Reading: Chapter 1 Introduction to Automata Theory Reading: Chapter 1 1 What is Automata Theory? Study of abstract computing devices, or machines Automaton = an abstract computing device Note: A device need not even be a

More information

(IALC, Chapters 8 and 9) Introduction to Turing s life, Turing machines, universal machines, unsolvable problems.

(IALC, Chapters 8 and 9) Introduction to Turing s life, Turing machines, universal machines, unsolvable problems. 3130CIT: Theory of Computation Turing machines and undecidability (IALC, Chapters 8 and 9) Introduction to Turing s life, Turing machines, universal machines, unsolvable problems. An undecidable problem

More information

Honors Class (Foundations of) Informatics. Tom Verhoeff. Department of Mathematics & Computer Science Software Engineering & Technology

Honors Class (Foundations of) Informatics. Tom Verhoeff. Department of Mathematics & Computer Science Software Engineering & Technology Honors Class (Foundations of) Informatics Tom Verhoeff Department of Mathematics & Computer Science Software Engineering & Technology www.win.tue.nl/~wstomv/edu/hci c 2011, T. Verhoeff @ TUE.NL 1/20 Information

More information

EFFECTIVE CONSTRUCTIVE MODELS OF IMPLICIT SELECTION IN BUSINESS PROCESSES. Nataliya Golyan, Vera Golyan, Olga Kalynychenko

EFFECTIVE CONSTRUCTIVE MODELS OF IMPLICIT SELECTION IN BUSINESS PROCESSES. Nataliya Golyan, Vera Golyan, Olga Kalynychenko 380 International Journal Information Theories and Applications, Vol. 18, Number 4, 2011 EFFECTIVE CONSTRUCTIVE MODELS OF IMPLICIT SELECTION IN BUSINESS PROCESSES Nataliya Golyan, Vera Golyan, Olga Kalynychenko

More information

Regular Languages and Finite Automata

Regular Languages and Finite Automata Regular Languages and Finite Automata 1 Introduction Hing Leung Department of Computer Science New Mexico State University Sep 16, 2010 In 1943, McCulloch and Pitts [4] published a pioneering work on a

More information

ADVANCED SCHOOL OF SYSTEMS AND DATA STUDIES (ASSDAS) PROGRAM: CTech in Computer Science

ADVANCED SCHOOL OF SYSTEMS AND DATA STUDIES (ASSDAS) PROGRAM: CTech in Computer Science ADVANCED SCHOOL OF SYSTEMS AND DATA STUDIES (ASSDAS) PROGRAM: CTech in Computer Science Program Schedule CTech Computer Science Credits CS101 Computer Science I 3 MATH100 Foundations of Mathematics and

More information

School of Computer Science

School of Computer Science School of Computer Science Computer Science - Honours Level - 2014/15 October 2014 General degree students wishing to enter 3000- level modules and non- graduating students wishing to enter 3000- level

More information

Functional Programming. Functional Programming Languages. Chapter 14. Introduction

Functional Programming. Functional Programming Languages. Chapter 14. Introduction Functional Programming Languages Chapter 14 Introduction Functional programming paradigm History Features and concepts Examples: Lisp ML 1 2 Functional Programming Functional Programming Languages The

More information

MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS

MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS Systems of Equations and Matrices Representation of a linear system The general system of m equations in n unknowns can be written a x + a 2 x 2 + + a n x n b a

More information

Fast nondeterministic recognition of context-free languages using two queues

Fast nondeterministic recognition of context-free languages using two queues Fast nondeterministic recognition of context-free languages using two queues Burton Rosenberg University of Miami Abstract We show how to accept a context-free language nondeterministically in O( n log

More information

Botnet Tracking: Exploring a Root-Cause Methodology to Prevent Distributed Denial-of-Service Attacks

Botnet Tracking: Exploring a Root-Cause Methodology to Prevent Distributed Denial-of-Service Attacks Aachen Department of Computer Science Technical Report Botnet Tracking: Exploring a Root-Cause Methodology to Prevent Distributed Denial-of-Service Attacks Felix C. Freiling and Thorsten Holz and Georg

More information

If-Then-Else Problem (a motivating example for LR grammars)

If-Then-Else Problem (a motivating example for LR grammars) If-Then-Else Problem (a motivating example for LR grammars) If x then y else z If a then if b then c else d this is analogous to a bracket notation when left brackets >= right brackets: [ [ ] ([ i ] j,

More information

Load Balancing and Switch Scheduling

Load Balancing and Switch Scheduling EE384Y Project Final Report Load Balancing and Switch Scheduling Xiangheng Liu Department of Electrical Engineering Stanford University, Stanford CA 94305 Email: liuxh@systems.stanford.edu Abstract Load

More information

Compiler Construction

Compiler Construction Compiler Construction Lecture 1 - An Overview 2003 Robert M. Siegfried All rights reserved A few basic definitions Translate - v, a.to turn into one s own language or another. b. to transform or turn from

More information

Computer Architecture Syllabus of Qualifying Examination

Computer Architecture Syllabus of Qualifying Examination Computer Architecture Syllabus of Qualifying Examination PhD in Engineering with a focus in Computer Science Reference course: CS 5200 Computer Architecture, College of EAS, UCCS Created by Prof. Xiaobo

More information

Sharing Storage Using Dirty Vectors Bruce Christianson Laurence Dixon Steven Brown Abstract Consider a computation F with n inputs (independent variables) and m outputs (dependent variables), and suppose

More information

Chap 1. Introduction to Software Architecture

Chap 1. Introduction to Software Architecture Chap 1. Introduction to Software Architecture 1. Introduction 2. IEEE Recommended Practice for Architecture Modeling 3. Architecture Description Language: the UML 4. The Rational Unified Process (RUP)

More information

Chapter 6: Programming Languages

Chapter 6: Programming Languages Chapter 6: Programming Languages Computer Science: An Overview Eleventh Edition by J. Glenn Brookshear Copyright 2012 Pearson Education, Inc. Chapter 6: Programming Languages 6.1 Historical Perspective

More information

MetaGame: An Animation Tool for Model-Checking Games

MetaGame: An Animation Tool for Model-Checking Games MetaGame: An Animation Tool for Model-Checking Games Markus Müller-Olm 1 and Haiseung Yoo 2 1 FernUniversität in Hagen, Fachbereich Informatik, LG PI 5 Universitätsstr. 1, 58097 Hagen, Germany mmo@ls5.informatik.uni-dortmund.de

More information

PETRI NET BASED SUPERVISORY CONTROL OF FLEXIBLE BATCH PLANTS. G. Mušič and D. Matko

PETRI NET BASED SUPERVISORY CONTROL OF FLEXIBLE BATCH PLANTS. G. Mušič and D. Matko PETRI NET BASED SUPERVISORY CONTROL OF FLEXIBLE BATCH PLANTS G. Mušič and D. Matko Faculty of Electrical Engineering, University of Ljubljana, Slovenia. E-mail: gasper.music@fe.uni-lj.si Abstract: The

More information

Lexical analysis FORMAL LANGUAGES AND COMPILERS. Floriano Scioscia. Formal Languages and Compilers A.Y. 2015/2016

Lexical analysis FORMAL LANGUAGES AND COMPILERS. Floriano Scioscia. Formal Languages and Compilers A.Y. 2015/2016 Master s Degree Course in Computer Engineering Formal Languages FORMAL LANGUAGES AND COMPILERS Lexical analysis Floriano Scioscia 1 Introductive terminological distinction Lexical string or lexeme = meaningful

More information

Current Standard: Mathematical Concepts and Applications Shape, Space, and Measurement- Primary

Current Standard: Mathematical Concepts and Applications Shape, Space, and Measurement- Primary Shape, Space, and Measurement- Primary A student shall apply concepts of shape, space, and measurement to solve problems involving two- and three-dimensional shapes by demonstrating an understanding of:

More information

Tool Support for Inspecting the Code Quality of HPC Applications

Tool Support for Inspecting the Code Quality of HPC Applications Tool Support for Inspecting the Code Quality of HPC Applications Thomas Panas Dan Quinlan Richard Vuduc Center for Applied Scientific Computing Lawrence Livermore National Laboratory P.O. Box 808, L-550

More information

COMPUTER SCIENCE (5651) Test at a Glance

COMPUTER SCIENCE (5651) Test at a Glance COMPUTER SCIENCE (5651) Test at a Glance Test Name Computer Science Test Code 5651 Time Number of Questions Test Delivery 3 hours 100 selected-response questions Computer delivered Content Categories Approximate

More information

Automata and Formal Languages

Automata and Formal Languages Automata and Formal Languages Winter 2009-2010 Yacov Hel-Or 1 What this course is all about This course is about mathematical models of computation We ll study different machine models (finite automata,

More information

Chapter 7: Functional Programming Languages

Chapter 7: Functional Programming Languages Chapter 7: Functional Programming Languages Aarne Ranta Slides for the book Implementing Programming Languages. An Introduction to Compilers and Interpreters, College Publications, 2012. Fun: a language

More information

RN-Codings: New Insights and Some Applications

RN-Codings: New Insights and Some Applications RN-Codings: New Insights and Some Applications Abstract During any composite computation there is a constant need for rounding intermediate results before they can participate in further processing. Recently

More information

Georgia Department of Education Kathy Cox, State Superintendent of Schools 7/19/2005 All Rights Reserved 1

Georgia Department of Education Kathy Cox, State Superintendent of Schools 7/19/2005 All Rights Reserved 1 Accelerated Mathematics 3 This is a course in precalculus and statistics, designed to prepare students to take AB or BC Advanced Placement Calculus. It includes rational, circular trigonometric, and inverse

More information

Datavetenskapligt Program (kandidat) Computer Science Programme (master)

Datavetenskapligt Program (kandidat) Computer Science Programme (master) Datavetenskapligt Program (kandidat) Computer Science Programme (master) Wolfgang Ahrendt Director Datavetenskap (BSc), Computer Science (MSc) D&IT Göteborg University, 30/01/2009 Part I D&IT: Computer

More information

Mathematics Course 111: Algebra I Part IV: Vector Spaces

Mathematics Course 111: Algebra I Part IV: Vector Spaces Mathematics Course 111: Algebra I Part IV: Vector Spaces D. R. Wilkins Academic Year 1996-7 9 Vector Spaces A vector space over some field K is an algebraic structure consisting of a set V on which are

More information

Unified Lecture # 4 Vectors

Unified Lecture # 4 Vectors Fall 2005 Unified Lecture # 4 Vectors These notes were written by J. Peraire as a review of vectors for Dynamics 16.07. They have been adapted for Unified Engineering by R. Radovitzky. References [1] Feynmann,

More information

Compilers. Introduction to Compilers. Lecture 1. Spring term. Mick O Donnell: michael.odonnell@uam.es Alfonso Ortega: alfonso.ortega@uam.

Compilers. Introduction to Compilers. Lecture 1. Spring term. Mick O Donnell: michael.odonnell@uam.es Alfonso Ortega: alfonso.ortega@uam. Compilers Spring term Mick O Donnell: michael.odonnell@uam.es Alfonso Ortega: alfonso.ortega@uam.es Lecture 1 to Compilers 1 Topic 1: What is a Compiler? 3 What is a Compiler? A compiler is a computer

More information

Dynamic Cognitive Modeling IV

Dynamic Cognitive Modeling IV Dynamic Cognitive Modeling IV CLS2010 - Computational Linguistics Summer Events University of Zadar 23.08.2010 27.08.2010 Department of German Language and Linguistics Humboldt Universität zu Berlin Overview

More information

Computational Mathematics with Python

Computational Mathematics with Python Computational Mathematics with Python Basics Claus Führer, Jan Erik Solem, Olivier Verdier Spring 2010 Claus Führer, Jan Erik Solem, Olivier Verdier Computational Mathematics with Python Spring 2010 1

More information

Information and Communications Technology Courses at a Glance

Information and Communications Technology Courses at a Glance Information and Communications Technology Courses at a Glance Level 1 Courses ICT121 Introduction to Computer Systems Architecture This is an introductory course on the architecture of modern computer

More information

The countdown problem

The countdown problem JFP 12 (6): 609 616, November 2002. c 2002 Cambridge University Press DOI: 10.1017/S0956796801004300 Printed in the United Kingdom 609 F U N C T I O N A L P E A R L The countdown problem GRAHAM HUTTON

More information

24. The Branch and Bound Method

24. The Branch and Bound Method 24. The Branch and Bound Method It has serious practical consequences if it is known that a combinatorial problem is NP-complete. Then one can conclude according to the present state of science that no

More information

Lecture 1: Introduction

Lecture 1: Introduction Programming Languages Lecture 1: Introduction Benjamin J. Keller Department of Computer Science, Virginia Tech Programming Languages Lecture 1 Introduction 2 Lecture Outline Preview History of Programming

More information

Programming Languages

Programming Languages Programming Languages Programming languages bridge the gap between people and machines; for that matter, they also bridge the gap among people who would like to share algorithms in a way that immediately

More information

Krishna Institute of Engineering & Technology, Ghaziabad Department of Computer Application MCA-213 : DATA STRUCTURES USING C

Krishna Institute of Engineering & Technology, Ghaziabad Department of Computer Application MCA-213 : DATA STRUCTURES USING C Tutorial#1 Q 1:- Explain the terms data, elementary item, entity, primary key, domain, attribute and information? Also give examples in support of your answer? Q 2:- What is a Data Type? Differentiate

More information

C++ Programming Language

C++ Programming Language C++ Programming Language Lecturer: Yuri Nefedov 7th and 8th semesters Lectures: 34 hours (7th semester); 32 hours (8th semester). Seminars: 34 hours (7th semester); 32 hours (8th semester). Course abstract

More information

Nonlinear Algebraic Equations. Lectures INF2320 p. 1/88

Nonlinear Algebraic Equations. Lectures INF2320 p. 1/88 Nonlinear Algebraic Equations Lectures INF2320 p. 1/88 Lectures INF2320 p. 2/88 Nonlinear algebraic equations When solving the system u (t) = g(u), u(0) = u 0, (1) with an implicit Euler scheme we have

More information

Høgskolen i Narvik Sivilingeniørutdanningen STE6237 ELEMENTMETODER. Oppgaver

Høgskolen i Narvik Sivilingeniørutdanningen STE6237 ELEMENTMETODER. Oppgaver Høgskolen i Narvik Sivilingeniørutdanningen STE637 ELEMENTMETODER Oppgaver Klasse: 4.ID, 4.IT Ekstern Professor: Gregory A. Chechkin e-mail: chechkin@mech.math.msu.su Narvik 6 PART I Task. Consider two-point

More information

CA4003 - Compiler Construction

CA4003 - Compiler Construction CA4003 - Compiler Construction David Sinclair Overview This module will cover the compilation process, reading and parsing a structured language, storing it in an appropriate data structure, analysing

More information