100 likes | 404 Views
Introduction to Programming Languages Where do we start to understand programming languages as a core concept of Computer Science? There are literally thousands of programming languages. Artifact (1) Paradigms (5) DSLs GPLs Kind of machines/programs (2)
E N D
Introduction to Programming Languages Where do we start to understand programming languages as a core concept of Computer Science? There are literally thousands of programming languages.
Artifact (1) Paradigms (5) DSLs GPLs Kind of machines/programs (2) Key elements of a machine /program(2)
Paradigms: Imperative Functional Logic Object Oriented Parallel
DSL = Domain Specific Languages: HTML Verilog Logo Mata R S Mathematica Excel SQL YAC lexers GraphViz
GPL = General Purpose (Programming) Language: Fortran (John Backus) Lisp (John McCarthy) Scheme PTL Scheme Racket Cobol (Grace Murray Hopper) Algol60 (John Backus and Peter Naur) Algol68 Pascal (Niklaus Wirth) PL/I Prolog (Alan Colmerauer) C (Ken Thompson and Dennis Ritchie) C++ (BjorneStroustrup) Ada Perl (Larry Wall) Python (Guido van Rossum) Ruby (Yukihiro Matsumoto) Java (James Gosling)
Kinds of Machines/Programs: 1 VNM = sequential 2 Multicore/cluster = parallel
Two Keys Elements of a Machine/Program: State Computation What does this look like in a VNM? State is captured in an ordered array of addresses Computation is expressed via an ordered list of instructions
Two Keys Elements of a Machine/Program: State Computation What does this look like in a parallel programming environment? State is captured in unordered sets Computation is expressed in logic = unordered set of declarative rules, each being an unordered conjunction of predicates
Characteristics for Parallel and Distributed Platforms: • No guarantees of order of execution and communication • Set-oriented approach (SQL) vs batch dataflow approach (MapReduce) • Architectures with loose control over ordering (disorderly programming) • Data parallelism vs task parallelism • MapReduce, threads, MPI(message passing interface) • OPL(Our Pattern Language) patterns for parallel programming • Boom(Berkeley Orders of Magnitude) – Bloom language – Bud DSL in Ruby