Obejrzyj poniższy film. Nie przejmuj się, jeśli nie wszystko w nim zrozumiesz. Najważniejsze jest to, aby obejrzeć go przed przeczytaniem tekstu.
Odpowiedz na poniższe pytania.
- What are assembly languages sometimes called?
- What is the advantage of low-level languages?
- How are high-level programming languages different from low-level languages?
- What programming languages were used in the first 30 years of programming?
- What type of languages is mostly used nowadays?
- What is the conversion of high-level code into machine code called?
- Are general ideas of compilation and assembly similar or very different?
- What is needed to invoke system calls?
- What is an alternative to compilation?
- What is bytecode?
- What is a virtual machnie?
- How are machnine instructions executed?
- What does the process of interpretation look like?
- What is JIT?
A programming language is a formal language primarily designed to instruct a computer to perform some tasks. Programming languages can be used to create programs to control the behavior of a machine or to express algorithms. They also serve as a framework within which a programmer organizes his ideas about processes.
The description of a programming language is usually split into the two components of syntax (form) and semantics (meaning). The syntax refers to the structure or form of programs. The semantics describes the meaning given to combinations of symbols. Some languages are defined by a specification document (for example, the C programming language is specified by an ISO Standard), while other languages (such as Perl) have a dominant implementation that is treated as a reference.
High-level language refers to the higher level of abstraction from machine language. Rather than dealing with registers, memory addresses and call stacks, high-level languages deal with variables, arrays, objects, complex arithmetic or Boolean expressions, subroutines and functions, loops, threads, locks, and other abstract computer science concepts, with a focus on usability over optimal program efficiency. Unlike low-level assembly languages, high-level languages have few, if any, language elements that translate directly into a machine’s native opcodes.
The terms high-level and low-level are inherently relative. Some decades ago, the C language, and similar languages, were most often considered „high-level”, as it supported concepts such as expression evaluation, parametrized recursive functions, and data types and structures, while assembly language was considered "low-level". Today, many programmers might refer to C as low-level, as it lacks a large runtime system (no garbage collection, etc.), basically supports only scalar operations, and provides direct memory addressing.
Assembly language may itself be regarded as a higher level (but often still one-to-one if used without macros) representation of machine code, as it supports concepts such as constants and (limited) expressions, sometimes even variables, procedures, and data structures. Machine code, in its turn, is inherently at a slightly higher level than the microcode or micro-operations used internally in many processors.
Vocabulary
- array
- tablica
- assembly language
- język asemblera
- basically supports only scalar operations
- zasadniczo wykonuje tylko działania skalarne
- Boolean expression
- wyrażenie logiczne, wyrażenie Boole’owskie
- call stack
- stos wywołań
- combination of symbols
- kombinacja symboli
- complex arithmetic
- arytmetyka liczb zespolonych
- computer science concepts
- pojęcia z dziedziny informatyki
- constant
- stała
- data structure
- struktura danych
- data type
- typ danych
- designed
- to służący do; zaprojektowany tak, aby
- direct memory addressing
- bezpośrednie adresowanie pamięci
- dominant implementation
- dominująca implementacja
- expression evaluation
- obliczanie wartości wyrażeń
- few, if any
- niewiele, jeśli w ogóle
- formal language
- język formalny
- framework
- system szkieletowy, szkielet, framework
- function
- funkcja
- garbage collection
- usuwanie nieużywanych obiektów, sprzątanie śmieci
- high-level language
- język wysokiego poziomu
- idea
- pomysł, myśl
- in its turn
- z kolei
- inherently
- naturalnie, z natury
- internally
- wewnętrznie
- ISO Standard
- standard ISO
- level of abstraction
- poziom abstrakcji
- lock
- blokada
- loop
- pętla
- low-level language
- język niskopoziomowy
- machine code
- kod maszynowy
- machine language
- język maszynowy
- macro
- makro
- memory address
- adres w pamięci
- microcode
- mikrokod
- micro-operation
- mikrooperacja
- native opcode
- macierzysty kod operacyjny
- object
- obiekt
- one-to-one
- jeden do jednego
- parametrized recursive function
- parametryzowana funkcja rekurencyjna
- procedures
- procedura
- process
- proces
- processor
- procesor
- program efficiency
- wydajność i efektywność programu
- programming language
- język programowania
- rather than
- raczej niż
- reference implementation
- implementacja wzorowa
- reference
- wzór
- register
- rejestr
- representation
- reprezentacja
- runtime system
- system wykonawczy
- semantics
- semantyka
- slightly
- nieznacznie, nieco
- some decades ago
- kilkadziesiąt lat temu
- specification document
- dokumentacja techniczna, specyfikacja
- subroutine
- podprocedura
- syntax
- składnia
- the description of sth…
- opis czegoś…
- thread
- wątek
- to be regarded as…
- być uważanym za…
- to control the behavior of a machine
- sterować działaniem komputera
- to express algorithms
- wyrażać algorytmy
- to lack
- nie mieć
- to perform some tasks
- wykonywać pewne zadania
- to serve as
- służyć jako
- to support
- obsługiwać
- to translate directly into
- przekładać bezpośrednio na
- unlike
- w odróżniu od
- usability
- użyteczność
- variable
- zmienna
- while
- podczas
Exercises
Exercise 1. Match the words in column A with their partners in column B.
formal | address |
call | type |
combination of | code |
deal | standard |
ISO | addressing |
Boolean | stack |
data | with |
express | symbols |
runtime | science |
machine | implementation |
memory | system |
memory | abstraction |
high level of | expression |
computer | language |
dominant | algorithm |
Exercise 2. Answer the following questions.
- What is a programming language?
- What can programming languages be used to?
- What is usually used to describe a programming language?
- What is syntax of a programming language?
- What is semantics of a programming language?
- How are programming languages defined?
- What is high-level programming language?
- What is low-level programming language?
- How are the terms high-level and low-level related?
- Is the C programming language high-level or low-level?
- Is assembly language high-level or low-level?
Exercise 3. Complete the sentences following the example. Use the construction "the… of a…".
…is usually split into syntax and semantics. -> The description of a programming language is usually split into syntax and semantics.
- …refers to the structure or form of programs.
- … describes the meaning given to combinations of symbols.
- …defines a programming language.
- …is treated as a reference.
- Programs can be used to control…
- …describes the possible combinations of symbols that form a syntactically correct program.
Exercise 4. Write down first parts of the sentences created above (the ones you added) and complete them orally without looking at the text. Try as many times as is necessary to easily complete the sentences.
Exercise 5. Write sentences using the expression "rather than" and the words and expressions provided in the two boxes, following the example. Write as many sentences as is necessary to use each item from every box.
registers, memory addresses, call stacks
variables, arrays, objects, complex arithmetic, Boolean expressions, subroutines, functions, loops, threads, locks, abstract concepts
Example: Rather than dealing with memory addresses, high-level languages deal with variables.
Exercise 6. Translate sentences from the previous exercise into Polish.
Exercise 7. Write at least 10 sentences beginning with "Unlike low-level languages, high-level languages…" using the information from exercise 5, following the example.
Example:Unlike low-level assembly languages, high-level languages use variables.
Exercise 8. Translate sentences from the previous exercise into Polish.
Exercise 9. Change the sentences orally according to the example.
Example:In C, you can use expression evaluation. -> The C programming language supports expression evaluation.
- In C, you can use parametrized functions
- In C, you can use recursive functions.
- In C, you can use data structures.
- In C, you can use data types.
- In C, you can use scalar operations.
- In C, you can use direct memory addressing.
- In C, you can use constants.
- In C, you can use macros.
- In C, you can use variables.
- In C, you can use arrays.
- In C, you can use Boolean expressions.
- In C, you can use subroutines.
- In C, you can use functions.
- In C, you can use loops.
- In C, you can use arithmetic operations.
- In C, you can use the addition operator.
- In C, you can use the multiplication operator.
- In C, you can use the division operator.
- In C, you can use the subtraction operator.
- In C, you can use the modulo operator.
Exercise 10. Complete the sentences replacing the adjectives provided with adverbs.
- High-level languages have few elements that translate (direct) into a machine’s native opcodes.
- The terms high-level and low-level are (inherent) relative.
- Machine code is (inherent) at a slightly higher level than the microcode.
- Micro-operations are used (internal) in many processors.
- The description of a programming language is (usual) split into two components.
- A programming language is a formal language (primary) designed to instruct a computer to perform some tasks.
Na podstawie powyższych przykładów spróbuj sformułować kilka zasad tworzenia przysłówków z przymiotników, a potem zweryfikuj te zasady w tych książkach (albo innych).
Exercise 11. Translate the text into Polish.
Exercise 12. Summarize the text orally using questions from exercise 2 as a plan. Practice until you can say the summary without looking at the text.
Źródła:
- http://www.emu.edu.tr/aelci/Courses/D-318/D-318-Files/plbook/intro.htm
- https://en.wikipedia.org/wiki/High-level_programming_language
- https://en.wikipedia.org/wiki/Programming_language
- https://en.wikipedia.org/wiki/Syntax_%28programming_languages%29
- https://mitpress.mit.edu/sicp/full-text/book/book-Z-H-10.html
Treść tej strony jest dostępna na zasadach licencji CC BY 3.0