Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Pro Blog
  • Users
  • Groups
  • Unsolved
  • Solved
Collapse
Secnto AI
  1. Secnto AI
  2. Categories
  3. Virtual University
  4. CS606 - Compiler Construction
  5. CS606 Assignment 3 Solution and Discussion
CS606 GDB 1 Solution and Discussion
laiba javedL
Re: CS606 GDB 1 Solution and Discussion Total Marks 5 Starting Date Monday, February 15, 2021 Closing Date Tuesday, February 16, 2021 Status Open Question Title Intermediate Code Generation Question Description CS606 GDB Fall 2020 Compilers are used to translate the source code in to machine code but there is an intermediate code is generated before the target machine code. Compilers can be developed to translate directly without generating machine code. Do you think intermediate code generation is extra and time consuming step while translating or it is necessary or beneficial in some way? Give your comments in favor or against it with proper reasons. Instructions: Read the following instructions carefully before sending your comments: GDB will have weightage of 5% of your total subject marks. Your discussion must be based on logical facts. You should post your comments on the Graded Discussion Board & not on the Regular MDB. Your comments should be relevant and to-the-point i.e. clear and concise (Maximum 4-5 lines answer using font style Times New Roman and Font Size 12). Books, websites and other reading material can be consulted but must be changed into your own wording before posting your comments. (Do not copy the material as it is.) No extra time will be given for discussion.
CS606 - Compiler Construction
COMPILER CONSTRUCTION
usman ahmed 0U
Assignment # 2 COMPILER CONSTRUCTION a: Give the Syntax Directed Translation Scheme to translate the WHILE statement: choose either JAVA or C++ syntax for building grammar b: Now create THREE ADDRESS translation for the given piece of code: while (a > b) { if (c > d) c = c - d; else c = c + d; }
CS606 - Compiler Construction
CS606 Assignment 3 Solution and Discussion
zareenZ
Re: CS606 Assignment 3 Solution and Discussion Assignment No. 3 Semester: Spring 2020 CS606 – Compiler Construction Total Marks: 20 Due Date: July 27, 2020 Instructions Please read the following instructions carefully before submitting assignment: It should be clear that your assignment will not get any credit if: o Assignment is submitted after due date. o Submitted assignment does not open or file is corrupt. o Assignment is copied (From internet/ to from students). Software (s) Used to develop Assignment MS Word MS Paint Assignment Submission Instructions Microsoft Word file is required to submit on LMS. Assignment Marks 20 Question: S -> A S | y S | E A -> B | C w | v B B -> x C C -> z The symbols S, A, B and C are non-terminals with S as the start symbol while v, w, x, y, z are terminal symbols. Use the context-free grammar given above to answer the following questions. a) Give the FOLLOW and FIRST sets for each non-terminal symbol in above grammar b) Construct the parsing table for a non-recursive predictive parser for above grammar. Deadline: Your assignment must be uploaded on or before the due date. We shall not accept your solution through email after the due date.
CS606 - Compiler Construction
CS606 Assignment 2 Solution and Discussion
zareenZ
Re: CS606 Assignment 2 Solution and Discussion Assignment No. 2 Semester: Spring 2020 CS606 – Compiler Construction Total Marks: 20 Due Date: June 15, 2020 Instructions Please read the following instructions carefully before submitting assignment: It should be clear that your assignment will not get any credit if: o Assignment is submitted after due date. o Submitted assignment does not open or file is corrupt. o Assignment is copied (From internet/ to from students). Software (s) Used to develop Assignment MS Word MS Paint Assignment Submission Instructions Microsoft Word file is required to submit on LMS. Assignment Marks 20 Question: X -> aZ X -> c Y -> bX Z -> Ya Z -> XbY a) Find First sets for above grammar. (10 Marks) b) Find Follow sets for above grammar. (10 Marks) Deadline: Your assignment must be uploaded on or before the due date. We shall not accept your solution through email after the due date.
CS606 - Compiler Construction
CS606 Assignment 1 Solution and Discussion
zaasmiZ
Re: CS606 Assignment 1 Solution and Discussion Assignment No. 1 Semester: Spring 2020 CS606 – Compiler Construction Total Marks: 20 Due Date: June 01, 2020 Instructions Please read the following instructions carefully before submitting assignment: It should be clear that your assignment will not get any credit if: o Assignment is submitted after due date. o Submitted assignment does not open or file is corrupt. o Assignment is copied (From internet/ to from students). Software (s) Used to develop Assignment MS Word MS Paint Assignment Submission Instructions Microsoft Word file is required to submit on LMS. Assignment Marks 20 Task 1: For regular expression below, construct an NFA using Thompson’s construction. (10 Marks) R.E. = (y* xy* x)* y* Task 2: Use Subset Construction algorithm to find DFA for the NFA constructed in Task 1. (10 Marks) Deadline: Your assignment must be uploaded on or before the due date. We shall not accept your solution through email after the due date.
CS606 - Compiler Construction
CS606 GDB 1 Solution and Discussion
zareenZ
Please share idea solution
CS606 - Compiler Construction
CS606 Assignment 3 Solution and Discussion
zareenZ
CS606 – Compiler Construction Assignment # 03 Fall 2019 Total marks = 20 Deadline Date 22nd January, 2020 Please carefully read the following instructions before attempting assignment. RULES FOR MARKING It should be clear that your assignment would not get any credit if:  The assignment is submitted after the due date.  The submitted assignment does not open or file is corrupt.  Strict action will be taken if submitted solution is copied from any other student or from the internet. You should consult the recommended books to clarify your concepts as handouts are not enough. You are supposed to submit your assignment in .doc or docx format. Any other formats like scan images, PDF, zip, rar, ppt and bmp etc will not be accepted. OBJECTIVE Objective of this assignment is to increase the learning capabilities of the students about • Context-Free Grammars • LL(1) Table constructions • Follow Sets NOTE No assignment will be accepted after the due date via email in any case (whether it is the case of load shedding or internet malfunctioning etc.). Hence refrain from uploading assignment in the last hour of deadline. It is recommended to upload solution file at least two days before its closing date. If you find any mistake or confusion in assignment (Question statement), please consult with your instructor before the deadline. After the deadline no queries will be entertained in this regard. For any query, feel free to email at: cs606@vu.edu.pk Questions No 01 12+8=20 Marks Consider the grammar given below: S → XaXb S → Yb X → € Y → € Where € (epsilon) is empty string. a) Find First and Follow sets for above grammar. [12] b) Construct LL (1) parsing table. [8] Good Luck!
CS606 - Compiler Construction
Umeed he kya? i mean count kar sakty kya app pa? kitna time lagy ga?
Na VVeed WajidN
Re: CS606 Assignment 3 Solution and Discussion
CS606 - Compiler Construction
CS606 Assignment 2 Solution and Discussion
zareenZ
CS606 – Compiler Construction Assignment # 02 Fall 2019 Total marks = 20 Deadline Date 2nd December, 2019 Please carefully read the following instructions before attempting assignment. RULES FOR MARKING It should be clear that your assignment would not get any credit if:  The assignment is submitted after the due date.  The submitted assignment does not open or file is corrupt.  Strict action will be taken if submitted solution is copied from any other student or from the internet. You should consult the recommended books to clarify your concepts as handouts are not enough. You are supposed to submit your assignment in .doc or docx format. Any other formats like scan images, PDF, zip, rar, ppt and bmp etc will not be accepted. OBJECTIVE Objective of this assignment is to increase the learning capabilities of the students about • Context-Free Grammars • Ambiguous Grammars • Unambiguous Grammars NOTE No assignment will be accepted after the due date via email in any case (whether it is the case of load shedding or internet malfunctioning etc.). Hence refrain from uploading assignment in the last hour of deadline. It is recommended to upload solution file at least two days before its closing date. If you find any mistake or confusion in assignment (Question statement), please consult with your instructor before the deadline. After the deadline no queries will be entertained in this regard. For any query, feel free to email at: cs606@vu.edu.pk Questions No 01 10 marks Consider the grammar given below: NP -> Adj NP NP -> NP Conj NP NP -> Adj N NP -> N Adj -> Young Conj -> and N -> Boys | Girls Where “Young, and, boys, Girls “ are terminals and “NP, N, Adj, Conj” are non-terminals. Prove or disprove that the grammar given above is ambiguous. Questions No 02 10 marks Consider the grammar given below: S -> S + S | S / S | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 Prove that above given grammar is ambiguous. Good Luck!
CS606 - Compiler Construction
CS606 Assignment 1 Solution and Discussion
zareenZ
CS606 – Compiler Construction Assignment # 01 Fall 2019 Total marks = 20 Deadline Date 14th Nov 2019 Please carefully read the following instructions before attempting assignment. RULES FOR MARKING It should be clear that your assignment would not get any credit if:  The assignment is submitted after the due date.  The submitted assignment does not open or file is corrupt.  Strict action will be taken if submitted solution is copied from any other student or from the internet. You should consult the recommended books to clarify your concepts as handouts are not enough. You are supposed to submit your assignment in .doc or docx format. Any other formats like scan images, PDF, zip, rar, ppt and bmp etc will not be accepted. Objective: Objective of this assignment is to increase the learning capabilities of the students about • Deterministic Finite Automaton (DFA) • Nondeterministic Finite Automaton (NFA) • Thompson’s Construction Algorithm NOTE No assignment will be accepted after the due date via email in any case (whether it is the case of load shedding or internet malfunctioning etc.). Hence refrain from uploading assignment in the last hour of deadline. It is recommended to upload solution file at least two days before its closing date. If you find any mistake or confusion in assignment (Question statement), please consult with your instructor before the deadline. After the deadline no queries will be entertained in this regard. For any query, feel free to email at: cs606@vu.edu.pk Questions No 01 10 marks For regular expression below, construct an NFA using Thompson’s construction. R.E. = ((v + x)*y) + z Questions No 02 10 marks Use Subset Construction algorithm to find DFA for the NFA constructed in Task 1. Good Luck!
CS606 - Compiler Construction

CS606 Assignment 3 Solution and Discussion

Scheduled Pinned Locked Moved CS606 - Compiler Construction
cs606assignment 3solutiondiscussionfall 2019
48 Posts 12 Posters 32.2k Views 13 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Nabeel ChaudharyN Nabeel Chaudhary

    How much time does it take to upload solution file? No one is getting this idea. We are going out of time.

    zareenZ Offline
    zareenZ Offline
    zareen
    Cyberian's Gold
    wrote on last edited by
    #33

    @Nabeel-Chaudhary Solution idea posted so please follow these step as required assignment with minimum changes.

    Discussion is right way to get Solution of the every assignment, Quiz and GDB.
    We are always here to discuss and Guideline, Please Don't visit Cyberian only for Solution.
    Cyberian Team always happy to facilitate to provide the idea solution. Please don't hesitate to contact us!
    %(red)[NOTE: Don't copy or replicating idea solutions.]
    Quiz Copy Solution
    Mid and Final Past Papers
    Live Chat

    Nabeel ChaudharyN 1 Reply Last reply
    0
    • ramsha kanwalR Offline
      ramsha kanwalR Offline
      ramsha kanwal
      wrote on last edited by
      #34

      plz file send kr dy

      Nabeel ChaudharyN 1 Reply Last reply
      0
      • zareenZ zareen

        @Nabeel-Chaudhary Solution idea posted so please follow these step as required assignment with minimum changes.

        Nabeel ChaudharyN Offline
        Nabeel ChaudharyN Offline
        Nabeel Chaudhary
        wrote on last edited by
        #35

        @zareen This does not make any sense. I also downloaded this type of sketch from internet. Its so confusing. The thing is our assignment is gone.

        1 Reply Last reply
        0
        • ramsha kanwalR ramsha kanwal

          plz file send kr dy

          Nabeel ChaudharyN Offline
          Nabeel ChaudharyN Offline
          Nabeel Chaudhary
          wrote on last edited by
          #36

          @ramsha-kanwal File hai hi nahi in k pas

          1 Reply Last reply
          0
          • ramsha kanwalR Offline
            ramsha kanwalR Offline
            ramsha kanwal
            wrote on last edited by
            #37

            bta dy file hai k ni plz

            1 Reply Last reply
            0
            • ramsha kanwalR Offline
              ramsha kanwalR Offline
              ramsha kanwal
              wrote on last edited by
              #38

              allah hi puchy ga

              Nabeel ChaudharyN 1 Reply Last reply
              0
              • ramsha kanwalR ramsha kanwal

                allah hi puchy ga

                Nabeel ChaudharyN Offline
                Nabeel ChaudharyN Offline
                Nabeel Chaudhary
                wrote on last edited by
                #39

                @ramsha-kanwal Give me your email or something i will send you a file

                awais sharifA kainat universK ramsha kanwalR 5 Replies Last reply
                0
                • Nabeel ChaudharyN Nabeel Chaudhary

                  @ramsha-kanwal Give me your email or something i will send you a file

                  awais sharifA Offline
                  awais sharifA Offline
                  awais sharif
                  wrote on last edited by
                  #40

                  @Nabeel-Chaudhary bhai agr ap k pas file ha to send kr do plz

                  1 Reply Last reply
                  0
                  • Nabeel ChaudharyN Nabeel Chaudhary

                    @ramsha-kanwal Give me your email or something i will send you a file

                    kainat universK Offline
                    kainat universK Offline
                    kainat univers
                    wrote on last edited by
                    #41

                    @Nabeel-Chaudhary plz send me solution file at univers666jana@gmail.com

                    1 Reply Last reply
                    0
                    • ramsha kanwalR Offline
                      ramsha kanwalR Offline
                      ramsha kanwal
                      wrote on last edited by
                      #42

                      mery pas file hai pr mujhy idhr uplod ni krni aa rahi

                      mehwishM 1 Reply Last reply
                      0
                      • Nabeel ChaudharyN Nabeel Chaudhary

                        @ramsha-kanwal Give me your email or something i will send you a file

                        ramsha kanwalR Offline
                        ramsha kanwalR Offline
                        ramsha kanwal
                        wrote on last edited by
                        #43

                        @Nabeel-Chaudhary ramsha.vu@gmail.com

                        1 Reply Last reply
                        0
                        • Nabeel ChaudharyN Nabeel Chaudhary

                          @ramsha-kanwal Give me your email or something i will send you a file

                          ramsha kanwalR Offline
                          ramsha kanwalR Offline
                          ramsha kanwal
                          wrote on last edited by
                          #44

                          @Nabeel-Chaudhary w8 kru k so jau?

                          1 Reply Last reply
                          0
                          • Nabeel ChaudharyN Nabeel Chaudhary

                            @ramsha-kanwal Give me your email or something i will send you a file

                            ramsha kanwalR Offline
                            ramsha kanwalR Offline
                            ramsha kanwal
                            wrote on last edited by
                            #45

                            @Nabeel-Chaudhary btay?

                            1 Reply Last reply
                            0
                            • ramsha kanwalR Offline
                              ramsha kanwalR Offline
                              ramsha kanwal
                              wrote on last edited by
                              #46

                              ab to so hi jana chaye fr

                              1 Reply Last reply
                              0
                              • ramsha kanwalR ramsha kanwal

                                mery pas file hai pr mujhy idhr uplod ni krni aa rahi

                                mehwishM Offline
                                mehwishM Offline
                                mehwish
                                Cyberian Publisher's
                                wrote on last edited by
                                #47

                                @ramsha-kanwal
                                Simple reply the topic and upload file
                                Capture+_2020-01-24-00-38-48.png

                                Discussion is right way to get Solution of the every assignment, Quiz and GDB.
                                We are always here to discuss and Guideline, Please Don't visit Cyberian only for Solution.
                                Cyberian Team always happy to facilitate to provide the idea solution. Please don't hesitate to contact us!
                                %(red)[NOTE: Don't copy or replicating idea solutions.]
                                Quiz Copy Solution
                                Mid and Final Past Papers
                                Live Chat

                                1 Reply Last reply
                                0
                                • zareenZ Offline
                                  zareenZ Offline
                                  zareen
                                  Cyberian's Gold
                                  wrote on last edited by
                                  #48

                                  The FIRST of a sentential form is the set of terminal symbols that lead any sentential from derived from the very first sentential form. In this particular case X and Y only derive the empty string and as a result the empty string is the FIRST set of both non-terminal symbols X and Y. The FIRST of S, however, includes “a” as in the first production once can derive a sentential form that starts with an “a” given that X can be replaced by the empty string. X similar reasoning allows you to include “b” in the FIRST(S).
                                  summary: FIRST(X) = {e}, FIRST(Y) = {e}, FIRST(S) = {a, b}

                                  The FOLLOW set of a non-terminal symbol is the set of terminals that can appear after that non-terminal symbol in any sentential form derived from the grammar’s start symbol. By definition the follow of the start symbol will automatically include the $ sign which represents the end of the input string. In this particular case by looking at the productions of S one can determine right away that the follow of X includes the terminal “a” and “b” and that the FOLLOW of Y includes the terminal “b”. Given that the non-terminal S does not appear in any productions, not even in its own productions, the FOLLOW of S is only $.
                                  summary: FOLLOW(S) = {$}, FOLLOW(X) = {a, b}, FOLLOW(Y) = {b}.

                                  b) YES, because the intersection of the FIRST for every non-terminal symbol in empty. This leads to the parsing table for this LL method as indicated below. As there is no conflict in entry then grammar is clearly LL (1).
                                  [23/01, 21:33] Waqas Ahmad: a b $
                                  S S→XaXb S → Yb
                                  A X→ε X→ε
                                  B Y→ε

                                  Discussion is right way to get Solution of the every assignment, Quiz and GDB.
                                  We are always here to discuss and Guideline, Please Don't visit Cyberian only for Solution.
                                  Cyberian Team always happy to facilitate to provide the idea solution. Please don't hesitate to contact us!
                                  %(red)[NOTE: Don't copy or replicating idea solutions.]
                                  Quiz Copy Solution
                                  Mid and Final Past Papers
                                  Live Chat

                                  1 Reply Last reply
                                  0

                                  Reply
                                  • Reply as topic
                                  Log in to reply
                                  • Oldest to Newest
                                  • Newest to Oldest
                                  • Most Votes


                                  How to Build a $1,000/Month PAK VS BAN Live Live Cricket Streaming
                                  File Sharing
                                  Earn with File Sharing

                                  0

                                  Online

                                  3.0k

                                  Users

                                  2.8k

                                  Topics

                                  8.2k

                                  Posts
                                  solution
                                  1235
                                  discussion
                                  1195
                                  fall 2019
                                  813
                                  assignment 1
                                  428
                                  assignment 2
                                  294
                                  spring 2020
                                  265
                                  gdb 1
                                  238
                                  assignment 3
                                  79
                                  • PM. IMRAN KHAN
                                    undefined
                                    4
                                    1
                                    4.0k

                                  • Are the vaccines halal or not?
                                    undefined
                                    4
                                    1
                                    3.8k

                                  • All Subjects MidTerm and Final Term Solved Paper Links Attached Please check moaaz past papers
                                    zaasmiZ
                                    zaasmi
                                    3
                                    26
                                    75.1k

                                  • CS614 GDB Solution and Discussion
                                    M
                                    moaaz
                                    3
                                    3
                                    8.1k

                                  • How can I receive Reputation earning from Cyberian? 100% Discount on Fee
                                    Y
                                    ygytyh
                                    3
                                    28
                                    23.9k
                                  | |
                                  Copyright © 2010-26 RUP Technologies LLC. USA | Contributors
                                  • Login

                                  • Don't have an account? Register

                                  • Login or register to search.
                                  • First post
                                    Last post
                                  0
                                  • Categories
                                  • Recent
                                  • Tags
                                  • Popular
                                  • Pro Blog
                                  • Users
                                  • Groups
                                  • Unsolved
                                  • Solved