1 / 7

Programming Languages: Basics

Programming Languages: Basics. Evolution of Programming Languages. “Paper machines”: Turing, von Neumann Binary code -> Assembler Early procedural languages: Fortran Algol : ancestor of modern procedural languages LISP: elegant, mostly functional, AI-language

anja
Download Presentation

Programming Languages: Basics

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Programming Languages: Basics

  2. Evolution of Programming Languages • “Paper machines”: Turing, von Neumann • Binary code -> Assembler • Early procedural languages: Fortran • Algol: ancestor of modern procedural languages • LISP: elegant, mostly functional, AI-language • Smalltalk: ancestor of modern object oriented languages

  3. Programming Paradigms • Procedural: update memory cells – destructive assignments, the Turing tape on steroids  • Object Oriented: inheritance, methods • Functional: based on lambda calculus / combinators, recursion theory, category theory. Functions ONLY! • Logic: based on predicate calculus, relational, “non-determinism”. Uses backtracking, unification.

  4. Syntax and Semantics • Syntax: CF-grammars - easy to compile, easy to learn – uses REGEXPs for tokenizer • Denotational semantics: meaning of the program as a mathematical object • Operational semantics: how it works on a real or virtual machine • Also important for success: pragmatics – how it is used, how it benefits from developer environments, does it run on popular platforms, how it facilitates software construction

  5. Language Processors: Interpreters and Compilers • Interpreters: hardware or software, real or virtual machines • Compiler: translating from the programming language as seen by humans to the low-level code able to be interpreted by the machine • Front end: language -> syntax tree -> high-level intermediate code, machine independent • Back end: machine specific code generator, optimizers, linkers, assemblers

  6. Models of computation • Turing machines: one tape, multiple tape, RAM machines – all equivalent • Lambda calculus: a theory of function application and parameter sybstitution • Combinators: semantically the same as lambda calculus, but getting rid of explicit parameters • Exotic models: DNA-computing, Quantum-computing, molecular computing

  7. Turing equivalence • All major programming languages can compute exactly as much as a Turing machine can. • All alternative formalisms – lambda calculus, combinators, type 0 language processors are equivalent to Turing machines in what they can compute. • Why use (and love/hate) various programming languages? Because of their different expressive power (high-level, elegant, easy to learn, fast, popular – and also for a few things in the eye of the beholder  )

More Related