Knowee
Questions
Features
Study Tools

Differentiate between functional and logical programming languages.B.Give one example under each.c. List 3 programming languages that are suitable for artificial intelligence.d. What is metalanguage?i. List four types of metalanguage?5. list the phases of the compilation process and briefly explain them.6. Using Top – down analysis draw syntactic trees (parse trees) for thefollowing expressions using BNF.i. w + 5 * (t – d / s ) – 2ii. f * k / 4 + m – s + c7. Give the regular set for the following regular expressions.i. ab*cii. a*b*ciii. A2B3C where A ={1 0}, B = {0 0} and C = {0 0 1 0}8. Differentiate between TOP – DOWN and BOTTOM – UP parsing.9. Briefly explain the types of grammer.10.Using the production rule for expression draw a pass tree fori. (c * d ) – m / f – q * s + tii. a * f / q + s * w – d

Question

Differentiate between functional and logical programming languages.B.Give one example under each.c. List 3 programming languages that are suitable for artificial intelligence.d. What is metalanguage?i. List four types of metalanguage?5. list the phases of the compilation process and briefly explain them.6. Using Top – down analysis draw syntactic trees (parse trees) for thefollowing expressions using BNF.i. w + 5 * (t – d / s ) – 2ii. f * k / 4 + m – s + c7. Give the regular set for the following regular expressions.i. abcii. ab*ciii. A2B3C where A ={1 0}, B = {0 0} and C = {0 0 1 0}8. Differentiate between TOP – DOWN and BOTTOM – UP parsing.9. Briefly explain the types of grammer.10.Using the production rule for expression draw a pass tree fori. (c * d ) – m / f – q * s + tii. a * f / q + s * w – d

...expand
🧐 Not the exact question you are looking for?Go ask a question

Solution

This seems like a complex set of questions related to computer science and programming. Let's break it down:

  1. Functional vs Logical Programming Languages:

    • Functional Programming: This is a programming paradigm where programs are constructed by applying and composing functions. It emphasizes on expressions and declarations rather than execution of statements. Example: Haskell.
    • Logical Programming: This is a programming paradigm which is largely based on formal logic. Any program written in a logical programming language is a set of sentences in logical form, expressing facts and rules about some problem domain. Example: Prolog.
  2. Programming languages suitable for AI: Python, Lisp, and Prolog.

  3. Metalanguage: A metalanguage is a language used to make statements about statements in another language. Examples include HTML, XML, SGML, and UML.

  4. Phases of the Compilation Process:

    • Lexical Analysis: The phase where the source code is converted into a series of Tokens.
    • Syntax Analysis: The compiler checks the source code for syntactic structure.
    • Semantic Analysis: The compiler checks the source code for semantic errors.
    • Intermediate Code Generation: The compiler generates an intermediate code of the source code.
    • Code Optimization: The compiler optimizes the intermediate code for better performance.
    • Code Generation: The compiler generates the machine code.
  5. The creation of syntactic trees (parse trees) using BNF and Top-down analysis, as well as the regular set for the given regular expressions, would require a visual representation which cannot be provided in this text-based format.

  6. Top-Down vs Bottom-Up Parsing:

    • Top-Down Parsing: It starts from the top or the start symbol and parses the input to derive a string. This parsing technique recursively predicts its production until it matches the input.
    • Bottom-Up Parsing: It starts from the input and tries to reach the start symbol. This parsing technique constructs the parse tree from leaves to root.
  7. Types of Grammar: There are four types of grammar - Type 0 (Unrestricted Grammar), Type 1 (Context-Sensitive Grammar), Type 2 (Context-Free Grammar), and Type 3 (Regular Grammar).

  8. Drawing a parse tree for the given expressions using the production rule for expression would require a visual representation which cannot be provided in this text-based format.

This problem has been solved

Similar Questions

Programming languages are ______ languages that have been designed to express computations.Question 6Select one:a.informalb.mathematicalc.formald.naturale.logical

Research what a functional programming language is and write down two examples.

This question assesses your ability to research and reference key information about programming languages.i.Research what a functional programming language is and write down two examples.ii.For each of the programming languages you find, provide a short description and include an in-text citationiii.Properly reference the source of your information.

Which one of the following statements is true about the Java programming language?Question 2Answera.Java is a  functional programming languageb.None of the above.c.Java is an object programming language.d.Java is events driven programming language.e.Java is a procedural programming language.

1) Composition of functions2) Monoid3) Existential Quantifier4) Partially Ordered Set5) Boolean Algebra6) Tree7) Complete Graph

1/2

Upgrade your grade with Knowee

Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.