Principles of Programming Languages

Size: px
Start display at page:

Download "Principles of Programming Languages"

Transcription

1 Principles f Prgramming Languages Slides by Dana Fisman based n bk by Mira Balaban and lecuture ntes by Michael Elhadad Dana Fisman Lessn 16 Type Inference System 1

2 Type Inference System In the previus lessn we intrduced a type inference algrithm fr the language L5, based n slving type equatins Tday we will see tw implementatins fr it: A literal applicatin f the algrithm An ptimized transfrmatin f the algrithm, relying n a mre cmpact data structure (resulting in less traversals f the prgram) Cde in L5-substitutin-adt.rkt L5-substitutin-adt-tests.rkt L5-tye-equatins.rkt L5-tye-equatins-tests.rkt

3 The Substitutin ADT A type substitutin s is a mapping frm a finite set f type variables t a finite set f type expressins s : TypeVars -> TypeExpr such that s(t) des nt refer t T. We define its ADT inductively as the disjint unin f tw disjint types: The empty substitutin Nn-empty substitutin sub( tvars: List(tvar), texp: List(Texp) )

4 The Substitutin ADT The functinal interface f the substitutin ADT includes: Value cnstructrs fr The empty substitutin Nn-empty substitutin sub( tvars, texp) Value cnstructr fr substitutin cmpsitin sub-cmbine( sub1, sub2) Bth sub and sub-cmbine return a nn-empty substitutin They als enfrce the key invariant f substitutin s(t) des nt refer t T This check is prefrmed by check-n-ccurrence! (tvar, texp) This prcess is called ccurrence check It is central t all unificatin based methds It is a cmputatinally expensive cmpnent f the algrithm

5 Occurrence Check The functin check-n-ccurrence! (tvar, texp) wrks as a standard AST traversal ;; Purpse: when attempting t bind tvar t te in a substitutin ;; check whether tvar ccurs in te. ;; Thrws errr if a circular reference is fund. ;; Signature: check-n-ccurrence!(tvar, te) ;; Type: [Tvar * Texp -> Symbl] ;; Pre-cnditins: Tvar is nt bund (define check-n-ccurrence! (lambda (tvar te) (letrec ((lp (lambda (te1) (cnd [(atmic-te? te1) #t] [(prc-te? te1) (fr-each lp (prc-te->param-tes te1)) (lp (prc-te->return-te te1)) 'prc-te-k] [(tvar? te1) (if (eq? (tvar->var te1) (tvar->var tvar)) (errr "Occurrence check errr - circular unificatin ~s ~s in ~s" tvar te exp) 'tvar-k)] [else (errr "Bad type expressin ~s ~s" te exp)])))) (lp te))))

6 Extending a type-substiutin An extended type-substitutin is defined (similarly t an extended env.) as a linked list f bindings (mapping vars t texp). When extending a type-substitutin, We first update the RHS f the current substitutin accrding t the new substitutin (if the variables in the new substitutin appear in the current) We check that there are n circularities

7 extend-sub ;; Purpse: Extend the substitutin sub with ;; an assignment f type-expressin texp t type variable var. ;; First update the current RHS in the substitutins which ;; refer t var with texp ;; Then add the pair (var, texp) t the updated substitutin. ;; Check that n-circular references result. ;; Signature: extend-sub(sub,var,texp) ;; Type: [Sub * TVar * TExp -> Sub] ;; Calls t make-sub d the ccur-check (define extend-sub (lambda (sub var texp) (if (empty-sub? sub) (make-sub (list var) (list texp)) (let ([vars (sub->variables sub)] [texps (sub->tes sub)] [new-sub (make-sub (list var) (list texp))]) (let ([updated-tes (map (lambda (sub-texp) (sub-apply new-sub sub-texp)) texps)]) (if (member var vars) (make-sub vars updated-tes) (make-sub (cns var vars) (cns texp updated-tes))))))))

8 sub-cmbine The prcedure sub-cmbine can nw be implemented by calling extend-sub n each binding ne by ne ;; Signature: sub-cmbine(sub1,sub2) ;; Purpse: Returns the cmpsitin f substitutins s.t.: ;; (sub-apply result te) === (sub-apply sub2 (sub-apply sub1 te)) ;; ;; Type: [Sub * Sub -> Sub] (define sub-cmbine (lambda (sub1 sub2) (cnd [(empty-sub? sub1) sub2] [(empty-sub? sub2) sub1] [else (letrec ((cmbine (lambda (sub vars tes) (if (empty? vars) sub (cmbine (extend-sub sub (car vars) (car tes)) (cdr vars) (cdr tes)))))) (cmbine sub1 (sub->variables sub2) (sub->tes sub2)))])))

9 The Equatin Mdule The type equatins mdule fllws the stages f the algrithm: 1. Rename bund variables in given expressin e. 2. Assign type variables t all sub-expressins f e. 3. Cnstruct type equatins. 4. Slve the equatins.

10 Assigning Type Variables The algrithm cllects all type variable assignments int a pl cnsisting f a list f pairs(exp, Tvar) fr every nde in the expressin AST. Whenever a nde in the AST is reached, a type variable is allcated fr it as fllws: nde is nt var-ref nr var-decl: a fresh type-variable is allcated fr it, and the crrespnding binding is added t the pl nde is var-decl: If it cnsists f type anntatin (given by the prgrammer) the crrespnding binding is added t the pl O.w. a fresh type variable is allcated fr it and the crrespnding binding is added t the pl nde is var-ref: We assciated with it the already assigned variable

11 L5-expr->pl ;; Purpse: Traverse the abstract syntax tree L5-exp ;; and cllect all sub-expressins int a Pl f fresh type variables. ;; Type: [L5-exp -> Pl] ;; PstCnditin: every nde in the AST is mapped t a type variable ;; - while preserving scping relatins (define L5-exp->pl (lambda (exp) (letrec ((findvarlist (lambda (exp var-pl) (cnd [(null? exp) (make-empty-pl)] [(var-decl? exp) (extend-pl-var-decl exp var-pl)] [(cexp-atmic? exp) (extend-pl exp var-pl)] [(prc-exp? exp) (extend-pl exp (map-pl findvarlist (append (prc-exp->params exp) (prc-exp->bdy exp)) var-pl))] [(cexp-cmpsite? exp) (extend-pl exp (map-pl findvarlist (cexp-cmpsite->cmpnents exp) var-pl))] [else (errr 'findvarlist "Bad L5 exp ~s" exp)])))) (findvarlist exp (make-empty-pl)))))

12 Generating Equatins Next step: transfrm the current pl which is a list f bindings (expr, Tvar) int a list f equatins (lhs, rhs) Fr each nde, we invke make-equatin-frm-exp which cnstructs a type equatin accrding t the type f the nde fr instance if the nde is num-expr it derives the equatin Tnum-expr = Number if the nde is prc-expr it derives an equatin f the frm etc. Tprc-exp = [T1*.. * Tn -> Tr]

13 make-equatin-frm-exp (1) ;; Signature: make-equatin-frm-exp(exp, pl) ;; Purpse: Return a single equatin ;; Type: [Cexp * Pl -> Equatin] ;; Pre-cnditin: exp is a member f pl (define make-equatin-frm-exp (lambda (exp pl) (letrec ([get-tvar-f-exp (lambda (exp) (secnd (assc exp pl)))]) (cnd ;; The type f prcedure is (T1 *... * Tn -> Te) ;; where Te is the type f the last exp in the bdy f the prc. ;; and Ti is the type f each f the parameters. ;; N need t traverse the ther bdy expressins - they will be ;; traversed by the verall lp f pl->equatins [(prc-exp? exp) (let ([left (get-tvar-f-exp exp)] [right (make-prc-te (map var-decl->texp (prc-exp->params exp)) (get-tvar-f-exp (last (prc-exp->bdy exp))))]) (make-equatin left right))] ;; An applicatin must respect the type f its peratr ;; Type(Operatr) = [T1 *.. * Tn -> Te] ;; Type(Applicatin) = Te ;; e : (f Arg1... Argn) ===> Tf = [T1 *... * Tn -> Te] [(app-exp? exp) (let ([left (get-tvar-f-exp (app-exp->ratr exp))] ; Tf [right (make-prc-te (map get-tvar-f-exp (app-exp->rands exp)) (get-tvar-f-exp exp))]) ; Te (make-equatin left right))]...

14 make-equatin-frm-exp (2)... ;; The type f a number is Number [(num-exp? exp) (let ([left (get-tvar-f-exp exp)] [right (typef-num-exp exp)]) (make-equatin left right))] ;; The type f a blean is Blean [(bl-exp? exp) (let ([left (get-tvar-f-exp exp)] [right (typef-bl-exp exp)]) (make-equatin left right))] ;; The type f a primitive prcedure is given by the primitive. [(prim-p? exp) (let ([left (get-tvar-f-exp exp)] [right (typef-prim-p exp)]) (make-equatin left right))] ;; let-exp? ;; letrec-exp? [else (errr 'make-equatin "Bad expressin" exp)]))))

15 Slving the Equatins The slving algrithm we have seen in the previus lessn is implemented by prcedure slve (equatins, substitutin). Repeat Return 1. Apply 2. Bth atmic types? 3. One a variable? 4. Circular? 5. Bth cmpsite f same type? The returned substitutin sub satisfies the fllwing prperty: Fr any equatin eq = (lhs, rhs) in equatins lhs sub = rhs sub Thus, it essentially cmputes the unifier f all equatins!

16 Alg. fr Slving Equatins Input: Equatins - a set f type equatins Output: A type substitutin r FAIL Initializatin: substitutin := {} Repeat fr each equatin [te1 = te2] in Equatins : 1. Apply the current substitutin t the equatin (replace vars by their substituting expressins). te1 = te1 substitutin te2 = te2 substitutin equatin := [ te1 = te2 ] 2. Bth sides f the eq. te1 and te2 are atmic types? If te1 te2 utput FAIL. Else, d nthing. 3. One side f the eq. te1 r te2 is a variable? Say, te1 = T. Apply the substitutin t the equatin: equatin = [ T = te2 ] Add the equatin t the substitutin: substitutin := substitutin {T = te2 } 4. A circular substitutin ccurred? Output FAIL. 5. Bth side are cmpsite with the same type cnstructr? Split int equatins between crrespnding cmpnents and add t the set f Equatins Return substitutin

17 slve Repeat Return 1. Apply 2. Bth atmic types? 3. One a variable? 4. Circular? 5. Bth cmpsite f same type? ;; Signature: slve(equatins, substitutin) ;; Purpse: Slve the equatins, starting frm a given substitutin. ;; Returns the resulting substitutin, r errr, if nt slvable ;; Type: [List(Equatin)*Substitutin -> Substitutin] (define slve (lambda (equatins sub) (if (empty? equatins) sub (let ([eq (make-equatin (sub-apply sub (equatin->left (car equatins))) (sub-apply sub (equatin->right (car equatins))))])...

18 slve Repeat 1. Apply 2. Bth atmic types? 3. One a variable? Circular? (letrec ([slve-var-eq Return (lambda (var-part ther-part) (slve (cdr equatins) (sub-cmbine sub (make-sub (list var-part) (list ther-part)))))] [bth-sides-atmic? (lambda (eq) (and (atmic-te? (equatin->left eq)) (atmic-te? (equatin->right eq))))] [handle-bth-sides-atmic (lambda (eq) (if (equal-atmic-te? (equatin->left eq) (equatin->right eq)) (slve (cdr equatins) sub) (errr 'slve "equatin cntains unequal atmic types: ~e" eq)))]) Bth cmpsite f same type?

19 slve case #3 : ne is a var case #2 : bth atmic case #5 : cmpsite f same type Repeat 1. Apply 2. Bth atmic types? 3. One a variable? 4. Circular?... Return (cnd [(tvar? (equatin->left eq)) (slve-var-eq (equatin->left eq) (equatin->right eq))] [(tvar? (equatin->right eq)) (slve-var-eq (equatin->right eq) (equatin->left eq))] [(bth-sides-atmic? eq) (handle-bth-sides-atmic eq)] [(and (cmpsite-te? (equatin->left eq)) 5. Bth cmpsite f same type? (cmpsite-te? (equatin->right eq)) (unifyable-structure eq)) (slve (append (cdr equatins) (split-equatin eq)) sub)] [else (errr 'slve "equatin cntains incmpatible type expressin: ~s" eq)]))))))

20 Terminatin Argument Is the algrithm guaranteed t terminate? The bdy f the lp prcesses ne equatin in each step But sme steps add equatins. Repeat Return 1. Apply 2. Bth atmic types? 3. One a variable? 4. Circular? 5. Bth cmpsite f same type? Let s take a clse lk: Cases #2, #3: ne equatins is cnsumed, and substitutin becmes mre cmplex Case #4: algrithm halts Case #5: equatins are added. Suppse the depth f the AST fr the tw sides f the equatins is D. And that the number f children f the rt f the AST is n. Then we add n equatins, n expressins with AST f depth at mst D-1.

21 Terminatin Argument Let E be the set f Equatins. We assciate with E a measure (N,D) s.t. N is the number f equatins in E and D is the maximum height f the AST appearing in any equatin in E Repeat Return 1. Apply 2. Bth atmic types? 3. One a variable? 4. Circular? 5. Bth cmpsite f same type? If the current measure f E is (N,D) Then the measure f E after ne iteratin f the lp is either (N-1, D) r (N+n, D-1) When the current measure is (N,1) we cannt apply case #5 because nne f the equatins is cmpsite. Thus, the measure f the next step is necessarily (N-1,1). Hence, the measure will eventually reach (0,1) and the alg. will halt.

22 Putting all steps tgether Recall the verall stages f the algrithm: 1. Rename bund variables in given expressin e. 2. Assign type variables t all sub-expressins f e. 3. Cnstruct type equatins. 4. Slve the equatins.

23 infer-type ;; Signature: infer-type(exp) ;; Precnditin: assumes all variables names are distinct ;; Purpse: Infer the type f a L5 expressin using the equatins methd ;; Type: [Exp -> Texp] ;; Example: (unparse-texp (infer-type (parsel5 '(lambda (f x) (f (f x)))))) ;; ==> '((T_1 -> T_1) * T_1 -> T_1) (define infer-type (lambda (exp) (let* ([pl (L5-exp->pl exp)] [equatins (pl->equatins pl)] [sub (slve-equatins equatins)] [texp (secnd (assc exp pl))]) (if (member texp (sub->variables sub)) (sub->exp-f-var sub texp) texp))))

24 Verify-te-f-expr The generatin f fresh type variables makes it hard t verify t expressins are the same ;; Signature: verify-te-f-expr(expr te) ;; Purpse: (1) Map type-vars t sub expressins in expr (expr-tvars-list). ;; (2) Let tvar-f-expr be the type-var assciated with expr. ;; (3) Generate type equatins based n the expr-tvar map. ;; (4) Slve the equatins. ;; (5) Find the type-expressin assciated with tvar-f-expr. ;; (6) See if it is equivalent t the given expressin, expr. ;; (define verify-te-f-expr (lambda (exp tec) (let* ([expr (parsel5 exp)] [te (parse-texp tec)] [pl (L5-exp->pl expr)] [equatins (pl->equatins pl)] [slve-sub (slve-equatins equatins)] [tvar-f-expr (secnd (assc expr pl))] [type-f-expr (sub-apply slve-sub tvar-f-expr)]) (equivalent-tes? te type-f-expr))))

25 Type Inference with Direct Unificatin The described implementatin fllws the type equatin algrithm literally It explicitly manipulates substitutin data structures, and type equatins It cnstructs a map f expressins t type variables t ensure exhaustive traversal f the given prgram We nw present an ptimized versin, relying n a mdified representatin f the type variable data structure. The same alg. is implemented withut creating explicit data structure fr the pl, the equatins and the substitutins it is mre efficient memry-wise and requires less traversals f the data structures the peratins prefrmed eagerly in the first implementatin turn int lazy peratins

26 Type Variable with ne-way assignment The new type variable ADT assciates a bx with the given type variable Tv The bx initially has the value #f When we derive a cnstraint that this variable shuld be bund t a certain type expressin Te, we update the bx value t Te We can nly update the bx value nce Technically we say the bx is empty if its value is #f and nn-empty therwise S we can nly update the bx if it is empty Cde in L5-ast.rkt L5-typeinfernece.rkt L5-typeinfernece-test.rkt

27 Type Variable with ne-way assignment ;; Purpse: tvar value cnstructr ;; Type: [Symbl -> tvar] (define make-tvar (lambda (var) (list 'tvar var (bx #f)))) ;; Type: [Tvar * Tvar -> Blean] (define tvar-eq? (lambda (tvar1 tvar2) (eq? (tvar->var tvar1) (tvar->var tvar2)))) (define tvar->cntents (lambda (tvar) (unbx (third tvar)))) (define tvar-nn-empty? (lambda (tvar) (nt (eq? (tvar->cntents tvar) #f))))

28 Type Variable with ne-way assignment ;; Type: [TVar * Texp -> Vid] ;; Pre-cnditin: Tvar is empty ;; Pst-cnditin: Tvar is nn-empty (define tvar-set-cntents! (lambda (tvar val) (set-bx! (third tvar) val)))

29 Implicit graph We will ften set the value f a Tvar T1 t anther Tvar T2 Which can reference anther Tvar T3 and s n We thus have an implicit representatin f a graph f tvar references We need a methd t traverse this implicit graph ;; Purpse: find the reference f a tvar by fllwing ;; the chain f substitutins. ;; Signature: tvar-deref(tvar) ;; Type: [Texp -> Texp] (define tvar-deref (lambda (tvar) (cnd ([nt (tvar? tvar)) tvar] [(tvar-nn-empty? tvar) (tvar-deref (tvar->cntents tvar))] [else tvar])))

30 Optimized Type Inference Alg. Idea: wrks like the type checking alg. Recall that the type checking alg. assumes the expressin is fully anntated, and traverses the parse tree exhaustively fr each nde checking if its type is kay accrding t the nde type (prc-expr, if-expr, ) But when checking that tw types are equivalent Instead f insisting they are exactly the same Trying t make them the same, i.e. try t find a unifier Essentially we change check-equal-type t d unificatin rather than a shallw equality check

31 check-equal-type! ;; Purpse: Make type expressins equivalent by deriving a unifier ;; Thrws an errr if the types are nt unifiable. ;; Exp is nly passed fr dcumentatin purpses. ;; Type: [TE * TE * Exp -> Symbl] (define check-equal-type! (lambda (te1 te2 exp) (cnd [(and (tvar? te1) (tvar? te2)) (if (eq? (tvar->var te1) (tvar->var te2)) 'same-tvars-k (check-tvar-equal-type! te1 te2 exp))] [(tvar? te1) (check-tvar-equal-type! te1 te2 exp)] [(tvar? te2) (check-tvar-equal-type! te2 te1 exp)] [(and (atmic-te? te1) (atmic-te? te2)) (if (nt (eq? (atmic-te->name te1) (atmic-te->name te2))) (errr "Incmpatible atmic types " te1 te2 exp) 'atmic-k)] [(and (prc-te? te1) (prc-te? te2)) (let ([args-te1 (prc-te->param-tes te1)] [args-te2 (prc-te->param-tes te2)] [return-te1 (prc-te->return-te te1)] [return-te2 (prc-te->return-te te2)]) (if (nt (= (length args-te1) (length args-te2))) (errr "Wrng number f arguments " te1 te2 exp) 'args-number-k) (fr-each (lambda (rand1 rand2) (check-equal-type! rand1 rand2 exp)) args-te1 args-te2) (check-equal-type! return-te1 return-te2 exp) 'prc-tes-k)] [else (errr "Bad type expressin " te1 te2 exp)])))

32 check-tvar-equal-type! ;; Purpse: check that a type variable matches a type expressin ;; Exp is nly passed fr dcumentatin purpses. ;; Signature: check-tvar-equal-type(tvar, te, exp) ;; Type: [Tvar * Texp * Exp -> Symbl] ;; Pre-cnditins: Tvar is nt bund (define check-tvar-equal-type! (lambda (tvar te exp) (if (tvar-nn-empty? tvar) (check-equal-type! (tvar->cntents tvar) te exp) (let ([v1 (check-n-ccurrence! tvar te exp)]) (tvar-set-cntents! tvar te) 'tvar-set-k))))

33 check-n-ccurrence! ;; Purpse: when attempting t bind tvar t te ;; check whether tvar ccurs in te. ;; Thrws errr if a circular reference is fund. ;; Exp is nly passed fr dcumentatin purpses. ;; Signature: check-n-ccurrence!(tvar, te, exp) ;; Type: [Tvar * Texp * Exp -> Symbl] ;; Pre-cnditins: Tvar is nt bund (define check-n-ccurrence! (lambda (tvar te exp) (letrec ((lp (lambda (te1) (cnd [(atmic-te? te1) #t] [(prc-te? te1) (fr-each lp (prc-te->param-tes te1)) (lp (prc-te->return-te te1)) 'prc-te-k] [(tvar? te1) (if (eq? (tvar->var te1) (tvar->var tvar)) (errr "Occurrence check errr circular unificatin" tvar te exp) 'tvar-k)] [else (errr "Bad type expressin" te exp)])))) (lp te))))

34 Type Inference Alg. The ptimized type inference alg. is almst identical t the type checking alg. Except that check-type-equal prefrms unificatin instead f a shallw equality check In cmparisn t the first implementatin f type inference alg. we presented There is n explicit pl representatin Instead we pre-allcate type variables Applicatin ndes and prcedure ndes are nt explicitly anntated Instead when they are encuntered, the type equatin is eagerly slved by invking check-equal-type Substitutins are represented implicitly in the graph f tvar references

35 Summary We surveyed 2 implementatins f the Type Inference algrithm: An explicit representatin f type equatins and substitutins. An ptimized implementatin relying n ne-way type variables. Bth implementatins rely critically n the ccurcheck mechanism t avid creating circular substitutins.

36 Summary The type equatin algrithm perates in 3 steps: Map all sub-expressins in the prgram t type variables and stre this mapping in a pl data structure. Traverse the pl and apply the typing rules f the prgramming language t derive type equatins fr each applicatin and prcedure ndes in the AST f the prgram. Slve the resulting type equatins system using the unificatin algrithm which cmputes a substitutin fr the whle prgram. The direct unificatin implementatin f this algrithm relies n ne-way TVar data structure and exhaustive traversal f the AST. Each time an applicatin r prcedure ndes are met, the crrespnding type equatin is eagerly slved by assigning type variables t the crrespnding type expressins.

Principles of Programming Languages

Principles of Programming Languages Principles of Programming Languages Lesson 14 Type Checking Collaboration and Management Dana Fisman www.cs.bgu.ac.il/~ppl172 1 Type Checking We return to the issue of type safety we discussed informally,

More information

Eastern Mediterranean University School of Computing and Technology Information Technology Lecture2 Functions

Eastern Mediterranean University School of Computing and Technology Information Technology Lecture2 Functions Eastern Mediterranean University Schl f Cmputing and Technlgy Infrmatin Technlgy Lecture2 Functins User Defined Functins Why d we need functins? T make yur prgram readable and rganized T reduce repeated

More information

Design Patterns. Collectional Patterns. Session objectives 11/06/2012. Introduction. Composite pattern. Iterator pattern

Design Patterns. Collectional Patterns. Session objectives 11/06/2012. Introduction. Composite pattern. Iterator pattern Design Patterns By Võ Văn Hải Faculty f Infrmatin Technlgies HUI Cllectinal Patterns Sessin bjectives Intrductin Cmpsite pattern Iteratr pattern 2 1 Intrductin Cllectinal patterns primarily: Deal with

More information

Data Structure Interview Questions

Data Structure Interview Questions Data Structure Interview Questins A list f tp frequently asked Data Structure interview questins and answers are given belw. 1) What is Data Structure? Explain. Data structure is a way that specifies hw

More information

Principles of Programming Languages

Principles of Programming Languages Principles of Programming Languages Slides by Dana Fisman based on book by Mira Balaban and lecuture notes by Michael Elhadad Lesson 15 Type Inference Collaboration and Management Dana Fisman www.cs.bgu.ac.il/~ppl172

More information

LAB 7 (June 29/July 4) Structures, Stream I/O, Self-referential structures (Linked list) in C

LAB 7 (June 29/July 4) Structures, Stream I/O, Self-referential structures (Linked list) in C LAB 7 (June 29/July 4) Structures, Stream I/O, Self-referential structures (Linked list) in C Due: July 9 (Sun) 11:59 pm 1. Prblem A Subject: Structure declaratin, initializatin and assignment. Structure

More information

UiPath Automation. Walkthrough. Walkthrough Calculate Client Security Hash

UiPath Automation. Walkthrough. Walkthrough Calculate Client Security Hash UiPath Autmatin Walkthrugh Walkthrugh Calculate Client Security Hash Walkthrugh Calculate Client Security Hash Start with the REFramewrk template. We start ff with a simple implementatin t demnstrate the

More information

Using SPLAY Tree s for state-full packet classification

Using SPLAY Tree s for state-full packet classification Curse Prject Using SPLAY Tree s fr state-full packet classificatin 1- What is a Splay Tree? These ntes discuss the splay tree, a frm f self-adjusting search tree in which the amrtized time fr an access,

More information

DECISION CONTROL CONSTRUCTS IN JAVA

DECISION CONTROL CONSTRUCTS IN JAVA DECISION CONTROL CONSTRUCTS IN JAVA Decisin cntrl statements can change the executin flw f a prgram. Decisin cntrl statements in Java are: if statement Cnditinal peratr switch statement If statement The

More information

UiPath Automation. Walkthrough. Walkthrough Calculate Client Security Hash

UiPath Automation. Walkthrough. Walkthrough Calculate Client Security Hash UiPath Autmatin Walkthrugh Walkthrugh Calculate Client Security Hash Walkthrugh Calculate Client Security Hash Start with the REFramewrk template. We start ff with a simple implementatin t demnstrate the

More information

CS1150 Principles of Computer Science Midterm Review

CS1150 Principles of Computer Science Midterm Review CS1150 Principles f Cmputer Science Midterm Review Yanyan Zhuang Department f Cmputer Science http://www.cs.uccs.edu/~yzhuang CS1150 UC. Clrad Springs Office hurs 10/15, Mnday, 12:05 12:50pm 10/17, Wednesday

More information

Chapter 6: Lgic Based Testing LOGIC BASED TESTING: This unit gives an indepth verview f lgic based testing and its implementatin. At the end f this unit, the student will be able t: Understand the cncept

More information

Iteration Part 2. Review: Iteration [Part 1] Flow charts for two loop constructs. Review: Syntax of loops. while continuation_condition : statement1

Iteration Part 2. Review: Iteration [Part 1] Flow charts for two loop constructs. Review: Syntax of loops. while continuation_condition : statement1 Review: Iteratin [Part 1] Iteratin Part 2 CS111 Cmputer Prgramming Department f Cmputer Science Wellesley Cllege Iteratin is the repeated executin f a set f statements until a stpping cnditin is reached.

More information

B Tech Project First Stage Report on

B Tech Project First Stage Report on B Tech Prject First Stage Reprt n GPU Based Image Prcessing Submitted by Sumit Shekhar (05007028) Under the guidance f Prf Subhasis Chaudhari 1. Intrductin 1.1 Graphic Prcessr Units A graphic prcessr unit

More information

- Replacement of a single statement with a sequence of statements(promotes regularity)

- Replacement of a single statement with a sequence of statements(promotes regularity) ALGOL - Java and C built using ALGOL 60 - Simple and cncise and elegance - Universal - Clse as pssible t mathematical ntatin - Language can describe the algrithms - Mechanically translatable t machine

More information

1 Binary Trees and Adaptive Data Compression

1 Binary Trees and Adaptive Data Compression University f Illinis at Chicag CS 202: Data Structures and Discrete Mathematics II Handut 5 Prfessr Rbert H. Slan September 18, 2002 A Little Bttle... with the wrds DRINK ME, (r Adaptive data cmpressin

More information

Querying Data with Transact SQL

Querying Data with Transact SQL Querying Data with Transact SQL Curse Cde: 20761 Certificatin Exam: 70-761 Duratin: 5 Days Certificatin Track: MCSA: SQL 2016 Database Develpment Frmat: Classrm Level: 200 Abut this curse: This curse is

More information

It has hardware. It has application software.

It has hardware. It has application software. Q.1 What is System? Explain with an example A system is an arrangement in which all its unit assemble wrk tgether accrding t a set f rules. It can als be defined as a way f wrking, rganizing r ding ne

More information

Extensible Query Processing in Starburst

Extensible Query Processing in Starburst Extensible Query Prcessing in Starburst Laura M. Haas, J.C. Freytag, G.M. Lhman, and H.Pirahesh IBM Almaden Research Center CS848 Instructr: David Tman Presented By Yunpeng James Liu Outline Intrductin

More information

Java Programming Course IO

Java Programming Course IO Java Prgramming Curse IO By Võ Văn Hải Faculty f Infrmatin Technlgies Industrial University f H Chi Minh City Sessin bjectives What is an I/O stream? Types f Streams Stream class hierarchy Cntrl flw f

More information

To start your custom application development, perform the steps below.

To start your custom application development, perform the steps below. Get Started T start yur custm applicatin develpment, perfrm the steps belw. 1. Sign up fr the kitewrks develper package. Clud Develper Package Develper Package 2. Sign in t kitewrks. Once yu have yur instance

More information

C++ Reference Material Programming Style Conventions

C++ Reference Material Programming Style Conventions C++ Reference Material Prgramming Style Cnventins What fllws here is a set f reasnably widely used C++ prgramming style cnventins. Whenever yu mve int a new prgramming envirnment, any cnventins yu have

More information

Infrastructure Series

Infrastructure Series Infrastructure Series TechDc WebSphere Message Brker / IBM Integratin Bus Parallel Prcessing (Aggregatin) (Message Flw Develpment) February 2015 Authr(s): - IBM Message Brker - Develpment Parallel Prcessing

More information

CS1150 Principles of Computer Science Methods

CS1150 Principles of Computer Science Methods CS1150 Principles f Cmputer Science Methds Yanyan Zhuang Department f Cmputer Science http://www.cs.uccs.edu/~yzhuang CS1150 UC. Clrad Springs Opening Prblem Find the sum f integers frm 1 t 10, frm 20

More information

CS5530 Mobile/Wireless Systems Swift

CS5530 Mobile/Wireless Systems Swift Mbile/Wireless Systems Swift Yanyan Zhuang Department f Cmputer Science http://www.cs.uccs.edu/~yzhuang UC. Clrad Springs cat annunce.txt_ imacs remte VNC access VNP: http://www.uccs.edu/itservices/services/netwrk-andinternet/vpn.html

More information

Chapter 2 Basic Operations

Chapter 2 Basic Operations Chapter 2 Basic Operatins Lessn B String Operatins 10 Minutes Lab Gals In this Lessn, yu will: Learn hw t use the fllwing Transfrmatins: Set Replace Extract Cuntpattern Split Learn hw t apply certain Transfrmatins

More information

Programming Project: Building a Web Server

Programming Project: Building a Web Server Prgramming Prject: Building a Web Server Submissin Instructin: Grup prject Submit yur cde thrugh Bb by Dec. 8, 2014 11:59 PM. Yu need t generate a simple index.html page displaying all yur grup members

More information

The Java if statement is used to test the condition. It checks Boolean condition: true or false. There are various types of if statement in java.

The Java if statement is used to test the condition. It checks Boolean condition: true or false. There are various types of if statement in java. Java If-else Statement The Java if statement is used t test the cnditin. It checks Blean cnditin: true r false. There are varius types f if statement in java. if statement if-else statement if-else-if

More information

Lesson 4 Advanced Transforms

Lesson 4 Advanced Transforms Lessn 4 Advanced Transfrms Chapter 4B Extract, Split and replace 10 Minutes Chapter Gals In this Chapter, yu will: Understand hw t use the fllwing transfrms: Replace Extract Split Chapter Instructins YOUR

More information

Relational Operators, and the If Statement. 9.1 Combined Assignments. Relational Operators (4.1) Last time we discovered combined assignments such as:

Relational Operators, and the If Statement. 9.1 Combined Assignments. Relational Operators (4.1) Last time we discovered combined assignments such as: Relatinal Operatrs, and the If Statement 9/18/06 CS150 Intrductin t Cmputer Science 1 1 9.1 Cmbined Assignments Last time we discvered cmbined assignments such as: a /= b + c; Which f the fllwing lng frms

More information

Scatter Search And Bionomic Algorithms For The Aircraft Landing Problem

Scatter Search And Bionomic Algorithms For The Aircraft Landing Problem Scatter Search And Binmic Algrithms Fr The Aircraft Landing Prblem J. E. Beasley Mathematical Sciences Brunel University Uxbridge UB8 3PH United Kingdm http://peple.brunel.ac.uk/~mastjjb/jeb/jeb.html Abstract:

More information

Lab 1 - Calculator. K&R All of Chapter 1, 7.4, and Appendix B1.2

Lab 1 - Calculator. K&R All of Chapter 1, 7.4, and Appendix B1.2 UNIVERSITY OF CALIFORNIA, SANTA CRUZ BOARD OF STUDIES IN COMPUTER ENGINEERING CMPE13/L: INTRODUCTION TO PROGRAMMING IN C SPRING 2012 Lab 1 - Calculatr Intrductin In this lab yu will be writing yur first

More information

Mapping between DFDL 1.0 Infoset and XML Data Model

Mapping between DFDL 1.0 Infoset and XML Data Model Stephen M Hansn (IBM) Mapping between DFDL 1.0 Infset and XML Data Mdel Status f This Dcument This wrking draft dcument prvides infrmatin t the OGF cmmunity n the Data Frmat Descriptin Language (DFDL)

More information

In Java, we can use Comparable and Comparator to compare objects.

In Java, we can use Comparable and Comparator to compare objects. Pririty Queues CS231 - Fall 2017 Pririty Queues In a pririty queue, things get inserted int the queue in rder f pririty Pririty queues cntain entries = {keys, values /** Interface fr a key- value pair

More information

CS1150 Principles of Computer Science Methods

CS1150 Principles of Computer Science Methods CS1150 Principles f Cmputer Science Methds Yanyan Zhuang Department f Cmputer Science http://www.cs.uccs.edu/~yzhuang CS1150 UC. Clrad Springs Passing Parameters public static vid nprintln(string message,

More information

To over come these problems collections are recommended to use. Collections Arrays

To over come these problems collections are recommended to use. Collections Arrays Q1. What are limitatins f bject Arrays? The main limitatins f Object arrays are These are fixed in size ie nce we created an array bject there is n chance f increasing r decreasing size based n ur requirement.

More information

Creating a TES Encounter/Transaction Entry Batch

Creating a TES Encounter/Transaction Entry Batch Creating a TES Encunter/Transactin Entry Batch Overview Intrductin This mdule fcuses n hw t create batches fr transactin entry in TES. Charges (transactins) are entered int the system in grups called batches.

More information

Simple Identity Management Profile

Simple Identity Management Profile Simple Identity Management Prfile Dcument Number: DCIM1055 Dcument Type: Specificatin Dcument Status: Published Dcument Language: E Date: 2017-07-11 Versin: 4.0.0 Versin 4.0.0 1 This prfile is fr infrmatinal

More information

Contents: Module. Objectives. Lesson 1: Lesson 2: appropriately. As benefit of good. with almost any planning. it places on the.

Contents: Module. Objectives. Lesson 1: Lesson 2: appropriately. As benefit of good. with almost any planning. it places on the. 1 f 22 26/09/2016 15:58 Mdule Cnsideratins Cntents: Lessn 1: Lessn 2: Mdule Befre yu start with almst any planning. apprpriately. As benefit f gd T appreciate architecture. it places n the understanding

More information

Due Date: Lab report is due on Mar 6 (PRA 01) or Mar 7 (PRA 02)

Due Date: Lab report is due on Mar 6 (PRA 01) or Mar 7 (PRA 02) Lab 3 Packet Scheduling Due Date: Lab reprt is due n Mar 6 (PRA 01) r Mar 7 (PRA 02) Teams: This lab may be cmpleted in teams f 2 students (Teams f three r mre are nt permitted. All members receive the

More information

CS1150 Principles of Computer Science Final Review

CS1150 Principles of Computer Science Final Review CS1150 Principles f Cmputer Science Final Review Yanyan Zhuang Department f Cmputer Science http://www.cs.uccs.edu/~yzhuang CS1150 UC. Clrad Springs Numerical Data Types Name Range Strage Size byte 2 7

More information

Groovy Programming Language. Duration : 5 days. Groovy Getting Started. Groovy Big Picture. Groovy Language Spec. Syntax.

Groovy Programming Language. Duration : 5 days. Groovy Getting Started. Groovy Big Picture. Groovy Language Spec. Syntax. Grvy Prgramming Language Duratin : 5 days Grvy Getting Started Dwnlad Grvy Setting up Grvy Installing Grvy grvyc the Grvy cmpiler grvysh the Grvy cmmand -like shell grvycnsle the Grvy Swing cnsle IDE integratin

More information

CS1150 Principles of Computer Science Boolean, Selection Statements (Part II)

CS1150 Principles of Computer Science Boolean, Selection Statements (Part II) CS1150 Principles f Cmputer Science Blean, Selectin Statements (Part II) Yanyan Zhuang Department f Cmputer Science http://www.cs.uccs.edu/~yzhuang CS1150 Review What s the scientific ntatin f 9,200,000?

More information

Because this underlying hardware is dedicated to processing graphics commands, OpenGL drawing is typically very fast.

Because this underlying hardware is dedicated to processing graphics commands, OpenGL drawing is typically very fast. The Open Graphics Library (OpenGL) is used fr visualizing 2D and 3D data. It is a multipurpse pen-standard graphics library that supprts applicatins fr 2D and 3D digital cntent creatin, mechanical and

More information

TRAINING GUIDE. Overview of Lucity Spatial

TRAINING GUIDE. Overview of Lucity Spatial TRAINING GUIDE Overview f Lucity Spatial Overview f Lucity Spatial In this sessin, we ll cver the key cmpnents f Lucity Spatial. Table f Cntents Lucity Spatial... 2 Requirements... 2 Setup... 3 Assign

More information

D e s i g n S c r i p t L a n g u a g e S u m m a r y P a g e 1

D e s i g n S c r i p t L a n g u a g e S u m m a r y P a g e 1 D e s i g n S c r i p t L a n g u a g e S u m m a r y P a g e 1 This manual is designed fr tw types f readers. First, thse wh want t make an initial fray int text based prgramming and wh may be currently

More information

Ascii Art Capstone project in C

Ascii Art Capstone project in C Ascii Art Capstne prject in C CSSE 120 Intrductin t Sftware Develpment (Rbtics) Spring 2010-2011 Hw t begin the Ascii Art prject Page 1 Prceed as fllws, in the rder listed. 1. If yu have nt dne s already,

More information

Last time: search strategies

Last time: search strategies Last time: search strategies Uninfrmed: Use nly infrmatin available in the prblem frmulatin Breadth-first Unifrm-cst Depth-first Depth-limited Iterative deepening Infrmed: Use heuristics t guide the search

More information

CS1150 Principles of Computer Science Loops

CS1150 Principles of Computer Science Loops CS1150 Principles f Cmputer Science Lps Yanyan Zhuang Department f Cmputer Science http://www.cs.uccs.edu/~yzhuang CS1150 UC. Clrad Springs Annuncement HW1 graded HW2 due tnight HW3 will be psted sn Due

More information

Lab 1 - Calculator. K&R All of Chapter 1, 7.4, and Appendix B1.2 Iterative Code Design handout Style Guidelines handout

Lab 1 - Calculator. K&R All of Chapter 1, 7.4, and Appendix B1.2 Iterative Code Design handout Style Guidelines handout UNIVERSITY OF CALIFORNIA, SANTA CRUZ BOARD OF STUDIES IN COMPUTER ENGINEERING CMPE13/L: INTRODUCTION TO PROGRAMMING IN C SPRING 2013 Lab 1 - Calculatr Intrductin Reading Cncepts In this lab yu will be

More information

The Abstract Data Type Stack. Simple Applications of the ADT Stack. Implementations of the ADT Stack. Applications

The Abstract Data Type Stack. Simple Applications of the ADT Stack. Implementations of the ADT Stack. Applications The Abstract Data Type Stack Simple Applicatins f the ADT Stack Implementatins f the ADT Stack Applicatins 1 The Abstract Data Type Stack 3 ADT STACK Examples readandcrrect algrithm abcc ddde ef fg Output:

More information

In-Class Exercise. Hashing Used in: Hashing Algorithm

In-Class Exercise. Hashing Used in: Hashing Algorithm In-Class Exercise Hashing Used in: Encryptin fr authenticatin Hash a digital signature, get the value assciated with the digital signature,and bth are sent separately t receiver. The receiver then uses

More information

CS1150 Principles of Computer Science Introduction (Part II)

CS1150 Principles of Computer Science Introduction (Part II) Principles f Cmputer Science Intrductin (Part II) Yanyan Zhuang Department f Cmputer Science http://www.cs.uccs.edu/~yzhuang UC. Clrad Springs Review Terminlgy Class } Every Java prgram must have at least

More information

Computer Organization and Architecture

Computer Organization and Architecture Campus de Gualtar 4710-057 Braga UNIVERSIDADE DO MINHO ESCOLA DE ENGENHARIA Departament de Infrmática Cmputer Organizatin and Architecture 5th Editin, 2000 by William Stallings Table f Cntents I. OVERVIEW.

More information

DICOM Correction Proposal

DICOM Correction Proposal DICOM Crrectin Prpsal STATUS Final Text Date f Last Update 2014/06/25 Persn Assigned Submitter Name James Philbin Jnathan Whitby (jwhitby@vitalimages.cm) Submissin Date 2013/10/17 Crrectin Number CP-1351

More information

Lab 4. Name: Checked: Objectives:

Lab 4. Name: Checked: Objectives: Lab 4 Name: Checked: Objectives: Learn hw t test cde snippets interactively. Learn abut the Java API Practice using Randm, Math, and String methds and assrted ther methds frm the Java API Part A. Use jgrasp

More information

DesignScript summary:

DesignScript summary: DesignScript summary: This manual is designed fr thse readers wh have sme experience with prgramming and scripting languages and want t quickly understand hw DesignScript implements typical prgramming

More information

1 Version Spaces. CS 478 Homework 1 SOLUTION

1 Version Spaces. CS 478 Homework 1 SOLUTION CS 478 Hmewrk SOLUTION This is a pssible slutin t the hmewrk, althugh there may be ther crrect respnses t sme f the questins. The questins are repeated in this fnt, while answers are in a mnspaced fnt.

More information

Traffic Shaping (Part 1)

Traffic Shaping (Part 1) Lab 2a Traffic Shaping (Part 1) Purpse f this lab: In this lab yu will build (prgram) a netwrk element fr traffic shaping, called a leaky bucket, that runs ver a real netwrk. The traffic fr testing the

More information

BT 0080 Fundamentals of Algorithms Contents

BT 0080 Fundamentals of Algorithms Contents BT 8 Fundamentals f Algrithms Cntents Unit Elementary Algrithms Unit 2 Mathematical Functins and Ntatins 3 Unit 3 Divide and Cnquer 79 Unit 4 Greedy Methd 97 Unit 5 Dynamic Prgramming 3 Unit 6 Backtracking

More information

$ARCSIGHT_HOME/current/user/agent/map. The files are named in sequential order such as:

$ARCSIGHT_HOME/current/user/agent/map. The files are named in sequential order such as: Lcatin f the map.x.prperties files $ARCSIGHT_HOME/current/user/agent/map File naming cnventin The files are named in sequential rder such as: Sme examples: 1. map.1.prperties 2. map.2.prperties 3. map.3.prperties

More information

OWL. Web Ontology Languagge

OWL. Web Ontology Languagge OWL Web Ontlgy Languagge Origins 2 DAML OIL RDF DAML = DARPA Agent Markup Language OIL = Ontlgy Inference Layer DAML+OIL OWL Purpse The purpse f OWL is identical t RDF Schemas - t prvide an XML vcabulary

More information

Laboratory #13: Trigger

Laboratory #13: Trigger Schl f Infrmatin and Cmputer Technlgy Sirindhrn Internatinal Institute f Technlgy Thammasat University ITS351 Database Prgramming Labratry Labratry #13: Trigger Objective: - T learn build in trigger in

More information

עקרונות שפות תכנות 2018 תרגול 8 Type Inference System

עקרונות שפות תכנות 2018 תרגול 8 Type Inference System עקרונות שפות תכנות 2018 תרגול 8 Type Inference System Type Inference System The Type Inference System is a TypeScript Implementation of the algorithm for Type Checking and Inference using Type Equations.

More information

Chapter-10 INHERITANCE

Chapter-10 INHERITANCE Chapter-10 INHERITANCE Intrductin: Inheritance is anther imprtant aspect f bject riented prgramming. C++ allws the user t create a new class (derived class) frm an existing class (base class). Inheritance:

More information

Using CppSim to Generate Neural Network Modules in Simulink using the simulink_neural_net_gen command

Using CppSim to Generate Neural Network Modules in Simulink using the simulink_neural_net_gen command Using CppSim t Generate Neural Netwrk Mdules in Simulink using the simulink_neural_net_gen cmmand Michael H. Perrtt http://www.cppsim.cm June 24, 2008 Cpyright 2008 by Michael H. Perrtt All rights reserved.

More information

Administrativia. Assignment 1 due tuesday 9/23/2003 BEFORE midnight. Midterm exam 10/09/2003. CS 561, Sessions 8-9 1

Administrativia. Assignment 1 due tuesday 9/23/2003 BEFORE midnight. Midterm exam 10/09/2003. CS 561, Sessions 8-9 1 Administrativia Assignment 1 due tuesday 9/23/2003 BEFORE midnight Midterm eam 10/09/2003 CS 561, Sessins 8-9 1 Last time: search strategies Uninfrmed: Use nly infrmatin available in the prblem frmulatin

More information

TMS myclouddata SDK DEVELOPERS GUIDE

TMS myclouddata SDK DEVELOPERS GUIDE TMS mycluddata SDK TMS mycluddata SDK February 2017 Cpyright 2017 by tmssftware.cm bvba Web: http://www.tmssftware.cm Email: inf@tmssftware.cm 1 TMS mycluddata SDK Index Availability... 3 Online references...

More information

Chapter 3 Stack. Books: ISRD Group New Delhi Data structure Using C

Chapter 3 Stack. Books: ISRD Group New Delhi Data structure Using C C302.3 Develp prgrams using cncept f stack. Bks: ISRD Grup New Delhi Data structure Using C Tata McGraw Hill What is Stack Data Structure? Stack is an abstract data type with a bunded(predefined) capacity.

More information

Project #1 - Fraction Calculator

Project #1 - Fraction Calculator AP Cmputer Science Liberty High Schl Prject #1 - Fractin Calculatr Students will implement a basic calculatr that handles fractins. 1. Required Behavir and Grading Scheme (100 pints ttal) Criteria Pints

More information

Stealing passwords via browser refresh

Stealing passwords via browser refresh Stealing passwrds via brwser refresh Authr: Karmendra Khli [karmendra.khli@paladin.net] Date: August 07, 2004 Versin: 1.1 The brwser s back and refresh features can be used t steal passwrds frm insecurely

More information

Chapter 2 Assemblers. PDF created with FinePrint pdffactory Pro trial version

Chapter 2 Assemblers. PDF created with FinePrint pdffactory Pro trial version Chapter 2 Assemblers 1 PDF created with FinePrint pdffactry Pr trial versin www.pdffactry.cm Outline 2.1 Basic Assembler Functins 2.2 Machine-Dependent Assembler Features 2.3 Machine-Independent Assembler

More information

ME Week 5 Project 2 ilogic Part 1

ME Week 5 Project 2 ilogic Part 1 1 Intrductin t ilgic 1.1 What is ilgic? ilgic is a Design Intelligence Capture Tl Supprting mre types f parameters (string and blean) Define value lists fr parameters. Then redefine value lists autmatically

More information

Retrieval Effectiveness Measures. Overview

Retrieval Effectiveness Measures. Overview Retrieval Effectiveness Measures Vasu Sathu 25th March 2001 Overview Evaluatin in IR Types f Evaluatin Retrieval Perfrmance Evaluatin Measures f Retrieval Effectiveness Single Valued Measures Alternative

More information

VMware AirWatch SDK Plugin for Apache Cordova Instructions Add AirWatch Functionality to Enterprise Applicataions with SDK Plugins

VMware AirWatch SDK Plugin for Apache Cordova Instructions Add AirWatch Functionality to Enterprise Applicataions with SDK Plugins VMware AirWatch SDK Plugin fr Apache Crdva Instructins Add AirWatch Functinality t Enterprise Applicatains with SDK Plugins v1.2 Have dcumentatin feedback? Submit a Dcumentatin Feedback supprt ticket using

More information

ROCK-POND REPORTING 2.1

ROCK-POND REPORTING 2.1 ROCK-POND REPORTING 2.1 AUTO-SCHEDULER USER GUIDE Revised n 08/19/2014 OVERVIEW The purpse f this dcument is t describe the prcess in which t fllw t setup the Rck-Pnd Reprting prduct s that users can schedule

More information

Last time. VHDL in Action. Motivation. Covered in This Lesson. Packages. Packages (cont'd)

Last time. VHDL in Action. Motivation. Covered in This Lesson. Packages. Packages (cont'd) Last time VHDL in Actin Packages and Libraries Ch 3, pp. 96-114 Versin f wavefrm updating algrithm t handle reject clauses Macr and micr time Delta delays: Ensure crrect rdering f zer time events Martin

More information

Operating systems. Module 7 IPC (Interprocess communication) PART I. Tami Sorgente 1

Operating systems. Module 7 IPC (Interprocess communication) PART I. Tami Sorgente 1 Operating systems Mdule 7 IPC (Interprcess cmmunicatin) PART I Tami Srgente 1 INTERPROCESS COMMUNICATION Prcesses within a system may be independent r cperating Cperating prcess can affect r be affected

More information

Synoptic Display Studio Developers Guide

Synoptic Display Studio Developers Guide Synptic Display Studi Develpers Guide Table f Cntents 1. Intrductin... 3 2. Cntributing widgets... 4 2.1. Cncepts... 4 2.2. Defining the mdel... 5 2.2.1. Prvide a widget mdel... 5 2.2.2. Define a widget

More information

Preorder Traversal (cont.)

Preorder Traversal (cont.) Prerder Traversal (cnt.) 1 S final = A + B + E + + G + + C + D call 0 A return prerderprint(a) returns ( A + prerderprint(b)+ C + D ) call C 2 3 D return 1 B prerderprint(b) returns ( B + E + prerderprint())

More information

Relius Documents ASP Checklist Entry

Relius Documents ASP Checklist Entry Relius Dcuments ASP Checklist Entry Overview Checklist Entry is the main data entry interface fr the Relius Dcuments ASP system. The data that is cllected within this prgram is used primarily t build dcuments,

More information

Parallel Processing in NCAR Command Language for Performance Improvement

Parallel Processing in NCAR Command Language for Performance Improvement Parallel Prcessing in NCAR Cmmand Language fr Perfrmance Imprvement Ping Gu, University f Wyming Mentr: Wei Huang, NCAR C- Mentr: Dave Brwn, NCAR August 1, 2013 Intrductin and Mtivatin ² The NCAR Cmmand

More information

Higher Maths EF1.2 and RC1.2 Trigonometry - Revision

Higher Maths EF1.2 and RC1.2 Trigonometry - Revision Higher Maths EF and R Trignmetry - Revisin This revisin pack cvers the skills at Unit Assessment and exam level fr Trignmetry s yu can evaluate yur learning f this utcme. It is imprtant that yu prepare

More information

Primitive Types and Methods. Reference Types and Methods. Review: Methods and Reference Types

Primitive Types and Methods. Reference Types and Methods. Review: Methods and Reference Types Primitive Types and Methds Java uses what is called pass-by-value semantics fr methd calls When we call a methd with input parameters, the value f that parameter is cpied and passed alng, nt the riginal

More information

CS1150 Principles of Computer Science Boolean, Selection Statements (Part II)

CS1150 Principles of Computer Science Boolean, Selection Statements (Part II) CS1150 Principles f Cmputer Science Blean, Selectin Statements (Part II) Yanyan Zhuang Department f Cmputer Science http://www.cs.uccs.edu/~yzhuang CS1150 Review What s the scientific ntatin f 9,200,000?

More information

Computational Methods of Scientific Programming Fall 2008

Computational Methods of Scientific Programming Fall 2008 MIT OpenCurseWare http://cw.mit.edu 12.010 Cmputatinal Methds f Scientific Prgramming Fall 2008 Fr infrmatin abut citing these materials r ur Terms f Use, visit: http://cw.mit.edu/terms. 12.010 Hmewrk

More information

COP2800 Homework #3 Assignment Spring 2013

COP2800 Homework #3 Assignment Spring 2013 YOUR NAME: DATE: LAST FOUR DIGITS OF YOUR UF-ID: Please Print Clearly (Blck Letters) YOUR PARTNER S NAME: DATE: LAST FOUR DIGITS OF PARTNER S UF-ID: Please Print Clearly Date Assigned: 15 February 2013

More information

BI Publisher TEMPLATE Tutorial

BI Publisher TEMPLATE Tutorial PepleSft Campus Slutins 9.0 BI Publisher TEMPLATE Tutrial Lessn T2 Create, Frmat and View a Simple Reprt Using an Existing Query with Real Data This tutrial assumes that yu have cmpleted BI Publisher Tutrial:

More information

Exercises: Plotting Complex Figures Using R

Exercises: Plotting Complex Figures Using R Exercises: Pltting Cmplex Figures Using R Versin 2017-11 Exercises: Pltting Cmplex Figures in R 2 Licence This manual is 2016-17, Simn Andrews. This manual is distributed under the creative cmmns Attributin-Nn-Cmmercial-Share

More information

Chief Reader Report on Student Responses:

Chief Reader Report on Student Responses: Chief Reader Reprt n Student Respnses: 2018 AP Cmputer Science A Free-Respnse Questins Number f Students Scred 65,133 Number f Readers 317 Scre Distributin Exam Scre N %At 5 16,105 24.7 4 13,802 21.2 3

More information

Computer Organization and Architecture

Computer Organization and Architecture Campus de Gualtar 4710-057 Braga UNIVERSIDADE DO MINHO ESCOLA DE ENGENHARIA Departament de Infrmática Cmputer Organizatin and Architecture 5th Editin, 2000 by William Stallings Table f Cntents I. OVERVIEW.

More information

CS4500/5500 Operating Systems Synchronization

CS4500/5500 Operating Systems Synchronization Operating Systems Synchrnizatin Yanyan Zhuang Department f Cmputer Science http://www.cs.uccs.edu/~yzhuang UC. Clrad Springs Recap f the Last Class Multiprcessr scheduling Tw implementatins f the ready

More information

Visitor. Intent. Motivation

Visitor. Intent. Motivation Visitr 1 Intent Represent an peratin t be perfrmed n the elements f an bject structure. Visitr lets yu define a new peratin withut changing the classes f the elements n which it perates. Mtivatin Applicability

More information

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Yu will learn the fllwing in this lab: The UNIVERSITY f NORTH CAROLINA at CHAPEL HILL Cmp 541 Digital Lgic and Cmputer Design Spring 2016 Lab Prject (PART A): A Full Cmputer! Issued Fri 4/8/16; Suggested

More information

AP Computer Science A

AP Computer Science A 2018 AP Cmputer Science A Sample Student Respnses and Scring Cmmentary Inside: Free Respnse Questin 1 RR Scring Guideline RR Student Samples RR Scring Cmmentary 2018 The Cllege Bard. Cllege Bard, Advanced

More information

Class 3: Training Recurrent Nets

Class 3: Training Recurrent Nets Class 3: Training Recurrent Nets Arvind Ramanathan Cmputatinal Science & Engineering, Oak Ridge Natinal Labratry, Oak Ridge, TN 3783 ramanathana@rnl.gv 1 Last class Basics f RNNs Recurrent netwrk mdeling

More information

Cisco Tetration Analytics, Release , Release Notes

Cisco Tetration Analytics, Release , Release Notes Cisc Tetratin Analytics, Release 1.102.21, Release Ntes This dcument describes the features, caveats, and limitatins fr the Cisc Tetratin Analytics sftware. Additinal prduct Release ntes are smetimes updated

More information

What is Procedural Content Generation?

What is Procedural Content Generation? Sectin 5 (25-03-2018) Endless Runner In this tutrial we are ging t create an Endless Runner game. In this game character can nly mve right and left and it is always ging frward. The grund (tile r platfrm)

More information

Proper Document Usage and Document Distribution. TIP! How to Use the Guide. Managing the News Page

Proper Document Usage and Document Distribution. TIP! How to Use the Guide. Managing the News Page Managing the News Page TABLE OF CONTENTS: The News Page Key Infrmatin Area fr Members... 2 Newsletter Articles... 3 Adding Newsletter as Individual Articles... 3 Adding a Newsletter Created Externally...

More information

Andrid prgramming curse Data strage Sessin bjectives Internal Strage Intrductin By Võ Văn Hải Faculty f Infrmatin Technlgies Andrid prvides several ptins fr yu t save persistent applicatin data. The slutin

More information