Principles of Programming Languages - CS F30 - 2024 - Handout
Principles of Programming Languages - CS F30 - 2024 - Handout
Contents
1 Abstract 1
1.1 Course Description: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 Text and Reference Books . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
2 Lecture Plan 3
3 Evaluation Scheme 4
3.1 Weightages and Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
3.2 Tutorials, Assignments and Quizzes . . . . . . . . . . . . . . . . . . . . . . . 4
3.3 Make-up policy, Honour Code and Honourable Conduct . . . . . . . . . . . . 5
4 Individual Consultation 5
1 Abstract
Course No. : CS F301
Course Title : Principles of Programming
Languages
Instructor-in- : RAMPRASAD JOSHI.
Charge
E-mail : [email protected]
– Control Abstraction,
– Data Types and Data Abstraction,
– Scope and Parameter passing and
– Concurrency related features.
1
– global and local data,
– code,
– function call stacks,
– dynamically allocated data,
– runtime features for exceptions and
– threads.
• Scripting as a paradigm.
This is more or less the structure of most courses and textbooks on this subject. Of course,
it doesn’t dwell, only touches upon the most advanced programming paradigms that mix
the paradigms listed above and several programming and scripting languages at various
levels. We believe that once a programmer and a scholar masters the principles and standard
practices of the more or less ‘pure’ programming paradigms covered in more depth in this
courses, one can easily adapt them in myriad combinations as called for.
[R1] Ravi Sethi. 1996. Programming Languages: Concepts and Constructs, 2nd ed. Addison-
Wesley, Reading, Mass., USA.
Note: The 3rd edition of [T1], available as an Indian reprint, is also sufficient for the purpose.
Wherever it is deficient, we will provide compensatory material.
2
2 Lecture Plan
# Topics Module, Refs
Weeks
1. Introduction Module I [T1, Ch.1]; [R1,
Ch.1]; Notes.
Programming and Programming Languages; their role, de- Week 1
scription, specification and learning. The programming
language processing pipeline: syntax, semantics, deploy-
ment and execution.
2. Imperative Programming: Syntax-directed Control Module I; [T1, Ch.6]; [R1,
Flow: “how” specs as programs. Week 1 Ch. 3].
Data Structures
2.5 Data in Imperative Programming: Elements to aggregates Module II; [T1, Ch.7:
and composites. Memory leaks, dangling pointers, the Week 2 7.3–7.14]; [R1,
dreadful segfaults. Ch.4].
2.75 Imperative to OO:
Limitations of imperative modular programming, C/C++ Modules II,III; Notes; [R1,
type-handling; remedies: independence of objects, or Week 3 Ch.7]
object-orientation.
3 Full OO: Grouping of Data and Operations: Review Module III; [T1, Ch.9: 9.1–
Week 3 9.3,9.6–9.10];
[R1, Ch.6].
4. Support for Object-Orientation in Different Pro- Module III; [T1, Ch.3]
gramming Languages: What’s common, what’s dif- Weeks 4-5
feent? C/C++, Java, Python: Names, Scopes and Bind-
ings: binding times, binding principles, memory manage-
ment. Polymoprhism: Object independence v/s class con-
sistency.
5. From OO to Functional: Functions and Methods in Module IV; [T1, Ch.8]; [R1,
C/C++, Java, Python. Recursion and Composition, the Weeks 6-7 Ch.5].
Importance of the Stack.
Functional Programming: Lisp, ML. Pure functional pro- [T1, Ch.10; also
gramming, strictness, lazy evaluation. 7.1,7.2]; [R1,
Ch.8,9]
Functional-OO: The way forward. OCaml. Notes
6. Logic Programming: Prolog. Predicates, relations and Module V; [T1, Ch.11]
functions: a unified view. Week 8
7. Scripting and DSLs: Using APIs and interactive or Module VI; Notes, manuals
‘batch-mode’ interpreter shells. Threads, interrupts, inter- Weeks 9-10
process communication, concurrency, synchronisation, net-
work programming.
8. Applications: Verification; test generation; data Notes
pipelines; type safety and other security considerations.
9. Summary and Conclusion: Designing a programming
language.
3
3 Evaluation Scheme
3.1 Weightages and Modes
All components are fully open book, open laptop. Make sure that the materials you take to
the exam halls during proctored exams, and your behaviour therein, are consistent with the
AUGSD instructions and https://www.bits-pilani.ac.in/wp-content/uploads/AR_28_
04_2023.pdf regulations. The IC is not a party to any of your problems related to them.
The IC will not verify and certify you, the IC neither puts nor removes restrictions. Dates
and times are as per the timetable given by the AUGSD.
Component Weightage Structure
Mid-Sem 35% Quiz and/or paper
Compre 40% Paper and optional quiz
Tutorials, Assignments and 25% Quizzes ON assignments
Quizzes
If there is a partial or full online quiz component in the Mid-Sem and/or the Compre,
then the exam will be held in the CC Lab. These two major exams cannot be in Open
Internet/Intranet mode; other than these two, tutorials and quizzes on assignments will
always be in Open Internet and Open Intranet mode. During mid-sem and compre, proctored
by the AUGSD, it is your duty to be clear of any suspicion. If you run foul of the regulations,
the IC or any of IC’s communications cannot be any alibi for you.
• If you copy challenge solutions from someone else’s work, then you may not be able
to answer the quizzes, or your answers may be irrelevant to or inconsistent with your
submissions. In such cases, you not only lose credit in terms of marks, but lose all
credibility.
• Instead, if you show us your failed or incomplete attempts, and seek our help, we can
not only guide and lead you to the assignment and the answers, but we can also give
you due credit for your persistent effort. Plus, you gain more credibility.
4
3.3 Make-up policy, Honour Code and Honourable Conduct
Other than compre and mid-sem, all the quizzes will be online, and to be taken from any-
where, with a flexible time window. Submissions of challenge solutions (which must precede
corresponding quizzes) will be also online, and the deadlines will be connected with the
quizzes. Apart from the Mid-Sem and Compre, there are no make-ups for the remaining
smaller components. “Best m of m+n=k” policies are subject to solely the IC’s discretion,
and any attempts to seek concessions, or pressurise the IC in any manner (individual or
collective) will be viewed as insincere aggression. You must trust the IC’s sense of justice
and fairness; if you don’t, and indulge in aggression of any kind to make the IC change
anything in evaluation policies, immediately you will be out of the evaluation process and
you will get just the grade derived from your current CGPA. This derivation is simple: if c
is your current CGPA then you will be awarded the grade obtained at cM 10
marks where M
stands for the total marks in all evaluation components (most likely M = 300).
Attempts to cheat can have unpredictable consequences. The IC dislikes cheating be-
cause it hinders teaching and learning. Cheating hampers your learning as well as others (by
irritating and distracting them). Plus, the IC loses peace of mind because of his hypersen-
stivity, so teaching also is hampered. Your competition amongst yourselves is not the IC’s
concern, nor is it the IC’s duty to make you feel good about that competition. In fact, it is
the IC’s sincere wish and effort to remove the stress and the negative consequences of that
competition. If you do not like this, then demand your grade and please stop interacting
with the IC in any way. This demand must be made before 15 August 2024.
If you accept the collaborative learning mode, then you should have no trouble accepting
the honour code. Even intention and plan to cheat are abhored. If the IC detects cheating
or intention or plan to cheat (and the burden of remaining beyond suspicion is on you), then
the suspect is deemed to have automatically forfeited any claim on the IC’s attention and
time.
Forget all the negative connotation in the preceding paragraphs, we want you to engage
with us and take our help to see the intriguing world of programming languages. The more
complex and counterintuitive the language, the more rewarding is the effort to master it,
and the more power skills you gain by the effort – not only for that particular language, but
in computer engineering in general.
4 Individual Consultation
Traditionally, “chamber consultation hours” are declared in this part. From 5 to 6 pm is the
most suitable time for this; and post-dinner hours are also available. However, the IC wants
to engage with each student who is keen on learning. The IC wants to engage all such students
in collaborative learning activity. A lot of new, less documented content, less amenable to
classroom teaching but more experientially learnt, is to be made accessible via such an
activity. Typically experiential content is pieced into neat assignments and quizzes, but
once that becomes repetitive it is no more worthwhile. Something that one needs but cannot
5
learn routinely, something that is typically learnt the hard way, should be planned as the
hands-on component. Of course, this hard way can be softened by sharing, consultation and
guidance. Students are encouraged hereby to seek individual consultation in this
hands-on setting without waiting for appointments or fixed hours.
Those who think such experiential content is worthwhile are free to avoid this.