Draw a natural semantics export tree

Assignment Help Strategic Management
Reference no: EM132375954

TASK 1

1) Write unambiguous grammar in BNF and EBNF forms for logical expressions composed of:
• constants tt and ff,
• variables (the variable name starts with a capital letter. Follows a string of none, one or more upper case and lower case letters) and
• operations and, or, xor, => („follows") un <=> ("equivalent"),
• brackets ( ), which can be used to determine the sequence of execution of other operations within the expression value calculation

EBNF grammar must be formatted so that in any export rule no left-hand symbol appears in the corresponding right-hand expression.

Outside brackets, or within single brackets expressions:
• the arguments are most closely connect by operation and,
• next closely are operations or and xor (the same priority),
• next closely is operation =>,
• next closely is operation <=>.
Make grammar such that and, or, xor, <=> associate to the left, but => associate to the right.

Examples:
X1 and X3 or X2 => X1 <=> tt and X1 correspond (matches)
(((X1 and X3) or X2) => X1) <=> (tt and X1).
X1 xor X2 xor X3 correspond (matches) (X1 xor X2) xor X3 X1 => X2 => X3 correspond (matches) X1 => (X2 => X3)

2) Create a logical expression that does not contain brackets ( ) and contains exactly 6 logical links, including each of the links and, or, xor, => , <=> at least once.

3) Draw for this expression parse tree.

4) Write one output (export) example how from the beginning non-terminal symbol corresponding to your grammar rules to get the expression of your choice.

TASK 2
Given a program:

a := a + 13;

while i > n do
if i-1 >= n then
a := a - i

else

fi;

a := a + (2 * i)

i := i - 1
od

1) Draw a natural semantics export tree that describes the action of this program from the initial state σ = {i
= NN + 3, n = NN, a = 15}. NN=40

2) Create structural operational semantics (small step semantics) output (export) (string of states and their transitions with motivated transition steps) according to the action of given program from the given starting state σ.

Verified Expert

In this assignment we have studied unambiguous grammar in BNF and EBNF form.I have developed a grammar then solve it using parse tree as well as i have performed semantic analyse on program to check what is going to be happened in the written program

Reference no: EM132375954

Questions Cloud

Differentiate between acute and chronic pain : Differentiate between acute and chronic pain, the different assessment tools that can be used depending on the age of the patient, and management of pain.
Perfect employees for hire or are they possibly problematic : Are these people the perfect employees for hire or are they possibly problematic?
Gamification model for hiring : Gamification is another alternative model. With gamification you create games that people play and those who demonstrate talent are the ones approached for hire
Reality tv model for hiring : Are there logical problems with the use of such challenges for employment selection?
Draw a natural semantics export tree : Write unambiguous grammar in BNF and EBNF forms for logical expressions - Write one output (export) example how from the beginning non-terminal symbol
Man-made disasters that result in mass casualties : Writer outlines a plan for reacting to natural and/or man-made disasters that result in mass casualties.
Calculate Mary Total Net Capital Gain : BAC318/BACC318 - Taxation Law and Practice/Taxation Law and Compliance Assignment, Melbourne Polytechnic?, Australia. Calculate Mary Total Net Capital Gain
Define and give a specific business : Define and give a specific business' use of wireless technology in detail.
Give examples where your accepted : From a global perspective, give examples where your accepted/familiar way of motivation may work in one culture but not in another culture?

Reviews

Write a Review

Strategic Management Questions & Answers

  How does petco compete with petsmart

How does Petco compete with PetSmart and other pet food stores, and how does the company's competitive strategy relate to its internal analysis?

  Calculate capacities of all resources-identify bottleneck

Calculate the capacities of all resources and identify the bottleneck. What is the capacity (in dozens per hour) and the steady-state system capacity (in dozens

  Define the primary components of the management process

Describe and define the primary components of the Strategic Management Process. Describe and define internal and external analysis.Describe and define the responsibilities and duties of the Strategic Manager.

  Impact of the greek financial crisis

impact of the Greek financial crisis on the Greek Super League (professional football) and undertake an analysis of the competitive environment

  Discuss the elements of strategic management

Discuss the elements of strategic management and explain why it is crucial to an organization's survival.

  Strategic management plan for assisted living facilities

Write Strategic Management Plan for Assisted Living Facilities

  Determine the appropriate strategy and ways of implementing

Answer the given quetion below. 1. Identify a company of your choice and conduct different types of market research on their product. 2. Determine the appropriate strategy and ways of implementing the products and services that satisfy the needs/want..

  Eec production activities

As The financial analysis here at EEC I am suggesting that all of EEC's production activities be analyzed further. My reasoning that in doing so it will allow us to make some necessary vital decisions which will increase production in the needed a..

  Case study: internet mini on williams-sonoma

Case study: Internet Mini on Williams-Sonoma

  What is your rationale for formulating this strategy

What would be a strategic goal you would propose for a nursing home that would enable it to be profitable? What is your rationale for formulating this strategy

  Process of change used by your case organisation

Review critically the process of change used by your case organisation and demonstrate you understanding of different change strategies through reviewing the case; identifying an alternative model, applying and evaluating it.

  What will your inventory system of the future look like

Dealing with Oversupply "My first boss in the steel industry told me, nobody thinks there's any inventory until they look out the window and say.

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