Quantcast

Got Homework?

Connect with other students for help. It's a free community.

  • across
    MIT Grad Student
    Online now
  • laura*
    Helped 1,000 students
    Online now
  • Hero
    College Math Guru
    Online now

Here's the question you clicked on:

55 members online
  • 0 replying
  • 0 viewing

adaadaajagan Group Title

Hi, I am watching video lecture 1 and starting a confession with syntax, static semantic, and full semantic. Can someone explain me more detail ?

  • 3 years ago
  • 3 years ago

  • This Question is Closed
  1. carlsmith Group Title
    Best Response
    You've already chosen the best response.
    Medals 2

    The key here is in the difference between syntax and semantics, but don't get hung up on these issues too much, it's pretty intuitive as you go along. Most people can speak English without knowing these things. Semantics is the meaning of the elements of a language. The expression, 5 + 10, means, take the number five and add the number ten to it. Syntax refers to the rules of how things should be done in the language. With 5 + 10, you have rules. For example, the operator, the + sign, must be between the operands, the 5 and the 10. You can not do + 10 5. You can not do 5 10 +, because it breaks the rules. It's pretty obvious stuff, but it is important when working in a programming language. In English you can break rules and call yourself eccentric, with a programming language, the computer will just crash. When you here people say syntax, they generally just mean the way you write stuff. When they talk about the semantics, they are on about what the stuff your writing means. I'd be happy to try and elaborate a bit if you needed more.

    • 3 years ago
  2. adaadaajagan Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    Thank you for answering my question. To make it more clearly, what's the different static semantic and full semantic ?

    • 3 years ago
  3. carlsmith Group Title
    Best Response
    You've already chosen the best response.
    Medals 2

    To be honest, I don't think he means for you to make too much of a distinction between the two. Quote ''' Second thing we want to talk about very briefly as we go along is the semantics of the language. And here we're going to break out two pieces; static semantics and full semantics. Static semantics basically says which programs are meaningful. Which expressions make sense. Here's an English sentence. It's syntactically correct. Right? Noun phrase, verb, noun phrase. I'm not certain it's meaningful, unless you are in the habit of giving your furniture personal names. What's the point? Again, you can have things that are syntactically legal but not semantically meaningful, and static semantics is going to be a way of helping us decide what expressions, what pieces of code, actually have real meaning to it. All right? The last piece of it is, in addition to having static semantics, we have sort of full semantics. Which is, what does the program mean? Or, said a different way, what's going to happen when I run it? That's the meaning of the expression. That's what you want. All right? You want to know, what's the meaning of this piece of code? When I run it, what's going to happen? That's what I want to build. ''' End Quote I think he's just saying, you have semantics ~ what does each bit of code mean ~ and then... we have, sort of, 'full' semantics ...what does our program do. I don't think he meant to make the two distinct, he just meant that you should look at how the program's meaning is the total of the meaning of it's parts. I might be wrong, but I think that's what he meant.

    • 3 years ago
  4. carlsmith Group Title
    Best Response
    You've already chosen the best response.
    Medals 2

    I'd be interested to know if any one interprets it differently. That's just what I got from what he was saying.

    • 3 years ago
  5. adaadaajagan Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    Thank you

    • 3 years ago
    • Attachments:

See more questions >>>

Your question is ready. Sign up for free to start getting answers.

spraguer (Moderator)
5 → View Detailed Profile

is replying to Can someone tell me what button the professor is hitting...

23

  • Teamwork 19 Teammate
  • Problem Solving 19 Hero
  • You have blocked this person.
  • ✔ You're a fan Checking fan status...

Thanks for being so helpful in mathematics. If you are getting quality help, make sure you spread the word about OpenStudy.

This is the testimonial you wrote.
You haven't written a testimonial for Owlfred.