The semantic context

Semantic context

Semantics are the meaning of various elements in the program (or whatever).

For example, let's look at this code:

int width, numberOfChildren;

Both of these variables are integers. From the compiler's point of view, they are exactly the same. However, judging by the names, one is the width of something, while the other is a count of some other things.

numberOfChildren = width;

Syntactically, this is 100% okay, since you can assign integers to each other. However, semantically, this is totally wrong, since the width and the number of children (probably) don't have any relationship. In this case, we'd say that this is semantically incorrect, even if the compiler permits it.

Related video
Semantic Context Aware Service Composition for Building
Semantic Context Aware Service Composition for Building ...
Auto-adapting homes to context: a semantic-based evolution
Auto-adapting homes to context: a semantic-based evolution ...
Context-aware Semantic Web Services matchmaking for eLearning
Context-aware Semantic Web Services matchmaking for eLearning
Morgan Kaufmann Blondie24: Playing at the Edge of AI (The Morgan Kaufmann Series in Artificial Intelligence)
Book (Morgan Kaufmann)
  • David B. Fogel
  • math
  • technology
Interesting facts
Related Posts