15-424/624/824: Logical Foundations of Cyber-Physical Systems
15-424/624/824: Logical Foundations of Cyber-Physical Systems
Cyber-Physical Systems
Course Syllabus
André Platzer
aplatzer@andrew
Computer Science Department, Carnegie Mellon University
“How can we provide people with cyber-physical systems they can bet
their lives on?”
The cornerstone of our course design are hybrid programs (HPs), which capture rel-
evant dynamical aspects of CPSs in a simple programming language with a simple se-
mantics. One important aspect of HPs is that they directly allow the programmer to
refer to real-valued variables representing real quantities and specify their dynamics as
part of the HP.
This course will give you the required skills to formally analyze the CPSs that are
all around us – from power plants to pacemakers and everything in between – so that
when you contribute to the design of a CPS, you are able to understand important
safety-critical aspects and feel confident designing and analyzing system models. It will
provide an excellent foundation for students who seek industry positions and for students
interested in pursuing research.
Contents
1 Course Information 2
2 Learning Objectives 4
2.1 Modeling and Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.2 Computational Thinking . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.3 CPS Skills . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
3 Programming Language 6
4 Course Project for the CPS V&V Grand Prix 6
5 FAQ 7
5.1 Who Should Take This Course? . . . . . . . . . . . . . . . . . . . . . . . . 7
5.2 What are Students Expected to Know Before This Course? . . . . . . . . 7
5.3 What Time Commitment Does This Course Need to Succeed? . . . . . . . 8
5.4 How To Take This Course . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
6 Schedule 9
7 Take Care of Yourself 9
8 Policies 10
8.1 Course Culture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
8.2 Quizzes for Active Learning . . . . . . . . . . . . . . . . . . . . . . . . . . 10
8.3 Evaluation Criteria . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
8.4 Due Dates and Late Submissions . . . . . . . . . . . . . . . . . . . . . . . 12
8.5 Laptops and Phones in Lecture . . . . . . . . . . . . . . . . . . . . . . . . 12
8.6 Collaboration and Academic Integrity . . . . . . . . . . . . . . . . . . . . 13
8.7 Exams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
8.8 Accommodation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
8.9 Recording . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
8.10 Opt-Out Option for Research Study . . . . . . . . . . . . . . . . . . . . . 14
8.11 Re-grading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
8.12 Communication Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
8.13 Extra Points for Proof Exploits: KeYmaera X Integrity . . . . . . . . . . 15
8.14 Additional Course Requirements for 15-624 . . . . . . . . . . . . . . . . . 16
8.15 Additional Course Requirements for 15-824 . . . . . . . . . . . . . . . . . 16
8.16 Additional Course Requirements for Remote Students . . . . . . . . . . . 16
1 Course Information
Home https://lfcps.org/course/lfcps.html
Credit 12 units
Textbook You are expected to follow the accompanying textbook (or its free electronic
version), which also comes with videos that enable you to review lectures:
André Platzer. Logical Foundations of Cyber-Physical Systems. Springer, 2018.
DOI 10.1007/978-3-319-63588-0
Grading 5% Homework, 29% Labs, 22% Final project, 22% Midterms I+II, 22% Quiz.
Your best dozen quizzes throughout the semester will determine your quiz score.
Absent exceptional circumstances (such as unusually large discrepancies of exam
and homework scores), grade assignment is based on total score percentages:
total score: ≥90% ≥80% ≥70% ≥60% <60%
grade: A B C D R
Quiz Learning by doing is a crucial element of understanding. Quizzes after nearly every
lecture give you an opportunity to practice and identify what to review again. The
purpose of this quiz is to give you feedback on how well you have achieved a
selection of some of the learning goals of this chapter. By observing which ones
you are unsure about, you can identify which material you should review again.
Since you ultimately need a solid understanding of all aspects of cyber-physical
systems, this helps you stay up to speed before you proceed to later chapters. The
quizzes are open book and due in the week of the corresponding lecture.
Midterms in class, closed internet, closed book, one double-sided sheet of hand-written
notes permitted. The dates of Midterm Exams I+II are on course web page.
Grand Prix During exam week for presenting final course project for feedback and pos-
sible awards to a panel of experts. The date is listed on course web page.
Tools we will make ample use of the hybrid systems verification tool KeYmaera X
http://keymaeraX.org/
Key topics Cyber-Physical Systems · Dynamic Logic · Models and Controls · Axiomatics
· Differential Equations Reasoning · Hybrid Games · Formal Verification
Pandemic Provisions
The course staff is monitoring the progress of the pandemic. If you are unable to come
back to campus or otherwise have scheduling conflicts, the course has a does-not-meet
section to enable you to take this course based on its extensive electronic resources. This
will require your initiative to succeed.
For everyone’s safety, you are required to follow CMU’s and CDC’s best practice
guidance when attending lecture or recitation in person. You are required to wear facial
coverings / masks at all times in class, regardless of vaccination status.
2 Learning Objectives
The learning objectives of Logical Foundations of Cyber-Physical Systems are organized
along the dimensions: modeling and control, computational thinking [2], and CPS skills.
run a CPS or a part of a CPS design, and what safety entails. They allow us to
achieve what abstraction and hierarchies achieve at the system level: decompose
correctness of a full CPS into correctness of smaller pieces. Invariants achieve a
similar decomposition by establishing which relations of variables remain true no
matter how long and how often the CPS runs.
– use design-by-invariant. In order to develop correct CPS designs, invariants
are an important structuring principle guiding what the control has to maintain in
order to preserve the invariant. This guidance simplifies the design process, because
it applies locally at the level of individual localized control decisions that preserve
invariants without explicitly having to take system-level closed-loop properties into
account.
– reason rigorously about CPS models. Reasoning is required to ensure correct-
ness and find flaws in a CPS design. Both informal reasoning and formal reasoning
in a logic are important objectives for being able to establish correctness, which,
for CPS, includes also rigorous reasoning about properties of differential equations.
– verify CPS models of appropriate scale. This course is not limited to covering
the science of how to prove CPSs, but you will gain practical experience through
appropriately scoped projects in the theorem prover KeYmaera X. This experience
will help you learn how to best select the most interesting questions in formal
verification and validation. Formal verification is not only critical but, given the
right abstractions, quite feasible in high-level CPS control designs.
– use formal methods tools for CPS. Formal verification at nontrivial scale
becomes more feasible with a good command of formal verification tools. While
a full coverage of all aspects of, say, an aircraft is out of reach for this course,
you will be exploring a series of safe designs for increasingly challenging tasks of a
robot controller. You also have the opportunity to explore your favorite projects
in the final course project.
the ways in which formal verification can best help improve the safety of system
designs.
3 Programming Language
With a suitably generalized programming language, the behavior of a CPS can be de-
scribed by a program. This course develops the programming language of hybrid pro-
grams (HPs) to capture relevant dynamical aspects of cyber-physical systems in a simple
programming language with a simple semantics. The most distinctive features of HPs are
that they prominently feature differential equations and nondeterminism. HPs support
differential equations as continuous models of the physical system dynamics so that you
can directly write down a differential equation in the middle of a program to describe
the behavior of physics. Nondeterminism is another feature required for the adequacy of
CPS models, e.g. for capturing choices in the system execution or uncertainty about the
environment. When describing a robot controller, for example, we cannot know for sure
what decisions other agents in the environment reach and need to be prepared to handle
multiple choices in the execution. The course leverages differential dynamic logic (dL) as
a specification and verification language for rigorous reasoning about hybrid programs
that makes program properties explicit and localizes reasoning about their correctness.
2. The project proposal is a fleshed-out version of your white paper, giving you a
chance to report on what you have already achieved in your research / imple-
mentation / proofs. The proposal also details your specific plans and technical
challenges going forward. More substantiative results in your project proposal
enable more informed feedback.
Even if the white paper and proposal are worth less points than the final course project,
there is a strong correlation of good performance on the white paper and proposal with
good performance on the eventual project. You should, thus, do your best to have
compelling white papers and proposals, because this gives you a stronger basis and
increases the quality of the feedback you can get on how to approach the final project.
On all submissions related to your course project, you should include your name and
email address to make sure feedback can reach you. Otherwise you risk receiving no
feedback and/or that feedback about your project reaches other people.
By submitting any part of your final course project, you agree to its information being
stored, including on portable devices, and the final project to be shared publicly on the
course web page, which will maximize the feedback and appreciation you can get for your
hard work. You also ascertain that you are responsible for respecting relevant copyright
etc. and have cited requisite related work.
5 FAQ
This section elaborates the expected background and purpose of this course.
6 Schedule
The tentative schedule of lectures follows the chapters of the textbook [1] with some
adaptations for semester timing reasons or to follow student interest:
1. Cyber-Physical Systems: Introduction
2. Differential Equations & Domains
3. Choice & Control
4. Safety & Contracts
5. Dynamical Systems & Dynamic Axioms
6. Truth & Proof
7. Control Loops & Invariants
8. Events & Responses
9. Reactions & Delays
10. Differential Equations & Differential Invariants
11. Differential Equations & Proofs
12. Ghosts & Differential Ghosts
13. Differential Invariants & Proof Theory
14. Hybrid Systems & Games
15. Winning Strategies & Regions
16. Winning & Proving Hybrid Games
17. Game Proofs & Separations
18. Axioms & Uniform Substitutions
19. Verified Models & Verified Runtime Validation
20. Virtual Substitution & Real Equations
21. Virtual Substitution & Real Arithmetic
8 Policies
8.1 Course Culture
This course is open to anyone who is excited about cyber-physical systems and wants to
learn all they need to become proficient in the subject matter. With its cross-disciplinary
appeal, this course attracts students from different majors, different backgrounds, and
different prior experiences, who all bring valuable and unique perspectives to the in-
terdisciplinary aspects of cyber-physical systems. Listening to the contributions and
opinions of your fellow students provides a huge opportunity for you to learn how others
approach and overcome the challenges of the world.
We desire an open and inclusive course culture, where diversity in all its aspects is
embraced. Everybody is different, everybody is special, and it is our collective respon-
sibility to ensure that everybody is welcome in this course. If you experience or observe
behavior that makes you feel unsafe, unwelcome, or discriminated against, please let the
instructors know so they can help.
missing and incorporate a summary into your study notes. This helps you remember
without having to look it up when you need it next time.
The most profound impact of your learning stems from the ways of thinking that you
internalize so deeply that you can produce them on the fly without having to look any-
thing up. Concepts that become part of your thinking will enable you to autonomously
detect situations where they apply, instead of needing to rely on your manager to tell
you which concept to apply in order to solve which problem.
While quizzes feature carefully paced introductory questions, they are also designed
to challenge your understanding. This gives you an opportunity to think through some
of the more subtle aspects of cyber-physical systems at your own pace before you face
similar challenges in application contexts where they may become overwhelming. By
solving a sequence of such separate challenges, you become better at understanding
nuances and will internalize the way of thinking that is required to solve them. A few of
the quiz questions give you an opportunity to synthesize multiple individual concepts to
solve a small joint challenge. These questions exercise synthetic knowledge and enable
you to form conceptual bridges between individual skills to identify what you need where.
For example, some of the quiz questions ask you to check your thinking on certain
simple subskills, which are useful to acquire early to avoid confusions. Other quiz ques-
tions may make you wonder how long differential equations evolve and what exactly
a safety property of a hybrid system means. These are fundamental questions about
cyber-physical system models that you can answer using their semantics. Yet other quiz
questions ask you to put all your acquired skills together to design simple CPS controllers
or criticize their designs before facing the challenges of real applications. Discovering
a problem in your thinking in the small context of a quiz question is a great learning
experience and prevents you from the major downstream effects of carrying a conceptual
misunderstanding forward into later parts of the course.
The quizzes feature active learning activities and are designed to lay an important
foundation for your understanding right away. You are expected to have achieved a
solid understanding of important core elements of this course by the time you reach a
solid quiz overall score. In order to get there, it is in your best interest to work on every
quiz as early as possible. However, the quizzes also feature some difficult questions.
Since only your best quiz scores ultimately count for your grade, you already achieve
a score on every quiz and can work toward securing even better quiz scores on later
quizzes. Over time, you will learn which topics you understand particularly well and
will find questions easier that initially appeared difficult.
The quizzes are genuine active learning quizzes. Even from a grade percentage per-
spective you can think of the quizzes as an exam stretched out throughout the semester.
If you achieve a good quiz score, then you should have a solid understanding of this
course. The converse implication does not hold. If you find the quizzes challenging,
then that does not mean that you will receive a suboptimal grade. Rather, it means
that you have been alerted to nuances in the understanding right away that you should
double check now before the course moves on. Every foundation you lay early helps you
better achieve such mastery of the material later on. This is reflected in the fact that
only a function of your best quizzes ultimately counts toward your grade.
8.7 Exams
Any communication with anyone other than course staff during the exams of this course
constitutes an academic integrity violation. Resolution of exam conflicts must be re-
quested within one week of release of the schedule of the respective exam. For reasons
of course logistics, makeup exams cannot necessarily be given. In exceptional medical
emergencies during an exam, go seek medical care immediately and immediately notify
the instructor by email. Keep documentation of your health care in case your advisor
or the Office of Student Affairs wants to check in with you. In these rare circumstances
an oral exam may be used to expedite the process.
8.8 Accommodation
CMU makes every effort to provide accessible facilities and programs for individuals with
disabilities. If you have a disability and require accommodations, contact the Office of
Disability Resources at access@andrew.cmu.edu. Please let the instructors know early
in the semester so that your needs may be appropriately met. Special accommodation
for exams must be requested at least 2 weeks before each exam.
8.9 Recording
No student may record any classroom activity without express written consent from the
instructor. If you have (or think you may have) a disability such that you need to record
or tape classroom activities, you should contact the Office of Disability Resources to
request an appropriate accommodation.
Any recordings of class sessions are solely for educational use by students enrolled
in the course and, due to regulations under the Family Educational Rights and
Privacy Act (FERPA), must not be shared with anyone else under any circumstance.
teaching material and principles. We plan to study and evaluate the effectiveness of
teaching strategies and techniques for the Logical Foundations of Cyber-Physical Sys-
tems course for improving the quality of the teaching as well as possible dissemination
of material about the course to other universities and the general public.
Unless you opt out, we plan to study the homework you are already submitting for
grading purposes also for the purpose of this research study. Our study will involve
both automated and manual inspection of homework submissions using means such as
simulation and/or checking of proofs. The study will be performed on an anonymized
version of your homework submissions and the final study will only be performed after
you have received your grade in this course.
Your participation is voluntary. If you do not want your homework submission to be
included in the study, you can opt out by emailing my assistant chasek@cs.cmu.edu
with an email with subject Opt-out 15424 and a short declaration that you would like
to opt out from the study. Your decision to opt-out will not result in any penalty.
8.11 Re-grading
Most of our grading effort focuses on feedback to you. If we have made a mistake in
any part of your grade assignment, however, you can submit your assignments for re-
grading within two weeks after the assignment has been returned. You will receive a new
grade after review, which, of course, may be higher or lower than your previous score,
depending on where we have made a mistake in grading.
be exploited to exhibit a proof of false, which, since false is rarely true, cannot have
a proof in any sound verification procedure.
Needless to say that this is not just a great way for you to earn extra credit but also
a really solid preparation for questions scrutinizing what rules and axioms and proof
attempts are sound and which ones aren’t. This reflection is an invaluable skill when it
comes down to analyzing CPSs.
We will award a special prize during the CPS V&V Grand Prix to the person achieving
the most extra credit via proof exploits.
Hint: You are allowed to be arbitrarily creative in your proof exploits and do things
that you are not ordinarily supposed to do in a verification tool.
References
[1] André Platzer. Logical Foundations of Cyber-Physical Systems. Springer,
Cham, 2018. URL: http://www.springer.com/978-3-319-63587-3, doi:10.
1007/978-3-319-63588-0.