Computer Languages : FALL 2018

Class 12:30 PM - 1:30 PM MW
Labs 1:30 PM - 2:30 PM MW

Dr. Ernesto Gomez - (909) 537-5429
office: jb-337, hours TW 2:30-4:30

Open door policy: When my door is open, I am interruptible - I will be happy to talk to you even outside office hours. When my door is closed, I am either not there or working on something I don't want to interrupt. Knock if you think whatever you need is something I will agree is more urgent than whatever I am doing.

Teaching assistant: Abhishek Sudhesh

This page is the syllabus. Schedule, grading is described here or in links from here. Look for changes and updates here

This link is the old CSE320 page- contains useful links


course content

BOOK: "Programming Language Pragmatics", Fourth Edition, Michael L. Scott, Morgan Kauffman ISBN 978-0-12-410409-9

SCHEDULE : (under construction)
- Topics from the book - (parts of) chapters 2,3,4,6,7,8,9,10,11,,12
- in every case, there will be material in class that extends what is in the book

Exercises 1-3 : do by 22 October

WEEK 1: Ch 1.2,1.4 - intro, language types. Turing machine and Turing Completeness
WEEK 2: CH 2.1 - syntax specification, derivation, syntax tree
WEEK 3: CH 4.2 - annotated grammar, CH 3 - Names, binding

Week 4: CH 6, CH 11 (functional languages)
Week 5: Scheme
guile - Gnu Scheme
Scheme reports (most systems comply with the Scheme 5 report)
Scheme 5
MIT - Gnu Scheme
Lisp - more or less like Scheme

Week 6: language design - consistency: syntax and style match evrywhere
orthogonality - all combinations with correct syntax work
legibility - is it easy to read and understand what the code does
writeability - ease and speed of writing code
safety - ease of debugging, error detection, avoid unexpected effects
examples -
The switch statment in C++ : not orthogonal, bad legibility
Vectors in scheme do not match basic design of lists, input/output breaks the functional paradigm.

WEEK 7: Prolog from Dr. Botting's old cs320 page: examples
Try examples, but do not post on webpage
Prolog course notes from York U.

LAB : No lab first week of class. Starting week 2:

The following describes 5 labs to be done, in our labs and at home, over the entire term. All programming should run in a machine in the CSE lab or on a laptop you can bring, since you may need to show a running program to me or other. All work is individual, but feel free to discuss with each other (share ideas and solutions, do not share code). Do not use a web platform like (e.g. Cloud 9 or equivalent) becasue it is to abstracted from the hardware for meaningful timing information
Sample code to read system time

From geeks for geeks, pick one of: QUICKSORT, DYKSTRA SHORTEST PATH and KMP (pattern search) algorithm.
(if you find a different algorithm you prefer, ask me if it is OK)
Implement this algorithm 5 times in:
C: an imperative language;
C++: an OO language;
Scheme: a functional language;
Prolog: a logic language;
and a language of your choosing.

(You may replace C, C++ or Scheme by another language of the same type, ask me first)
For each of the above 5 cases, your lab report should include: source code, screen shots (or other demonstration) of multiple tests (at least 5 with different data), timing of multiple runs (at least 5 repetitions with same data).
To allow comparison of different languages, the timing test for all 5 implementations should use the same data.
You should describe your impressions of:

1. Ease/difficulty of of programming
2. Ease/difficulty of debugging
3. Speed of execution
4. any other comments

Write a final report in which you compare the 5 languages you tested, and state your opinion and preferences
br> PROJECT: TBA - (in previous years, design your own computer language. Group project, 3-4 people per group)

Useful/entertaining sites:

geeks for geeks Languages, algorithms and Codepad - try programs in multiple languages
The LEGO Turing Machine
Some strange programming languages

Labs and assignments 30% - Labs and other assignments are individual. Assignments will be turned in by email

Team Project 30% -
1 Midterm - (practice test - not graded)
Final 40% - (see CSUSB finals schedule)

Learning Outcomes

The following are learning outcomes for the Computer Science program, accredited by ABET This course supports these outcomes.

a) An ability to apply knowledge of computing and mathematics appropriate to the discipline

b) An ability to analyze a problem, and identify and define the computing requirements appropriate to its solution

c) An ability to design, implement, and evaluate a computer-based system, process, component, or program to meet desired needs

d) An ability to function effectively on teams to accomplish a common goal

e) An understanding of professional, ethical, legal, security and social issues and responsibilities

f) An ability to communicate effectively with a range of audiences

g) An ability to analyze the local and global impact of computing on individuals, organizations, and society

h) Recognition of the need to and an ability to engage in continuing professional development

i) An ability to use current techniques, skills, and tools necessary for computing practice

j) An ability to apply mathematical foundations, algorithmic principles, and computer science theory in the modeling and design of computer-based systems in a way that demonstrates comprehension of the tradeoffs involved in design choices

k) An ability to apply design and development principles in the construction of software systems of varying complexity

The following are CSUSB policies

{Plagiarism and Cheating}

Plagiarism and cheating are violations of the Student Conduct Code (see Appendix) and may be dealt with by both the instructor and the Judicial Affairs Officer. Definition and procedures for addressing cheating and plagiarism are found below. Questions about academic dishonesty and the policy should be addressed to the Office of the Vice President, Student Services. Plagiarism is the act of presenting the ideas and writings of another as one’s own. Cheating is the act of obtaining or attempting to obtain credit for academic work through the use of any dishonest, deceptive, or fraudulent means. Cheating includes but is not limited to:

1. Copying, in part or in whole, from another’s test, software, or other evaluation instrument.

2. Submitting work previously graded in another course unless this has been approved by the course instructor or by departmental policy.

3. Submitting work simultaneously presented in two courses, unless this has been approved by both course instructors or by the department policies of both departments.

4. Using or consulting during an examination sources or materials not authorized by the instructor.

5. Altering or interfering with grading or grading instructions.

6. Sitting for an examination by a surrogate, or as a surrogate.

7. Any other act committed by a student in the course of his or her academic work, which defrauds or misrepresents, including aiding or abetting in any of the actions defined above.

Plagiarism is academically dishonest and makes the offending student liable to penalties up to and including expulsion. Students must make appropriate acknowledgements of the original source where material written or compiled by another is used. Procedure. Allegations of academic dishonesty may be handled directly by the instructor or may be referred by the instructor to the Judicial Affairs Officer. If handled by the instructor, the instructor has the following responsibilities:

1. To preserve the evidence in support of the allegation;

2. To notify the student of the allegation and of the evidence on which it is based;

3. To provide the student a reasonable opportunity to challenge or rebut the allegation;

4. To notify the student of the action being taken.

The instructor may employ any of the following sanctions:

1. Verbal or written reprimand;

2. Assignment or appropriate task or examination;

3. Change of grade, including assigning a punitive grade to work involving dishonesty, or for the course, project, thesis, or any other summary evaluation of the student’s academic work.

If the student does not wish to accept the sanction proposed by the instructor, the student may request and require that the allegation be referred to the Judicial Affairs Officer. In that event, the procedures specified under Executive Order 970 (Student Disciplinary Procedures of the California State University) shall be observed. The instructor shall not impose any sanction other than the sanction(s) imposed through the disciplinary procedure.

{Students with Disabilities:}

If you are in need of an accommodation for a disability in order to participate in this class, please let me know and also contact Services to Students with Disabilities at UH-183, (909)537-5238.

{Students with Disabilities:}

If you are in need of an accommodation for a disability in order to participate in this class, please let me know and also contact Services to Students with Disabilities at UH-183, (909)537-5238.