Question

What do you understand by denotational semantics? Explain through your assignment example of decimal numbers? How...

What do you understand by denotational semantics? Explain through your assignment example of decimal numbers? How is denotational semantics different from axiomatic semantics? Explain.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

DENOTATIONAL SEMANTICS:-

The Denotational semantics is an approach for providing mathematical meaning to systems and programming languages. In other words, denotational semantics is a formal technique for expressing the semantic definition of programming languages. the methodology comprises notational elegance and mathematical rigor. Denotational semantics initially designed as an analysis tool for implementation and language design.

In denotational semantics, the basic idea is mapping every syntactic entity associated with a programming language into some form of mathematical entity and translating programming language constructs into mathematical objects. Denotational semantics have been developed for modern languages which have features like exceptions and concurrency.

EXAMPLE FOR DENOTATIONAL SEMANTICS:-

DIFFERENCE BETWEEN DENOTATIONAL SEMANTICS AND AXIOMATIC SEMANTICS:-

Denotational semantics:

This says that meanings are modeled by mathematical objects that represent the effect of executing the constructs.

It is of interest only the effect of computation, not how it is produced.

My understanding of this is mathematical functions, which take something as an input, do some computation and produce a result, which you care about.

Axiomatic semantics:-

Some properties of the effect of executing the constructs are expressed as assertions.

Some aspects of the executions may be ignored.

This is that it's related to boolean algebra and logic.

Example:

If expr1 is False then the entire Boolean expression is False and it short-circuits, expr2 is not evaluated.

if expr1:

elif expr2:

elif expr3:

else:

The effect is the result of executing the above construct and you assert its value based on whichever boolean expression yields true, the rest of them being ignored.

THANK YOU.

Add a comment
Know the answer?
Add Answer to:
What do you understand by denotational semantics? Explain through your assignment example of decimal numbers? How...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT