Programming principles & techniques
COURTESY :- vrindawan.in
Wikipedia
A programming language is a system of notation for writing computer programs. Most programming languages are text-based formal languages, but they may also be graphical. They are a kind of computer language.
The description of a programming language is usually split into the two components of syntax (form) and semantics (meaning), which are usually defined by a formal language. Some languages are defined by a specification document (for example, the C programming language is specified by an ISO Standard) while other languages (such as Perl) have a dominant implementation that is treated as a reference. Some languages have both, with the basic language defined by a standard and extensions taken from the dominant implementation being common.
Programming language theory is a subfield of computer science that deals with the design, implementation, analysis, characterization, and classification of programming languages.
The term computer language is sometimes used interchangeably with programming language. However, the usage of both terms varies among authors, including the exact scope of each. One usage describes programming languages as a subset of computer languages. Similarly, languages used in computing that have a different goal than expressing computer programs are generically designated computer languages. For instance, markup languages are sometimes referred to as computer languages to emphasize that they are not meant to be used for programming. One way of classifying computer languages is by the computations they are capable of expressing, as described by the theory of computation. The majority of practical programming languages are Turing complete, and all Turing complete languages can implement the same set of algorithms. ANSI/ISO SQL-92 and Charity are examples of languages that are not Turing complete, yet are often called programming languages. However, some authors restrict the term “programming language” to Turing complete languages.
Another usage regards programming languages as theoretical constructs for programming abstract machines, and computer languages as the subset thereof that runs on physical computers, which have finite hardware resources. John C. Reynolds emphasizes that formal specification languages are just as much programming languages as are the languages intended for execution. He also argues that textual and even graphical input formats that affect the behavior of a computer are programming languages, despite the fact they are commonly not Turing-complete, and remarks that ignorance of programming language concepts is the reason for many flaws in input formats.
In most practical contexts, a programming language involves a computer; consequently, programming languages are usually defined and studied this way. Programming languages differ from natural languages in that natural languages are only used for interaction between people, while programming languages also allow humans to communicate instructions to machines.
The domain of the language is also worth consideration. Markup languages like XML, HTML, or troff, which define structured data, are not usually considered programming languages. Programming languages may, however, share the syntax with markup languages if a computational semantics is defined. XSLT, for example, is a Turing complete language entirely using XML syntax. Moreover, LaTeX, which is mostly used for structuring documents, also contains a Turing complete subset.
This category describes rules and aphorisms applicable to software engineering. They range from the highly formal to those open to interpretation, and from serious to humorous. Whether to apply any given rule universally, in which situations to apply it, and what it implies should be done are often active subjects of conversation and debate.
Compilers: Principles, Techniques, and Tools is a computer science textbook by Alfred V. Aho, Monica S. Lam, Ravi Sethi, and Jeffrey D. Ullman about compiler construction for programming languages. First published in 1986, it is widely regarded as the classic definitive compiler technology text.
It is known as the Dragon Book to generations of computer scientists as its cover depicts a knight and a dragon in battle, a metaphor for conquering complexity. This name can also refer to Aho and Ullman’s older Principles of Compiler Design.
The first edition (1986) is informally called the “red dragon book” to distinguish it from the second edition and from Aho & Ullman’s 1977 Principles of Compiler Design sometimes known as the “green dragon book”. Topics covered in the first edition include:
- Compiler structure
- Lexical analysis (including regular expressions and finite automata)
- Syntax analysis (including context-free grammars, LL parsers, bottom-up parsers, and LR parsers)
- Syntax-directed translation
- Type checking (including type conversions and poly mor phism)
- Run-time environment (including parameter passing, symbol tables and register allocation)
- Code generation (including intermediate code generation)
- Code optimization
Following in the tradition of its two predecessors, the second edition (2006) features a dragon and a knight on its cover, and is informally known as the purple dragon. Monica S. Lam of Stanford University became a co-author with this edition.
The second edition includes several additional topics, including:
- Directed translation
- New data flow analyses
- Parallel machines
- Garbage collection
- New case studies