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

  Case study in strategic plan adelphi art centre

Strategic plan or strategic planning of  Adelphi Art Centre in Adelphi, Australia.

  Pestle analysis of a new uk based business plan

Key trend of PESTEL tool  analysis in UK in the next three years.

  Diversity reflection paper

This document describes an exercise that could used to increase students' sensitivity to workforce diversity and related issues of power.

  Crafting a personal vision and mission statement

Crafting a Personal Vision and Mission Statement

  Business strategy and strategic human resource management

This project report describes the co-ordination and alignment of business strategy with strategic human resource management.

  Steak sauce - lawry’s defense: case analysis

Steak Sauce: Lawry's Defense" case to complete a formal written case analysis

  Write a report on best buy strategic audit

Write a report on best buy strategic audit which inhibits the corporate governance, corporate culture, and under Corporate Resources.

  Cross-cultural management

To develop an awareness and comprehensive understanding of the influence of culture on management

  Calculate the expected value of returns of stock

Calculate the expected value of returns of stock.

  Influence the making of public policy

Write a paper on interest groups and how they seek to influence the making of public policy.

  Strategic management principles

Strategic Management principles

  Resource base view theory versus positioning theory

Explain Resource Base View theory versus Positioning theory

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