CSE 4102 Programming Languages CSE 4102 Prof Steven

  • Slides: 27
Download presentation
CSE 4102 Programming Languages CSE 4102 Prof. Steven A. Demurjian Computer Science & Engineering

CSE 4102 Programming Languages CSE 4102 Prof. Steven A. Demurjian Computer Science & Engineering Department The University of Connecticut 371 Fairfield Way, Box U-255 Storrs, CT 06269 -3255 Steven. Demurjian@uconn. edu http: //sdcse. engr. uconn. edu (860) 486– 4818 (Office) (860) 486 -3719 (CSE Office) Teaching Assistant – ITE 114 New Glassed-in Room Gino Sanzi eugene. sanzi@uconn. edu Office hours to be announced OV-1

Course Objectives m CSE 4102 Explore the Programming Languages from 1940 s to the

Course Objectives m CSE 4102 Explore the Programming Languages from 1940 s to the Present Day q Who were the Founders and Major Contributors? q What are the Different Programming Paradigms? q How have PLs Evolved over Decades? From Origins to Mainframes to PCs to Mobile to Io. T From Assembly to Procedural to Functional to Logic to Object Oriented to Visual to What’s Next? From Spaghetti Code to Structured Programming to Strong Type Checking CSE 1010 from Pascal to C++ to Java to Python What will shape the Future in PLs? Explore the Evolution of Programming and Paradigms over Time q m OV-2

Main Textbook m CSE m 4102 m Robert W. Sebesta, Concepts of Programming Languages,

Main Textbook m CSE m 4102 m Robert W. Sebesta, Concepts of Programming Languages, 10 th Ed, Pearson ISBN 10: 0 -13 -139531 -9 ISBN 13: 978 -0 -13 -139531 -2 OV-3

Lectures and Topics/May be Changed m CSE 4102 m m m Brief History of

Lectures and Topics/May be Changed m CSE 4102 m m m Brief History of Computing and Founders q Highlights influence of PLs q Review Evolution of PLs History and Review of Programming Languages q Chapter 2 of textbook on Steroids q Augmemt with Extensive PL Examples Chapters 1 -12, 16, maybe 15 Programming language /software engineering ethics Additional Material on q Lexical Analysis/Regular Expressions q Parsing/Context Free Grammars q Runtime Evironment as related to PLs Indepth Examination of Pascal, Modula-2, Ada, Prolog, others TBD OV-4

Three Main Assignments m CSE m 4102 m One or Two Semester Exams Individual

Three Main Assignments m CSE m 4102 m One or Two Semester Exams Individual - Developing Code in 4 Different Programming Languages q Pascal, Ada, Java, and Prolog Team Semester Project to Explore New/Emerging Programming Languages q Teams of 2, 3 or 4 q PPT Presentation on a PL q Written Report and Development q Actual Speed Presentation q Last 3 weeks of Class OV-5

Breakdown of Percentages m CSE m 4102 m m Exam(s) (25 -35%) Individual -

Breakdown of Percentages m CSE m 4102 m m Exam(s) (25 -35%) Individual - Developing Code in Different (35 -40%) Programming Languages Team Semester Project to Explore a PL (35 -40%) q PPT Presentation q Written Report q Other Requirements TBD q Actual Presentation (last 2 or 3 weeks of Class) Note: All Subject to Change – Use Breakdown that Most Benefits Students OV-6

Last time taught this course Formulas CSE 4102 PLATTL – out of 150 points

Last time taught this course Formulas CSE 4102 PLATTL – out of 150 points PROJTTL - Individual. PPT + individualreport EXTTL – exam 1 + exam 2 Formula 33. 3%/33. 4% Semester Total= Total ((PLATTL/150)*0. 33+ ((PROJTTL/100)*0. 33+ (EXTTL/125)*0. 34))*100 Final Scale and Distribution 67 students A 92+ 9 A- 89+ 15 B+ 85+ 13 average B 82+ 8 B- 78+ 9 C+ 75+ 5 C 72+ 5 C- 67+ 3 OV-7

4 Prog Languages Assignments PLAs m CSE m 4102 Prog Lang Assigments (PLA): Word

4 Prog Languages Assignments PLAs m CSE m 4102 Prog Lang Assigments (PLA): Word and PDF PLA 1: Pascal 30 pts, PLA 2: Ada 30 pts, Prolog q Implement Permuted Index Functionality (PIF) in Pascal and Ada by modifying WFF solutions PLA Solutions: PLA 1 and PLA 2 q Utilize a Common Problem Background: PDF and pla 6. pl PLA Extra project on PIF using Modula-2 or Go q Replaces lower of Pascal, Ada, or Prolog score PLA 3: Java 60 pts Representing & Manipulating Quilts q PLA 3 Java Code: quilt. java PLA 4: Prolog 30 pts Logic Programming q PLA 4 Input file: pla 4. pl q m m OV-8

Your Role in Programming Assignments m CSE 4102 m m m Learning a new

Your Role in Programming Assignments m CSE 4102 m m m Learning a new language on your own with minimal support from TAs or instructor Programming assignments are not complex problems We’re testing for accuracy in results on q Permuted index q Sorting and searching q General basic algorithm development Not worried about efficient implementation Provide your own test cases, we have some of our own Intent is to allow you to explore different languages OV-9

All Programming Assignments Posted m CSE 4102 m PLA 1 Pascal Program - Due

All Programming Assignments Posted m CSE 4102 m PLA 1 Pascal Program - Due February 13, 11: 59 pm q Implement PIF in Pascal as described in: http: //sdcse. engr. uconn. edu/Cse 4102/Common. Prob. Background. pdf PLA 2 Ada Program -- Due February 27, 11: 59 pm q Implement PIF in Ada as described in: http: //sdcse. engr. uconn. edu/Cse 4102/Common. Prob. Background. pdf m PLA Extra Program –Due May 1, 11: 59 pm q Implement PIF Modula-2 or Go q This extra project can replace your lowest PLA 1, PLA 2 or PLA 4 score q Overview of languages in http: //sdcse. engr. uconn. edu/Cse 4102/cse 4102 code. pptx http: //sdcse. engr. uconn. edu/Cse 4102/cse 4102 Modula 2. pptx http: //sdcse. engr. uconn. edu/Cse 4102/cse 4102 Golang. pptx q You will get no support from either the instructor or the TA so that you can experience what it's like to learn a new language by yourself! OV-10

All Programming Assignments Posted m CSE 4102 m m PLA 3 Java Program --

All Programming Assignments Posted m CSE 4102 m m PLA 3 Java Program -- Due April 2, 11: 59 pm q Extend PLAV 3 to realize Permuted Index Functionality (PIF) in Ada as described in: http: //sdcse. engr. uconn. edu/Cse 4102/Common. Prob. Backgr ound. pdf PLA 4 Prolog Program -- Due April 16, 11: 59 pm q Independent project on using Prolog from a database Tests : PLA 1, PLA 4, PLA Extra q http: //sdcse. engr. uconn. edu/Cse 4102/test 1. txt q http: //sdcse. engr. uconn. edu/Cse 4102/test 2. txt q http: //sdcse. engr. uconn. edu/Cse 4102/test 3. txt OV-11

Lectures Presentations on PLs m CSE m 4102 m m Each presentation on due

Lectures Presentations on PLs m CSE m 4102 m m Each presentation on due date of prior language Pascal January 30 Ada February 13 Java February 27 Prolog April 2 Modula-2/Go Sometime during the semester OV-12

Background on PLA 1 & PLA 2 & Extra CSE 4102 • A permuted

Background on PLA 1 & PLA 2 & Extra CSE 4102 • A permuted index tracks, for a given word, crossreferences to the (a file, line) pairs that represent the occurrence of the word. • There may be multiple occurrences of the word in a file, the word “hello” can be in (File. A, 12), (File. A, 17), etc. • However, there is only one entry for that word in the permuted index. • For PIF you must more clearly identify"words" as sequences of characters and digits; • You will need to parse out punctuation and control characters from your counting, to identify meaningful words to form the permuted index. OV-13

Background on PLA 1 & PLA 2 & Extra CSE 4102 • The permuted

Background on PLA 1 & PLA 2 & Extra CSE 4102 • The permuted index needs two data structures: • one structure tracks the (file name, line number) for each word, • second structure tracks the list of identified words (in alphabetical order) and links to references. • Thus, as you identify new words and insert them into the two data structures, you must • perform appropriate operations that insert the words as they are found • Track the references to one or more lines they are found in. OV-14

Background on PLA 1 & PLA 2 & Extra CSE 4102 The last line

Background on PLA 1 & PLA 2 & Extra CSE 4102 The last line of any file can be terminated by a newline/EOF combination, or simply an EOF. If there is only one line in a file (a good test case), that means that the file could be the single line with an EOF and no newline. For the purposes of PFI, the following are all equivalent: red, RED, REd, Re. D, etc. For the purposes of identifying words or computing the permuted index, recognize and discard other characters such as @, #, $, &, (, ), etc. OV-15

Background on PLA 1 & PLA 2 & Extra CSE 4102 Words identified for

Background on PLA 1 & PLA 2 & Extra CSE 4102 Words identified for the permuted index must take into consideration the following: Each word must be at least one character and start with a letter. If a word has 2 or more characters, then the second and successive characters can be letters, digits, the underscore, or the hyphen. This means that you must, for the purposes of computing the permuted index, recognize and discard other characters. Also, note that you must eliminate white space (multiple spaces or tabs) between words. OV-16

PLA 1 Requirements CSE 4102 PIF that tracks the line(s) within a single input

PLA 1 Requirements CSE 4102 PIF that tracks the line(s) within a single input file where each word occurs The suggested approach is for each word that is found to build an dedicated output string (include in a data structure) for the word, its occurrences in lines, and final word count. Programmatically, for the word “Goodbye” the string would be built in the following steps: Goodbye Goodbye in in in lines: lines: -- create when the word is first found 1 -- append “ 1” when the word is first found 1 -2 -- append “-2” when the word is found in line 2 1 -2 -5 -- append “-5” when the word is found in line 5 1 -2 -5 -6 -- append “ 6” when the word is found in line 7 1 -2 -5 -6 -7 -- append “ 7” when the word is found in line 7 OV-17

PLA 1 Requirements Dedicated output string is built as the words are recognized on

PLA 1 Requirements Dedicated output string is built as the words are recognized on each CSE line. After EOF reached for all words, you print out the new 4102 dedicated output string for the word and append “wc=” and then print out the word count “ 5” as an integer. You can also convert the word count to string and append. Final output if the word goodbye occurs only five times would be as below. Goodbye in lines: 1 -2 -5 -6 -6 wc=5 Tests: http: //sdcse. engr. uconn. edu/Cse 4102/test 1. txt http: //sdcse. engr. uconn. edu/Cse 4102/test 2. txt http: //sdcse. engr. uconn. edu/Cse 4102/test 3. txt Utilize Dev-Pascal http: //www. bloodshed. net/devpascal. html and upload your. pas file to Husky. CT. If you use a GNU compiler, please make sure it compiles/runs in the IDE. OV-18

Programming Languages Overview m CSE 4102 m m m Procedural Languages: Pascal, Modula-2, Ada,

Programming Languages Overview m CSE 4102 m m m Procedural Languages: Pascal, Modula-2, Ada, Algol, Fortran, Functional and Logic Languages: Lisp/Scheme, Prolog, ML Object-Oriented Languages: Oberon-2, Modula-3, Go Miscellaneous Languages: COBOL Emerging Languages: Microsoft P, Google Dart/Flutter, Others? Browser-Based Scripting Languages: Perl, Python, Javascript, PHP OV-19

GNU Compilers CSE 4102 OV-20

GNU Compilers CSE 4102 OV-20

GNU Compilers (mostly) CSE 4102 OV-21

GNU Compilers (mostly) CSE 4102 OV-21

Where to Find Sample Code m http: //sdcse. engr. uconn. edu/Cse 4102/Sample. PLProgram. Links.

Where to Find Sample Code m http: //sdcse. engr. uconn. edu/Cse 4102/Sample. PLProgram. Links. docx CSE 4102 OV-22

Where to Find Sample Code CSE 4102 OV-23

Where to Find Sample Code CSE 4102 OV-23

Where to Find Sample Code CSE 4102 OV-24

Where to Find Sample Code CSE 4102 OV-24

Team Semester Project: Explore a PL m CSE 4102 m m Teams of two

Team Semester Project: Explore a PL m CSE 4102 m m Teams of two three or four students One-page Discussion on your Chosen PL q Why did you choose your programming language? q What types of problems does it solve? q What application domain means is it relevant for? q Identify all team members Deliverables q 12/18/24 page final report on your PL depending upon your team size of 2/3/4 q One Power. Point presentations of 50 / 75 / 100 slides depending upon your team size of 2/3/4 q One short Power. Point presentation for 5 -10 minute presentation depending upon the number of teams q Demontratee your PL Via code…WCF, WFF, and PIF Let’s Jump to: http: //sdcse. engr. uconn. edu/Cse 4102/cse 4102 teamproj ect. pptx OV-25

Cheating/Collaboration m CSE m 4102 m m m Not Tolerated in Any Form!!! Severe

Cheating/Collaboration m CSE m 4102 m m m Not Tolerated in Any Form!!! Severe Penalties are Likely!!! See University of Connecticut Student Conduct Code All Homeworks/Some Project Represent Individual Effort! Remaining Projects Represent Team Effort Cooperative Problem Solving and Sharing Code is NOT Permitted and Will Likely Lead to Fs! Electronic Information is More Accessible! Use Protection Capabilities on your Account to Protect your Files! OV-26

Lateness Policies/Exams m CSE 4102 m m m Late Assignments (Projects) will Not be

Lateness Policies/Exams m CSE 4102 m m m Late Assignments (Projects) will Not be Accepted Except with Prior Permission or Emergencies Prior Permission: Contact the Instructor Three Days Before the Due Date Emergencies: Illness, Death in the Family, etc. Contact q S. Demurjian at ITE 265, x 6 -4818, by Steven. Demurjian@uconn. edu, or via the CSE Office, ITE 250, x 6 -3719 A Late Assignment is Recorded as a Zero Grade Makeup on Absent Exam at Instructor’s Discretion OV-27