Defines the semantic checks necessary to produce

Assignment Help Database Management System
Reference no: EM13337394

The third project involves writing the semantic analyzer for the compiler that was begun in the previous projects. To simplify the semantic error checking, you are to remove the ability to have multiple functions from the grammar and the ability to make function calls.

In order to perform semantic analysis, the symbol table must be completed in this project. The 70 points that you will receive for the functionality portion of your grade on this project will be based on how many of the following errors that you can detect:

Using Boolean Expression with Arithmetic Operator
Using Boolean Expression with Relational Operator
Using Arithmetic Expression with Logical Operator
Conditional Expression Type Mismatch
If Condition Not Boolean
Narrowing Variable Initialization
Variable Initialization Mismatch
Undeclared Variable
Duplicate Variable
Narrowing Function Return

Test data that contains each of the following errors will be provided.

This project requires modification to the bison input file, so that it defines the semantic checks necessary to produce these errors and the inclusion of a symbol table to keep track of the declared identifiers.

Variables and parameter names have local scope. The scope rules require that all names be declared and prohibit duplicate names within the same scope. The type correspondence rules are as follows:

  • Boolean operators cannot be used with arithmetic or relational operators.
  • Arithmetic expressions cannot be used with logical operators.
  • The two expressions in a conditional expression must match in type. No coercion is performed.
  • The type of the if condition must be Boolean.
  • A narrowing variable initialization or function return occurs when a real value is being forced into integer. Widening is permitted.
  • Boolean types cannot be mixed with numeric types in variable initializations or function returns.
  • Type coercion from an integer to a real type is performed within arithmetic expressions.

Like syntax errors, the compiler should display the semantic errors in the compilation listing, after the line in which they occur.

Reference no: EM13337394

Questions Cloud

How much will the gas leak have caused astronaut to move : The total mass of the astronaut with her space suit and all her gear is 125 kg. A small leak develops in her propulsion system and 5.99 g of gas are ejected each second into space with a speed of 781 m/s.
What is the linear resonant frequency of the circuit : An RLC circuit shown above with a peak voltage of 240 V, f = 60 Hz, R = 100 Kilo Ohms, L = 0.5 mH, C = 200 micro F, What is the linear resonant frequency of the circuit
Determine what would the earths surface temperature be : What is this flux expressed as a fraction of the energy flux due to thermal re-radiation of absorbed solar energy. If radioactive decay were the only heat source for the Earth, what would the Earth's surface temperature be.
Analyse the situation and the effect of the change request : Analyse the situation and the effect of the change request on the schedule, cost, and features.
Defines the semantic checks necessary to produce : The third project involves writing the semantic analyzer for the compiler that was begun in the previous projects. To simplify the semantic error checking, you are to remove the ability to have multiple functions from the grammar and the ability t..
What are some of the elements you agree or disagree with : Institutional economics and neo-classical economics. Off-hand, which of the two seems like a more sensible approach? What are some of the elements you agree or disagree with?
Prepare a single-step income statement : Prepare a single-step Income Statement and simple Balance Sheet for Smith Delights Bakery for the year ended December 31, 2011.
What force is curving the trajectory of accelerating hadrons : At LHC, what force is curving the trajectory of accelerating hadrons, forcing them to pass trillions of times around the tunnel track, before they are collided
Calculate the mass of the lead block : A lead block is suspended from the underside of a 0.5 kg block of wood of density of 728 kg/m3. what is the mass of the lead block

Reviews

Write a Review

Database Management System Questions & Answers

  Knowledge and data warehousing

Design a dimensional model for analysing Purchases for Adventure Works Cycles and implement it as cubes using SQL Server Analysis Services. The AdventureWorks OLTP sample database is the data source for you BI analysis.

  Design a database schema

Design a Database schema

  Entity-relationship diagram

Create an entity-relationship diagram and design accompanying table layout using sound relational modeling practices and concepts.

  Implement a database of courses and students for a school

Implement a database of courses and students for a school.

  Prepare the e-r diagram for the movie database

Energy in the home, personal energy use and home energy efficiency and Efficient use of ‘waste' heat and renewable heat sources

  Design relation schemas for the entire database

Design relation schemas for the entire database.

  Prepare the relational schema for database

Prepare the relational schema for database

  Data modeling and normalization

Data Modeling and Normalization

  Use cases perform a requirements analysis for the case study

Use Cases Perform a requirements analysis for the Case Study

  Knowledge and data warehousing

Knowledge and Data Warehousing

  Stack and queue data structure

Identify and explain the differences between a stack and a queue data structure

  Practice on topic of normalization

Practice on topic of Normalization

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd