Skip to main content

Static Semantics

rascal-0.40.17

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