CS代考 COMP 401, 410 and 455; a grade of C or better is required in

Comp 524: Programming Language Concepts
Bulletin Description
General Course Info
Prerequisites, COMP 401, 410 and 455; a grade of C or better is required in

Copyright By PowCoder代写 加微信 powcoder

COMP 401, 410 and 455. Concepts of high-level programming and their
realization in specific languages. Data types, scope, control structures,
procedural abstraction, classes, concurrency. Run-time implementation.
Term: Department: Course Number: Section Number:
Virtual Location: Website:
Instructor Info
Name: Office: Email: Phone:
Office Hours:
Fall 2020 COMP 524
TR 1:15 –2:45pm
https://unc.zoom.us/j/95193281377
http://www.cs.unc.edu/~dewan/524/current/index.html

Brooks 150

5906123 http://www.cs.unc.edu/~dewan See Pinned
Teaching Assistant
Name: Email:
Office Hours:

See pinned

Learning Assistants
Name: Email:
Office Hours:
Name: Email:
Office Hours:

See pinned
See pinned

What’s in a Name:
I wince if someone addresses me simply as “Dewan”, which some students have done in recent semesters
The following ways of addressing me are fine and I am used to them: Prasun
Dr/Prof. in case you are worried about mispronouncing my first name, it rhymes with Bassoon.
Textbooks and Resources
The textbook is available online: Programming Language Pragmatics.
PPT Slides and videos are linked from the shared Google Drive folder linked
from a pinned Piazza post, Sakai first announcement, and course web page.
Some of the other relevant resources are:
Installing CLisp
Eclipse Dandeloin Plugin
LISP Tutorials
The Lisp Interpreter
(How to Write a (Lisp) Interpreter (in Python)) – GitHub – rui314/minilisp: A readable lisp in less than 1k lines of C Learn C • Build Your Own Lisp
Lisp interpreter in 90 lines of C++ · GitHub
Installing C
Installing Eclipse C++ Plugin: CDT 9.4 (Eclipse Marketplace) Installing SWI-Prolog

Eclipse Prolog Plugin
Learn Prolog Now!.
A Gentle Introduction to ML
Programming in Standard ML
Installing SML-Site-1 Installing SML-Site 2 Installing Eclipse ML Plug-In Weka Download
Instructor-provided notes, PPT slides, and videos on the material covered in class will be accessible from the shared Google Drive. They will not be posted on Sakai, which will be used however for submitting programs and any quizzes that are given.
Course Description
The objective of this course is to introduce students to the fundamental concepts that differentiate alternative programming paradigms. These alternatives emerged initially in different languages, but some of them have been combined in the same language. The specific languages/systems/libraries that will be used to illustrate new programming paradigms are Lisp and Java lambda expressions (functional programming), Prolog (logic programming), ML (type inference), Java threads (concurrent programming), Java and Bash sockets (distributed programming), Weka clustering and decision tree (programming by example/machine learning), and Bash and C (OS-level programming).
Target Audience
The target audience is students wishing to gain a broad understanding of diverse programming paradigms, with a focus on their design and implementation rather than the nuances of how to apply them to build complex programs.
Prerequisites
The pre-requisites are basic knowledge of Java, recursion, grammars, and regular expressions. UNC Comp 401, 410 and 455 cover these topics.
Goals and Key Learning Objectives
The course has several related goals: (1) Introduce new languages/paradigms that are alternatives to those seen so far in Java including functional programming, pure object-oriented programming, logic

programming, type inference, parallel programming, distributed programming, OS-level programming, programming by example, and machine learning. (2) Identify differences between the various paradigms based on modularity, data types, type binding, scope, parameter evaluation, and parameter passing. (3) Provide an implementation-level understanding of some of these concepts.
Course Requirements
You must attend lectures and participate in class discussions, take any quizzes that are given, implement assignments, and take a midterm and a final exam.
You must submit the source code of your program (with a pledge signed). Examinations are closed book, notes and program listings; computers and
collaboration are not allowed either. Key Dates
Midterm: TBA Final: TBA
Class Lecture Structure
The class will be lecture-based rather than flipped. Lectures will be recorded and the recordings will be available.
Grading Criteria
A grade will be assigned based on performance on homework programming assignments, quizzes, class participation, and exams. Here is the breakdown:
Regular Credit
Midterm 25% Final 25% Assignment Regular Credit 45% Class Participation 5%

Extra Credit
Assignment Extra Credit TBA Class QA Diary 5%

I reserve the right to apply a 5% fudge factor to give consideration to other factors such as extraordinary quality of class participation.
There is no fixed mapping between the overall percentage and final grade.
Planned Assignments
The assignments are layered around three themes: social distancing applications, implementation of an interpreter of a functional language (called PL-Lisp) based on Lisp , and use of alternative features of Lisp/PL- Lisp to display recursive lists. Do not get intimidates by the large number of bullets below – they require a relatively small amount of code, but this code can be complex. Moreover, the underlying concepts, which make the code complex, will be covered in class. In particular, pseudo algorithms will be given for the PL-Lisp features, which you will need to translate into working code.
Theme 1: Implement a social distancing application using:
1. pure Java with no prescribed design pattern
2. pure Java while supporting the Model View Controller (MVC) and
Factory design patterns (extra credit)
3. Java +the Weka implementation of the decision tree machine learning
Theme 2: Extend the skeleton of a Java, MVC and factory-based interpreter of a functional language, called PL-Lisp, that use Lisp syntax to support:
1. Printing of recursive lists.
2. The Lisp basic functions (quote, list, eval, load, cond, <, >, <=, >=,
and, or, not
3. A registerer of operations that add to the basic Lisp functionality.
4. The Lisp setq operation with only global scopes.
5. Evaluate atoms and lambda expressions.
6. Application of lambda expressions.
7. Lisp funcall.
8. Lisp higher-order functions.
9. SML-inspired let expressions (extra credit)

10. SML-inspired curry operator (extra credit)
11. Lisp defun and SML-inspired defCurry (extra credit) 12. funcall of quoted symbols (extra credit)
13. setq in non-global scopes (extra credit)
14. Free variables in functions (extra credit)
15. Eager evaluation of list components
16. Eager evaluation of and/or operators (extra credit) 17. Distributed interpreter
18. Collaborative interpreter (extra credit)
19. Eager evaluation with thread pool (extra credit)
20. Lazy evaluation (extra credit)
Theme 3: Implement display of recursive lists using both features in Lisp and those not found in Lisp but implemented in PL-Lisp:
1. Basic Lisp
2. SML-inspired let expressions (extra credit)
3. SML-inspired curry operator (extra credit)
4. SML-inspired defCurry operator (extra credit)
5. Lazy evaluation (extra credit)
6. Eager evaluation (extra credit)
Because of each of these three themes have layered assignments, it is possibly to add enough extra credit to gain a really high grade or overcome an unexpected exam performance.
Assignment Grading and Semi-Automated Help
The implementation of each assignment will be evaluated using a mix of automatic and manual grading. Automatic grading will be available both through two homegrown systems:
a) An Eclipse plugin called Hermes, extending Checkstyle, that checks compilable source code before it is executable
A system called Grader LocalChecks that is available as a Java library that you can call from your code (without having to go to a server)
An extension of the system, called Grader AllChecks, used by the graders to run LocalChecks and manually run and inspect your code
Because Hermes and LocalChecks can be run from your Eclipse environment, they are also a form of automated help, informing you of aspects you have omitted or implemented incorrectly.
We are in the middle of extending Hermes to also provide a form of semi- automated help that used the context of your error messages to either:
a) give manual asynchronous help from the instructors.
b) replay manual help given for similar error messages and context to others

This form of help with be particularly important for the social distancing theme which requires you to use languages unfamiliar to you.
Late Policy
Assignments are due at 11:55 pm on each specified due date. Homework assignments will be penalized 10% up to one week late and 25% for one to two weeks late. They will not be accepted more than two weeks late.
The grading of any extra credit Sakai quizzes we give is handled automatically by Sakai and there is no notion of a late penalty in Sakai grading. Thus, quiz submissions will not be accepted after the due date. It is your responsibility to make ensure that you not only save your work before that date but also submit it by then. Currently no Sakai quizzes are planned.
Exam Nature
It is unlikely you will be asked multiple- choice questions. Instead, exam questions will likely mirror the questions and discussion in class. Thus, you might be asked to:
a) Define some concept such as an S-Expression.
b) Taxonomize some concept such an S-Expression into an IS-A
hierarchy.
c) Give instances, subtypes, or supertypes of some concept such as give
an example of a Composite S-Expression and gives subtypes of an S-
Expression such as List and Tuples.
d) Give pros and cons of some alternatives such as logic and procedural
programming.
e) Give pseudo or complete code for some functionality, such as Lisp
code to find if an element is a member of a list or pseudo code for the
cons evaluator.
f) Trace the execution of some set of algorithms for some input such as
processing of (cons 5 (quote 6)).
If there is no proctoring, the exams will be open book.
Course Policies
Students are required to attend each class unless there are extenuating circumstances. If such circumstances occur, you should access the class material posted for missed classes, and contact classmates to become aware of the announcements that were made.
Honor Code
You are encouraged to discuss the assignments with fellow students and help them debug programs but required to write/code the solutions/programs

individually. Also, you cannot use solutions from previous offerings of the course. You cannot make incorrect diary reports or plagiarize the diary text. You cannot simply copy quiz answers from another student in this or a previous offering though you are encouraged to discuss them with others.
Not following these rules is a violation of the honor code policy
Communication with Instructors
We will be using Piazza for communication with instructors and other students. The system is highly catered to getting you help fast and efficiently from classmates and instructors. Rather than emailing technical questions, please post public questions to Piazza. Questions containing private information such as a medical or grading issue should be posted as a private question on Piazza. If you do not get a response within a day or two on Piazza, please send an email. You will not get a response to a question that could be of interest to others. This means you cannot negotiate a requirement for some task privately, make it public – we are not going to give anyone special consideration unless there is a special situation.
Before posing a question, please check if this question has been asked before. This will reduce post clutter and reduce our burden. Repeat questions will be ignored.
Piazza allows anyone to respond. So if you see a question that you think you can respond to, please do so, as that will reduce my burden and help you “teach” your fellow students. In fact, instructor responses may be delayed to give the fellow students a chance to respond first.
Here are some dos and don’ts based on past experience.
Do not post code in public messages, of course.
Do not post in private messages either; instead, define the problem in a code- independent way, for the following reasons. Your classmates will be able to help you, as it will be a public message. The question and answer will be more abstract, contributing more to learning. Without a debugger or traces, we really do not have the time and sometimes even the ability to debug your code – imagine if, on every problem, each student posted their code on piazza.
Give us non-code context: Have some empathy and try to understand what (non-code) context information a helper may need to provide assistance. For example, (a) if the Java compiler/loaded indicates that some class is missing identify what is missing, (b) if the Java runtime throws an exception, identify the stack trace, (c) if your code does not seem to be interacting correctly with the provided code (e.g. the LispIntereter skeleton or 524 LocalChecks), turn tracing on for the provided code and show the trace. The discussion of

LocalChecks tells you how to turn tracing on for them. The tracing for the Lisp Interpreter can be turned on by executing:
main.LispInterpreterTraceUtility. setTracing();
Try to understand the context yourself before posting it. Google for Java error messages if necessary.
Find our class page at: http://piazza.com/unc/fall2020/comp524 Tentative Course Schedule
Here is an ordered list of topics covered by the course.
1. Hello world in different languages.
2. Parameter passing in functions/procedures.
3. Comparison of C and Java using the a grader example.
4. Introduction to MVC, Factories in Java.
5. Comparison of and introduction to the following languages using the grader example:
a. Decision Tree/Weka. b. Prolog
6. Semantics of and implementation of the following features PL-Lisp to be implemented in the assignments:
a. Recursive S-Epressions.
b. The Lisp basic functions (quote, list, eval, load, cond, <, >, <=, >=,
and, or, not
c. A registerer of operations that add to the basic Lisp functionality.
d. the Lisp setq operation with only global scopes.
e. Evaluation atoms and lambda expressions.
f. Application of lambda expressions.
g. Lisp funcall.
h. Lisp higher-order functions.
i. SML-inspired let expressions
j. SML-inspired curry operator
k. Lisp defun and SML-inspired defCurry
l. funcall of quoted symbols
m. setq in non-global scopes
n. free variables in functions
o. Eager evaluation of list components and Java concurrency
constructs need to do such evaluation.
p. Eager evaluation of and/or operators (extra credit)
q. Sockets in Java and Bash needed to implement a distributed and
collaborative interpreter.

r. Eager evaluation with thread pool.
s. Lazy evaluation of lists and functions.
Disclaimer
The professor reserves to right to make changes to the syllabus, including project due dates and test dates. These changes will be announced as early as possible.