1 CSC 533: Organization of Programming Languages Spring 2005 See online syllabus at: Course goals:  understand.

Slides:



Advertisements
Similar presentations
Identify how elements are arranged on the Periodic Table. F Fluorine atu 9 How many particles in the nucleus? Protons? Neutrons? Electrons? Now.
Advertisements

1 CSC 533: Organization of Programming Languages Spring 2008 See online syllabus at: Course goals:  understand issues in designing,
Unit 3 Part 2 The Periodic Table ICP Mr. Patel SWHS.
One-qusiparticle excitations of the heavy and superheavy nuclei A. Parkhomenko and and A.Sobiczewski Institute for Nuclear Studies, ul. Hoża 69, Warsaw.
Single particle properties of heavy and superheavy nuclei. Aleksander Parkhomenko.
Copyright 2011 CreativeChemistryLessons.comCreativeChemistryLessons.comRemember! Metals LOSE Electrons (CATIONS)Metals LOSE Electrons (CATIONS) Non-Metals.
The Nature of Molecules
Periodic Table – Filling Order
THE PERIODIC TABLE.
Neutron (no charge) Hydrogen 1 Proton 1 Electron Oxygen 8 Protons 8 Neutrons 8 Electrons a. b. proton (positive charge) electron (negative charge) Copyright.
Development of the Periodic Table. Mendeleev’s Periodic Table "...if all the elements be arranged in order of their atomic weights a periodic repetition.
Binary Compounds Metals (variable oxidation) + Nonmetals.
Metals, Nonmetals, Metalloids. Metals and Nonmetals Li 3 He 2 C6C6 N7N7 O8O8 F9F9 Ne 10 Na 11 B5B5 Be 4 H1H1 Al 13 Si 14 P 15 S 16 Cl 17 Ar 18 K 19 Ca.
CH. 2 atomic models electronic configuration oxidation numbers
Unit 4 The Periodic Table Chemistry I Mr. Patel SWHS.
1 CSC 533: Organization of Programming Languages Spring 2010 See online syllabus at: Course goals:  understand issues in designing,
Periodic Table of Elements. gold silver helium oxygen mercury hydrogen sodium nitrogen niobium neodymium chlorine carbon.
Chemical Families. Groups of Elements   Lanthanides Li 3 He 2 C6C6 N7N7 O8O8 F9F9 Ne 10 Na 11 B5B5 Be 4 H1H1 Al 13 Si 14 P 15 S 16 Cl.
Trends of the Periodic Table
Periodic Table Of Elements
Metals, Nonmetals, Metalloids
s p d (n-1) f (n-2) 6767 Periodic Patterns 1s1s1s1s 2s2s2s2s 3s3s3s3s 4s4s4s4s 5s5s5s5s 6s6s6s6s 7s7s7s7s 3d3d3d3d 4d4d4d4d 5d5d5d5d 6d6d6d6d 1s1s1s1s.
Organization of The Periodic Table Mrs. Russotto.
Bellwork, Fri. Sept. 14 Which element is LEAST likely to combine with another element to form a molecule? -Chlorine (Cl), a halogen -Iron (Fe), a metal.
Modern Periodic Table Objective:
Electron Configuration Filling-Order of Electrons in an Atom.
Alkali Metals, Group 1 H N OF Cl Br I Li Na K Fr Be Mg Ca Ra Sc Ac He Ne Ar Kr Rn Ti V Cr Mn Fe Co Ni Cu ZnGa Ge As Se Rb Sr Y Xe Zr Nb Mo Tc Ru Rh Pd.
1 Hydro gen 1 3 Li Lithi um 2 1 Na Sodiu m 3 1919 K Potas sium 4 3737 Rb Rubid ium 5 5 Cs Cesiu m 6 8787 Fr Franc ium 7 4 Be Beryl lium 1212 Mg Magne sium.
D x 2 – y 2 Lanthanides Actinides G block Inrt P x P y P z D x y D x z D y z D z 2 New periodic table of elements Nodal point.
Periodic Table Li 3 He 2 C6C6 N7N7 O8O8 F9F9 Ne 10 Na 11 B5B5 Be 4 H1H1 Al 13 Si 14 P 15 S 16 Cl 17 Ar 18 K 19 Ca 20 Sc 21 Ti 22 V 23 Cr.
Periodic Table of Elements
Chapter 6 Metals, Nonmetals, Metalloids. Metals and Nonmetals Li 3 He 2 C6C6 N7N7 O8O8 F9F9 Ne 10 Na 11 B5B5 Be 4 H1H1 Al 13 Si 14 P 15 S 16 Cl 17 Ar.
Trends of the Periodic Table. Electronegativity ElectronegativityyElectronegativityy.
Periodic Table Li 3 He 2 C6C6 N7N7 O8O8 F9F9 Ne 10 Na 11 B5B5 Be 4 H1H1 Al 13 Si 14 P 15 S 16 Cl 17 Ar 18 K 19 Ca 20 Sc 21 Ti 22 V 23 Cr.
CSC 533: Programming Languages Spring 2016
Electron Configuration
CSC 533: Programming Languages Spring 2015
S2 SCIENCE CHEMICAL REACTIONS
Periodic Table of Elements
TOPIC 0C: Atomic Theory.
1.7 Trends in the Periodic Table
Introduction To Chemistry
1 H 2 He 3 Li 4 Be 5 B 6 C 7 N 8 O 9 F 10 Ne 11 Na 12 Mg 13 Al 14 Si
Chemeketa Community College
Periodensystem Biomaterials Research - Manfred Maitz H He Li Be B C N
KS4 Chemistry The Periodic Table.
Groups of Elements 1A 8A H He 2A 3A 4A 5A 6A 7A Li Be B C N O F Ne Na
Do Now: Answer the following:
Emission of Energy by Atoms and Electron Configurations
Trends of the Periodic Table
Periodic Table Kelter, Carr, Scott, Chemistry A Wolrd of Choices 1999, page 74.
Periodic Trends Atomic Size Ionization Energy Electron Affinity
WHAT THE HECK DO I NEED TO BE ABLE TO DO?
Periodic Table of the Elements
ТАБЛИЦА Б. Е. ЛИПОВА «STRUCTURE OF ATOMIC NUCLEUS”
Electron Configuration
4.2 IONIZATION ENERGY 4.6 TABLE 4.2 Ionization Energy of the Elements
What Things Do I have To Memorize in AP Chem?
PERIODIC TABLE OF ELEMENTS
Journal: Choose one of these Periodic Table ideas or come up with your own. Explain what different CATEGORIES/SECTIONS you would make to group your “Elements”
Electron Configurations
DETECTION LIMITS < 1 ppt ng/L 1-10 ppt ng/L ppt ng/L
Line Spectra and the Bohr Model
The Periodic Table Part I – Categories of Elements
with modifications by Ken Costello
1.5 Periodic Table: History & Trends
PeRiOdIc TaBlE of ElEmEnTs
Electron Configurations and the Periodic Table
→ Atomic radius decreases → Ionization energy increases → Electronegativity increases →
Presentation transcript:

1 CSC 533: Organization of Programming Languages Spring 2005 See online syllabus at: Course goals:  understand issues in designing, implementing, and evaluating programming languages  appreciate strengths and tradeoffs of different programming paradigms  working knowledge of C++, Java & Scheme

2 in theory, all programming languages are equivalent  compiled/interpreted into basic machine operations  Church-Turing thesis applies Why are there different programming languages? in practice, different languages provide distinct voices  different cultures (application domains)  different primitive concepts (operations)  different ways of thinking about the world (perspectives) Why are there different natural languages?

3 Family tree of high-level languages

4 Programming paradigms similarly, different problem-solving approaches (paradigms) exist and are better suited to different types of tasks imperative approaches: programs specify sequences of state changes block-structured : subroutines & nested scopes (Pascal, C) object-based : interacting objects (Ada, Modula) object-oriented : objects + inheritance (C++, Java, Smalltalk) distributed : concurrency (Occam, Linda) declarative approaches: programs specify what is to be computed functional : functions in lambda calculus (LISP/Scheme, ML) logic : relations in predicate calculus (Prolog) database : info records and relations (SQL)

5 Example: HW1 HW1 involves calculating the molecular weight of a formula  can be simple element H  1.008O   can be sequence of elements HHO  HHSOOOO   can be sequence with multiple elements H 2 O  H 2 SO 4   can be formula with multiple sub-formulas (CH 3 ) 2 CO  this is not a particularly hard task in C++/Java, but does require design choices  input file? I/O interface? data structure? …

6 Example: HW1 in LISP/Scheme (define PERIODIC-TABLE '((H ) (He ) (Li ) (Be ) (B ) (C ) (N ) (O ) (F ) (Ne ) (Na ) (Mg ) (Al ) (Si ) (P ) (S ) (Cl ) (Ar ) (K ) (Ca ) (Sc ) (Ti ) (V ) (Cr ) (Mn ) (Fe ) (Co ) (Ni ) (Cu ) (Zn ) (Ga ) (Ge ) (As ) (Se ) (Br ) (Kr ) (Rb ) (Sr ) (Y ) (Zr ) (Nb ) (Mo ) (Tc ) (Ru ) (Rh ) (Pd ) (Ag ) (Cd ) (In ) (Sn ) (Sb ) (Te ) (I ) (Xe ) (Cs ) (Ba ) (La ) (Ce ) (Pr ) (Nd ) (Pm ) (Sm ) (Eu ) (Gd ) (Tb ) (Dy ) (Ho ) (Er ) (Tm ) (Yb ) (Lu ) (Hf ) (Ta ) (W ) (Re ) (Os ) (Ir ) (Pt ) (Au ) (Hg ) (Tl ) (Pb ) (Bi ) (Po ) (At ) (Rn ) (Fr ) (Ra ) (Ac ) (Th ) (Pa ) (U ) (Np ) (Pu ) (Am ) (Cm ) (Bk ) (Cf ) (Es ) (Fm ) (Md ) (No ) (Lr ))) (define (molecular-weight formula) (cond ((symbol? formula) (cadr (assoc element PERIODIC-TABLE))) ((null? formula) 0.0) ((and (> (length formula) 1) (number? (cadr formula))) (+ (* (molecular-weight (car formula)) (cadr formula)) (molecular-weight (cddr formula)))) (else (+ (molecular-weight (car formula)) (molecular-weight (cdr formula)))))) for comparison purposes, HW1 is ideal for Scheme  Scheme is symbolic, has primitives for manipulating lists and structures, …

7 Why study programming languages? increased capacity to express ideas  broader perspective on programming and problem solving, new paradigms improved background for choosing appropriate languages  know tradeoffs between different languages  simplify programming task by choosing best-suited language increased ability to learn new languages  as with natural languages, 2 nd languages is hardest to learn  languages come and go, must be able to adapt/adjust better understanding of the significance of implementation  can use language more intelligently if understand implementation  also aids in identifying bugs increased ability to design/implement new languages

8 How do we judge a programming language? readability in software engineering, maintenance cost/time far exceeds development cost/time  want code to be easy to understand, modify, and maintain  simplicity: language should be as small as possible, avoid redundant features  C++ is pretty complex, e.g., x++; ++x; x +=1; x = x + 1;  Java slightly better (some features removed); Scheme is very simple  orthogonality: small set of primitive constructs, can be combined independently and uniformly (i.e., very few special cases)  C++ is OK but many exceptions, e.g., functions can return structs, not arrays  Java slightly better; Scheme is highly orthogonal  natural control and data structures: provide useful, high-level abstractions  C++ is good but does include some tricky ones, e.g., :?, goto  Java comparable (but no goto ); Scheme is limited (e.g., recursion for looping)  simple and unambiguous syntax: intended form of code is clear to reader  C++ not so good, e.g., overall complexity, dangling else, overused static  Java slightly better; Scheme syntax is simple and clear

9 How do we judge a programming language (cont.)? writability want to make programming as simple as possible for the programmer  simplicity  orthogonality:  natural control and data structures  simple and unambiguous syntax  support for abstraction: need to be able to define and utilize abstractions  C++ is good, e.g., support for functions, libraries, classes  Java is comparable; Scheme is OK, but more tedious  expressivity: language provides convenient ways of specifying computations  C++ is good, e.g., if & switch, while & do-while & for, bitwise operators, …  Java is slightly less (removes low-level); Scheme is not very expressive (few control structures) note: readability & writability are often at odds e.g., more control structures can simplify programmer's task, but make code harder to read and maintain (more to know, more redundancy) Common LISP vs. Scheme

10 How do we judge a programming language (cont.)? reliability want to ensure that a program performs to its specifications under all conditions  want to build in strong error checking and recovery capabilities  also want to help the programmer to avoid errors  readability  writability  type checking: identify errors either at compile-time or during execution  C++ is pretty good, e.g., most types checked at compile time, some loopholes  Java is slightly better; Scheme is dynamic, must do checking during execution  exception handling: ability to intercept and recover from errors in code  C++ is OK (try/catch, but not always used)  Java is slightly better (libraries require exception handling), Scheme is more awkward  memory management: control memory accessing, allocation/deallocation, aliasing  C++ is dangerous, e.g., can access specific addresses, must deallocate memory  Java is better (memory mgmt is automatic); Scheme handles all transparently