📜 ⬆️ ⬇️

How is familiarity with the LLP at ITMO University: the course "Low-level programming"

Most popular programming languages ​​are high-level languages. For example, Java, Python or C #. Of course, it is possible to program on them and weakly presenting how different levels of abstraction actually work. But for a good IT specialist it is important to understand how the platform with which he interacts, how the development environment, the compiler, the debugger functions. This leads us to talk about low-level programming.

LLP (low-level programming) is a convenient way to deal with how to write reliable, fast, compact and efficient programs. Our students study assembler and C primarily to get a better sense of how software works.

Photo by Pablo BD CC BY-SA
')

Why do you need to know


The IT industry is developing rapidly and is subject to fashion technologies and languages. Fundamental concepts — for example, computing models, virtual memory, compilation, and program building — change much less frequently. Understanding how the basic principles of such concepts are manifested in one programming language will help to quickly learn a similar language if it is required for work. LLP in this case makes it clear how the program from the source text becomes a set of machine instructions, and how they are executed on the computer. In turn, familiarity with the mechanisms of memory management and the principles of the compiler will help to write code that is less demanding of computational resources.

Clarification: We often have to deal with the thesis that LLP is only hardware programming and similar tasks. This is not true.

Where can I find LLP in practice:




How we prepare for this


Our students of directions 09.03.01 "Computer science and computer engineering" and 09.03.04 "Software engineering" study a number of disciplines related to low-level programming. These are operating systems, system software (including in the Unix environment), development of compilers, virtualization technologies, etc.

The starting point is the course “Low Level Programming”. Here students will have to work with an assembler and C. In parallel - they learn the process of compiling and executing programs. The course goes in the format "from setting the task to the finished program." The main goal of the course is to get an idea of ​​how the presentation of the program changes during transitions between:



Photo by hackNY.org CC BY-SA

From students who come to the course, we expect minimal programming experience in high-level languages ​​(for example, Java or C #). And recommend the following online courses:


The course "Low-Level Programming" is read primarily from a book that is written specifically for our students. The book is published in English and translated into Japanese and Portuguese. We also often work with the Intel64 software developer manual and System V AMD64 ABI.

What's inside the course


In simple terms, this course can be detailed as follows (with reference to the topics that were indicated above):





Important organizational details


We break lectures by jointly writing code and studying compiled files using tools from binutils (objdump, readelf) or gdb. During the lecture (and not only), students ask questions both verbally and into the channel of the course in the famous messenger, and the teachers answer them as soon as possible.

As a practical training, students perform laboratory work. Sometimes students in the learning process want to develop something of their own, personally interesting to them (a game, a program to control the robot, a compiler, etc.).

Therefore, as a replacement for the exam, students can make an individual project on a topic agreed with the teacher. After going through the code review and posting on GitHub, they record a video with a demonstration of the project (projects implemented since 2014 are collected on this channel, GitHub links are in the description).

Example of a student course: analog levitron ( detailed story about the project on Habré )

Some other projects completed on the basis of the course:



About the teacher


On the course, a whole team of teachers interacts with students who give lectures, take laboratory work, and advise students. Senior students participate in discussions and help current students to understand the subtleties of low-level programming.

The main work on the preparation of materials for the course was done by Igor Zhirkov, the author of the textbook on it. Igor studied at ITMO University and Academic University, received a master's degree in ITMO in 2016. His areas of interest are type theory, mathematical logic, programming languages, and low-level programming. His main current project is related to the formal verification of C language refactorings using Coq and the CompCert verified compiler for C language.



This course helps to learn to look at a task from an adequate level of abstraction and, let's say, by convention, not to try to “write web applications in assembly language”. We try to approach the study of C and assembler in terms of understanding the concepts associated with these "tools" and their environment - operating systems and CPUs.

By the way, here we can find a book that was inspired by the teaching of this course (it was published in English, Japanese, and Portuguese).

Source: https://habr.com/ru/post/425249/


All Articles