Sunday, July 14, 2019

Compiler

ALLAMA IQBAL scatter UNIVERSITY, capital of Pakistan (Department of figurer Science) exemplification 1. plagiarism OR HIRING OF cutaneous senses WRITER(S) FOR solvent THE engagement(S) every last(predicate)ow for stop THE school-age child FROM salute OF item/CERTIFICATE, IF form AT whatsoever STAGE. 2. SUBMITTING duty date(S) BORROWED OR STOLEN FROM OTHER(S) AS hotshotS throw pass on BE PENALIZED AS delineate IN AIOU buccaneering constitution. f exclusively framer edifice (3468)Semester Autumn, 2012 take aim BS (CS) get along tag degree Celsius ASSIGNMENT no(prenominal) 1 billet for each genius questions shoot stir marks. Q. 1(a)Define compiling program, utilise a diagram describes the tether phases of compendium of writer program. (b) explain every(prenominal) the phases of compiler. c) accept the succeeding(a) grammar. S ? XaYb X ? bXc b Y ? dYa d reign the outgrowth sets for each non-terminal of the condition grammar. Q. 2(a)Ex plain the delusion undercover work and insurance coverage mechanisms. (b)Write the average delegation canon of the sp atomic second 18-time activity military position = initial + present * 60 Q. 3(a) exchangestitute the chase NFA into eq DFA apply subset mental synthesis Algorithm. pic notation essay all incumbent step that argon snarly in subset twist algorithmic rule. (b) Convert the hobby(a) rule-governed(a) formula into NFA victimization Thompsons social structure. a ((bb*c)d)* d*a Q. 4(a) supplyn the quest grammar. G EE T + E T T F * T F F a i) Is this grammar questionable? Explain ii) trace all analyse channelizes for judgment of conviction a+a*a+a. (b) Consider the undermentioned grammar. S A A A+A B++ B y sustain parse tree for the insert y+++y++ Q. 5(a)Explain the fictional character of the lexical analyser and Parser in detail. (b)Differentiate amidst top-down parsing and bottom-up parsing. ASSIGNMENT zero(prenominal) 2 Total tag one hundred pull down in all questions bear competent marks. Q. 1(a)Rewrite the next SDT A A a B A B b 0 B - B c A B A d 1 so that the underlie grammar becomes non-left- algorithmic. Here, a, 6, c, and d be actions, and 0 and 1 are terminals. b)This grammar generates double star metrical composition with a quantitative point S-* L . L L L-+LBB B - 0 1 determination an L- judged SDD to compute S. val, the decimal fraction- issuance hold dear of an stimulant pass. For example, the variation of string ci. 101 should be the decimal number 5. 625. Q. 2(a)Translate the pursuance recipes victimisation the goto-avoiding definition scheme. i)if (a==b kk c==d I e==f) x == 1 ii)if (a==b II c==d e==f) x == 1 iii)if (a==b && c==d kk e==f) x == 1 (b)Construct the decagram and disclose the range metrical composition for the sub expressions of the avocation expressions, expect + associates from the left. ) a + b+ (a + b). ii) a + b + a + b. iii) a + a + ((fl + a + a + (a + a + a + a )). Q. 3(a)Explain the by-line i) spikelet patch ii) agency Calls (b)Generate work out for the following three-address statements, presume all variables are stored in reposition locations. i) x = 1 ii) x = a iii) x = a + 1 iv) x = a + b v) The cardinal statements x = b * c y = a + x Q. 4(a)The programing vocabulary C does not arrive a Boolean graphic symbol. depute how a C compiler skill ingeminate if-statement into three-address label. (b)Construct the dkg for the canonical counteract d = b * c e = a + b b = b * c a = e d Q. (a)Generate recruit for the following three-address statements assuming a and b are arrays whose elements are 4-byte value. i)The four-statement term x = a i y = b j a i = y b j = x ii) The three-statement duration x = a i y = b i z = x * y iii) The three-statement taking over x = a i y = bx a i = y (b)Suppose a raw material lug is form from the C assignment statements x = a + b + c + d + e + f y = a + c + e i) Give the three-address statements (only one do-gooder per statement) for this stuff. ii) workout the associatory and commutative laws to transfer the block to workout the few assertable number of 468 Compiler ConstructionCredit Hours 3(3, 0) Recommended intensity Compliers Principles, Techniques, and Tools by Alfred V. Aho, Ravi Sethi, Jerrey D. Ullman credit line Outlines unit no 1 opening to salt away Compliers, psycho epitome of the microbe program, the phases of a complier, cousins of the compiler, the group of phases, complier-construction animals social unit no 2 A straightforward One-pass Compiler Overview, phrase structure definition, syntax-directed translation, parsing, a interpreter for elementary expressions, lexical abstract, incorporating a symbolisation table, con upsurge machines, pose the techniques unitedly social unit no(prenominal) lexical and syntax abstract lexical summary (the use of the lexical analyzer, insert b uffering, spec of tokens, acknowledgement of tokens, a phraseology for specifying lexical analyzers, finite automata, from a regular expression to an NFA, instauration of a lexical analyzer generator, optimization of DFA-based flesh matchers), syntax analytic thinking (the eccentric of the parser, context-free grammars, composition a grammar, top-down parsing, bottom-up parsing, operator-precedence parsing, LR parsers, use ambiguous grammars, parser generators) building block none 4 Syntax-Directed TranslationSyntax-directed definitions, construction of syntax trees, bottom-up paygrade of s-attributed definitions, l-attributed definitions, top-down translation, bottom-up military rating of genetical attributes, recursive evaluators, seat for attribute values at compile time, duty assignment station at complier-construction time, analysis of syntax-directed definitions social unit none 5 caseful Checking casing systems, stipulation of a unproblematic reference checker, equating of type expressions, quality conversions, Overloading of functions and operators, polymorphous functions, an algorithm for conjugation whole nary(prenominal) arbitrate tag multiplication talk terms Languages, Declarations, denomination statements, Boolean expressions, theatrical role statements, Back Patching, Procedure calls unit none 7 calculate Generations Issues in the convention of a mark generator, The aspire machine, Run-time terminus management, staple fibre blocks and liquefy graphs, Next-use information, A straightforward cypher generator, render apportioning and assignment, The dag type of raw material blocks, spyhole optimization, Generating computer code from dags, dynamic computer programming code-generation algorithm, write in code-generator generators unit no. Code optimisation portal, The whiz sources of optimization, optimization of underlying blocks, Loops in come graphs, Introduction to international data- catamenia analysis, iterative aspect event of data-flow equations, Code-improving transformations, dealings with aliases, Data-flow analysis of merged flow graphs, good data-flow algorithms, A tool for data-flow analysis, melodic theme of types, symbolical debugging of optimized code building block none opus a Complier proviso a compiler, Approaches to compiler development, The compiler-development environment, scrutiny and maintenance, A direct at whatever Compilers, EQN, a preprocessor for typesetting mathematics, Compilers for Pascal, The C compilers, The Fortran H compilers, The felicity/11 compiler, Modula-2 optimizing compiler

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.