Professional Documents
Culture Documents
Basic Definition
Question:
Is a Programming Language can be
considered as an example of Formal
Language?
Answer:
Programming languages are formal
languages that have been designed to
express computations.
Cont.. What is Formal language?
3+3 = 6 - √
3=+6$ - x
H 2O - √
2HO - x
Cont… What is Formal semantics?
Example
1. Axiomatic semantics
2. Denotational semantics
3. Operational semantics
Application Areas
Denotational: meaning
– Which semantics provides properties?
Operational: implementation
– How can semantics be implemented?
Relationship
Axiomatic semantics
Where S – state
C - command
#include<stdio.h>
main(){
int b = 0;
while (b<5){
printf(" the value of b is %d\n", i);
b = b + 1;
}
}
Source
http://www.inf.ed.ac.uk/teaching/courses/fpls/
http://www.vias.org/cppcourse/chap01_05.html
http://en.wikipedia.org/wiki/Formal_semantics_
of_programming_languages
http://www.csci.csusb.edu/dick/cs620/denotatio
nal.html
http://www.csci.csusb.edu/dick/cs620/while.htm
l#A