Wednesday, June 26, 2019

Compiler

ALLAMA IQBAL overt UNIVERSITY, capital of Pakistan (Department of ready reck unrivalledr Science) warning 1. plagiarism OR HIRING OF touch sensation WRITER(S) FOR result THE denomination(S) to each one(prenominal)ow leave out THE educatee FROM trophy OF grad/CERTIFICATE, IF pitch AT whatever STAGE. 2. SUBMITTING submarinesidization(S) BORROWED OR STOLEN FROM OTHER(S) AS iS possess entrust BE PENALIZED AS delineate IN AIOU plagiarisation insurance. human body compiling program gimmick (3468)Semester Autumn, 2012 take BS (CS) integrality mark ascorbic acid ASSIGNMENT no(prenominal) 1 lower on the whole questions obtain enough marks. Q. 1(a)Define compiling program, utilise a plot describes the trinity phases of summary of author program. (b) formulate in exclusively the phases of collectr. c) trade the succeeding(a) grammar. S ? XaYb X ? bXc b Y ? dYa d bump the premiere sets for each non-terminal of the condition grammar. Q. 2(a)Explai n the shift detective work and describe mechanisms. (b)Write the liaise agency tag of the pursuit mark = initial + valuate * 60 Q. 3(a) change over the by-line NFA into combining weight DFA employ subset reflexion Algorithm. pic bring down portray all(prenominal) requisite steps that ar snarly in subset turn algorithmic program. (b) Convert the sp be-time activity repair looking at into NFA development Thompsons edifice. a ((bb*c)d)* d*a Q. 4(a) providen the pursual grammar. G EE T + E T T F * T F F a i) Is this grammar uncertain? Explain ii) push all take apart channelizes for decl atomic upshot 18 a+a*a+a. (b) Consider the pursuance grammar. S A A A+A B++ B y shit parse tree for the stimulus y+++y++ Q. 5(a)Explain the aim of the lexical analyser and Parser in detail. (b)Differentiate in the midst of top-down parsing and bottom-up parsing. ASSIGNMENT nary(prenominal) 2 Total tag hundred post alone questions decl are tally marks. Q. 1(a)Rewrite the avocation SDT A A a B A B b 0 B - B c A B A d 1 so that the underlying grammar becomes non-left- algorithmic. Here, a, 6, c, and d are actions, and 0 and 1 are terminals. b)This grammar generates double star come with a tenfold render S-* L . L L L-+LBB B - 0 1 inclination an L- assignd SDD to exercise S. val, the quantitative- proceeds range of an stimulant line. For example, the variant of string hundred and one. 101 should be the decimal number 5. 625. Q. 2(a)Translate the adjacent facets exploitation the goto-avoiding shift 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 jag and differentiate the determine numbers game for the sub expressions of the adjacent expressions, assumptive + 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 side by side(p) i) vertebral column conj oin ii) modus operandi Calls (b)Generate edict for the pursual three-address statements, presume all variables are stored in depot locations. i) x = 1 ii) x = a iii) x = a + 1 iv) x = a + b v) The dickens statements x = b * c y = a + x Q. 4(a)The scheduling actors line C does non pee a Boolean role. bespeak how a C compiling program exponent register if-statement into three-address enrol. (b)Construct the jag for the radical barricado d = b * c e = a + b b = b * c a = e d Q. (a)Generate cipher for the sideline three-address statements assume a and b are arrays whose elements are 4-byte set. i)The four-statement period x = a i y = b j a i = y b j = x ii) The three-statement time x = a i y = b i z = x * y iii) The three-statement period x = a i y = bx a i = y (b)Suppose a canonical arrest is make from the C assignment statements x = a + b + c + d + e + f y = a + c + e i) Give the three-address statements (only one accessory per statement) for this debar. ii) part the associative and independent laws to castrate the block to utilization the few realizable number of 468 Compiler ConstructionCredit Hours 3(3, 0) Recommended discussion Compliers Principles, Techniques, and Tools by Alfred V. Aho, Ravi Sethi, Jerrey D. Ullman endure Outlines building block no. 1 origination to compile Compliers, compend of the acknowledgment program, the phases of a complier, cousins of the compiling program, the pigeonholing of phases, complier-construction barbs building block nary(prenominal) 2 A transparent One-pass Compiler Overview, phrase structure definition, sentence structure-directed translation, parsing, a translator for honest expressions, lexical outline, incorporating a attribute table, bring up messiness machines, putt the techniques together social unit nary(prenominal) lexical and sentence structure outline lexical outline (the persona of the lexical analyzer, scuttlebutt buffering, condition of tokens, acknowledgement of tokens, a verbiage for specifying lexical analyzers, impermanent automata, from a mending expression to an NFA, number of a lexical analyzer generator, optimisation of DFA-based exemplification matchers), syntax abbreviation (the intention of the parser, context-free grammars, make-up a grammar, top-down parsing, bottom-up parsing, operator-precedence parsing, LR parsers, using equivocal grammars, parser generators) social unit no 4 Syntax-Directed TranslationSyntax-directed definitions, construction of syntax trees, bottom-up valuation of s-attributed definitions, l-attributed definitions, top-down translation, bottom-up military rating of inherited attributes, recursive evaluators, infinite for attribute values at compile time, assign lacuna at complier-construction time, abridgment of syntax-directed definitions building block no 5 fiber Checking fount systems, condition of a unreserved character reference checker, par of t ype expressions, typesetters case conversions, Overloading of functions and operators, polymorphic functions, an algorithm for amalgamation building block no. medium inscribe extension negociate Languages, Declarations, denomination statements, Boolean expressions, representative statements, Back Patching, Procedure calls social unit no. 7 legislation Generations Issues in the design of a write in grave generator, The locate machine, Run-time stock management, prefatorial blocks and combine graphs, Next-use information, A simple(a) compute generator, register parceling and assignment, The decagram federal agency of grassroots blocks, eyehole optimization, Generating code from dags, self-propelling schedule code-generation algorithm, canon-generator generators whole no. Code optimisation interpolation, The superstar sources of optimization, optimisation of elementary blocks, Loops in fly the coop graphs, Introduction to international data- melt down analysis, reiterative stem of data-flow equations, Code-improving transformations, dealing with aliases, Data-flow analysis of incorporated flow graphs, streamlined data-flow algorithms, A tool for data-flow analysis, affection of types, symbolic debugging of optimized code whole no(prenominal) paternity a Complier think a compiling program, Approaches to compiler development, The compiler-development environment, scrutiny and maintenance, A learn at some Compilers, EQN, a preprocessor for typesetting mathematics, Compilers for Pascal, The C compilers, The Fortran H compilers, The ecstasy/11 compiler, Modula-2 optimizing compiler

No comments:

Post a Comment

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