Formal Semantics
-
Static Semantics
- Gives global constraints (types of variables and expressions,
visibility rules, etc.)
- Define what is a legal program (at compile time)
-> Gives semantic contraints across a document, a Web site or I.S.
-
Dynamic Semantics
- Describes how a program is executed
-> Formalize the navigation in a site (its use)
-
Natural Semantics
- A Structural Operational Semantics
- Designed to define the semantics of programming languages
- Compiled to Prolog code
- Semantics is expressed by mean of inference rules which define
a set of valid theorems (theory)
- Environments contain mapping from names to types or values
e |- A : a
e |- B : b
--------------------------------
e |- plus(A, B) : a+b