Synopsis Description of the properties of a program that can be determined/checked before it is executed.
Description The static semantics of a program describe all properties that can be determined before the program is executed. A Typechecker is a tool that checks the properties of a program as described by its static semantics.

Static semantics describes properties that are relevant before a program is executed and differs from DynamicSemantics that describes the execution behaviour itself.
Examples Examples of static semantic properties include:
  • The proper use of types.
  • The proper use of names.
Language with substantial static semantics: Java, Haskell, Rascal. Languages with only dynamic semantics: Python, Ruby.
Is this page unclear, or have you spotted an error? Please add a comment below and help us to improve it. For all other questions and remarks, visit