00:01
Hello students to give a complete formal semantic to the small imperative c language c like a language so we use the formal semantics of the operational semantic describes how the program execution steps are performed and the resulting state transition.
00:21
So, well define the semantic using the inference rules.
00:25
So, let's define the formal semantic for the given grammar.
00:30
So, for that we will define as the syntax as for the syntax definition for the syntax let me define those things syntax definitions for the first is the probe probe is nothing but it represents a program which essentially a list of the statement.
00:52
The next is the stmt list stmt list it represents the list of the statement separated by the semicolons whereas the stm just the stm it represents the individual statements in the language and the id it represents the identity identifiers that those are nothing but the variable names then the ptr ptr is it represents the pointer symbol it represents the pointer symbol and the x expr is it represents the expressions whereas whereas the r value the r value r value it represents the right hand side values and also the semantic definitions like the what is the semantic it uses the notation of the state stmt state to represent the trans to represent the transition of the program state from the state state to when it executes the smt list when it executes the smt list.
02:00
So, for this as as initially this state as the so for this an assignment as the a we can see here the assignment rule a as the assignment rule.
02:11
So, for this for the a assignment assignment where where this state as the it states its syntax as a state of x is to e where the state that assigns the value of the expression e to the variable x fine to the expression of the way of the expression e to the x whereas the option the next is the dereferencing dereferencing dereferencing in dereferencing syntax for this it represents as the state of product of x into is to e where the state assigns the value of the expression e to the memory location pointed by the variable x.
03:04
So, this star x it represents the pointed so it represents nothing but the pointer so pointed by the variable x whereas the second is the pointer assignment pointer assignment pointer assignment in the pointer assignment its state as its syntax as the state of x is to ampersand of y...