A programming language is a notation for writing

Views:
 
Category: Entertainment
     
 

Presentation Description

kjgug

Comments

Presentation Transcript

A programming language is a notation for writing programs, which are specifications of a computation or algorithm., but not all, authors restrict the term "programming language" to those languages that can express all possible algorithms.[1 Traits often considered important for what constitutes a programming language include:: 

A programming language is a notation for writing programs , which are specifications of a computation or algorithm ., but not all, authors restrict the term "programming language" to those languages that can express all possible algorithms. [1 Traits often considered important for what constitutes a programming language include:

All programming languages have some primitive building blocks for the description of data and the processes or transformations applied to them (like the addition of two numbers or the selection of an item from a collection). These primitives are defined by syntactic and semantic rules which describe their structure and meaning respectively: 

All programming languages have some primitive building blocks for the description of data and the processes or transformations applied to them (like the addition of two numbers or the selection of an item from a collection). These primitives are defined by syntactic and semantic rules which describe their structure and meaning respectively

Slide 3: 

All programming languages have some primitive building blocks for the description of data and the processes or transformations applied to them (like the addition of two numbers or the selection of an item from a collection). These primitives are defined by syntactic and semarespectivelyntic rules which describe their structure and meaning

Slide 4: 

Semantics Further information: Semantics#Computer_science The term semantics refers to the meaning of languages, as opposed to their form (syntax). [ edit ] Static semantics The static semantics defines restrictions on the structure of valid texts that are hard or impossible to express in standard syntactic formalisms. [1] For compiled languages, static semantics essentially include those semantic rules that can be checked at compile time. Examples include checking that every identifier is declared before it is used (in languages that require such declarations) or that the labels on the arms of a case statement are distinct. [28] Many important restrictions of this type, like checking that identifiers are used in the appropriate context (e.g. not adding an integer to a function name), or that subroutine calls have the appropriate number and type of arguments, can be enforced by defining them as rules in a logic called a type system . Other forms of static analyses like data flow analysis may also be part of static semantics. Newer programming languages like Java and C# have definite assignment analysis , a form of data flow analysis, as part of their static semantics. Dynamic semantics Main article: Semantics of programming languages Once data has been specified, the machine must be instructed to perform operations on the data. For example, the semantics may define the strategy by which expressions are evaluated to values, or the manner in which control structures conditionally execute statements . The dynamic semantics (also known as execution semantics ) of a language defines how and when the various constructs of a language should produce a program behavior. There are many ways of defining execution semantics. Natural language is often used to specify the execution semantics of languages commonly used in practice. A significant amount of academic research went into formal semantics of programming languages , which allow execution semantics to be specified in a formal manner. Results from this field of research have seen limited application to programming language design and implementation outside academia