

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
An overview of programming languages, focusing on their lexical, syntactic, contextual, and semantic structures. It also covers the process of translating languages and the different approaches to representing dynamic semantics. Additionally, it introduces various programming language paradigms and good language design principles.
Typology: Assignments
1 / 3
This page cannot be seen from the preview
Don't miss anything!


a) I. Lexial structure defines the vocabulary of a language.Lexial units are considered building blocks of programming languages. The lexical structure of all programming languages are similar and normally include the following kinds of units:identifiers,keywords,operators,separators,literials and comments. II. Syntactic structure defines the grammar of forming sentences or statements using the lexical units. An imperative programming language normally offers the following kinds of statements:Assignments,Conditional statements and loop statemants. III. Contextual structure (also called static semantics) defines the program semantics before dynamic execution. It includes variable declaration, initialization, and type checking. IV. Semantic structure describes the meaning of a program, or what the program does during the execution. The semantic structures of functional and logic programming languages are normally defined based on the mathematical and logical foundation on which the languages are based.
b)
Translation of language involves the following;
i).translation- this step renders a particular language to a target language. Its done by computer assisted translation where the original text is rendered in segments, the segments can be full text.
ii).editing- it refers the reviewing of the already translated segments in the previous step. The editor may work as the translation tool but if revise the segment and corrects the translation incase of and error.
iii)proofreading- the step of language translation mostly focuses on already translated and edited text to run smoothly to target language.
c)Approaches that can be used to represent dynamic semantics.
Operational semantics โ describes the meaning of a program by executing its statements on a machine either simulated or actual.
Axiomatic semantics โ define meaning of programming language construct by effect on logical assertions about constraints on program variables. It is based on predicate calculus. Approach comes from program verification.
Denotational Semantics โ defines a function that maps a program (a syntactic object) to its meaning (a semantic object). It is based on recursive function theory.
d)Programming languages paradigms
1. Imperative programming paradigm- - It is based on Von Neumann architecture. It works by changing the program state through assignment statements. It performs step by step task by changing state. The main focus is on how to achieve the goal. The paradigm consist of several statements and after execution of all the result is stored.
Examples of Imperative programming paradigm: C , Fortan,Basic
2. Logic programming paradigms โ It would solve logical problems like puzzles, series etc. In logic programming we have a knowledge base which we know before and along with the question and knowledge base which is given to machine, it produces result. In normal programming languages, such concept of knowledge base is not available but while using the concept of artificial intelligence, machine learning we have some models like Perception model which is using the same mechanism.
3.Functional programming paradigms โ
The key principal of this paradigms is the execution of series of mathematical functions. The central model for the abstraction is the function which are meant for some specific computation and not the data structure. Data are loosely coupled to functions.The function hide their implementation. Function can be replaced with their values without changing the meaning of the program. Some of the languages like perl, javascript mostly uses this paradigm.
4.Procedural programming paradigm โ This paradigm emphasizes on procedure in terms of under lying machine model. There is no