PL domain
Three consequences of semantic gap are in fact consequences of a specification gap.
Large development time Large development effort Poor software quality
Solution
Develop PL such that PL domain is very close or identical to application domain.
PL domain
Such PLs can only be used for specific applications, hence they are called problem oriented language
They have large execution gap, however this is acceptable because gap id bridge by the translator or interpreter and does not concern with software developer
PL domain
Procedure oriented language provides general purpose facilities required in most application domains. Such a language independent of specific application domain and results in large specification gap which has to be bridged by a application designer.
Program generation
The program generation activities are shown as
The program generator is a software which accepts the specification of a program to be generated and generates a program written in target PL.
Program generation
Program generator introduce new domain
Reduction in specification gap increases the reliability of the generated program. Since the generator domain is close to the application domain, it is easy for the designer / programmer to write specification of program to be generated.
Program generation
This arrangements also reduce testing efforts To test an application generated by using the generator, it is necessary to only verify correctness of the specification of input to the program generator. This is much simpler task than verifying correctness of the generated program
Thus the language processing activities of an interpreter can not separated from its program execution activities, hence we say that interpreter executes program written in a PL.