Skip to main content

Static Semantics



Description of the properties of a program that can be determined/checked before it is executed.


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 describe properties that are relevant before a program is executed and differ from Dynamic Semantics that describe the execution behaviour itself.


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.