Programming Languages definitions

studied byStudied by 28 people
5.0(1)
Get a hint
Hint

programming language

1 / 56

flashcard set

Earn XP

Description and Tags

57 Terms

1

programming language

A formal language which comprises a set of instructions that produce various kinds of output. Consists of instruction for computers

New cards
2

Program

instructions for a computer to execute

New cards
3

high-level language

Language that allows you to write precise instructions in a human-readable form

New cards
4

Program Design

Design of a language driven to fix a problem

New cards
5

Program Philosophy/Paradigm

  • Imperative (Procedual)

  • Declarative (Functional)

  • Logical/Constrained-based (OOP)

New cards
6

Computer Architecture

Language must be made to work how the hardware architecture works

New cards
7

Language Implementation Technology:

Compilers, Interpreters, Virtual Machines

New cards
8

Compiler:

Translates source code into executable machine code run directly by the hardware

New cards
9

Interpreter:

Reads and executes each line of code as it reads it during run time.

New cards
10

Virtual Machine

Executes a compiled intermediate level code, byte code, which is interpreted by the virtual machine

New cards
11

Desirable design features of a language:

  • Simplicity

  • Orthogonality

  • Level of Abstraction

  • Portability

  • Cost *Expressiveness

New cards
12

simplicity

Feature set is short and to the point

New cards
13

Orthogonality:

Different factors combine to produce something meaningful

New cards
14

level of abstraction:

The amount of complexity by which a system is viewed or programmed. Higher level, less detail. Lower level, more detail.

New cards
15

Portability

Ability to move program from one system to another

New cards
16

Expressivity

The amount of ways that the same problem can be solved.

New cards
17

Memory Allocation

  • Static Allocation

  • Dynamic Allocation

New cards
18

Static Allocation:

Memory is allocated at compilation time (predetermined) PROS: *Faster CONS: *Needs to know amount of memory in advance *Prone to memory waste

New cards
19

Dynamic Allocation:

memory space is only allocated when required at runtime. PROS: *Do not need to know amount of memory in advance *Use only what is needed CONS: *Slower

New cards
20

Memory Allocation Implementation:

  • Compiler: Static and Dynamic

  • Interpreter: Dynamic

  • Virtual Machine: Static and Dynamic

New cards
21

Names:

User generated ID's (function names, class names, variable names)

New cards
22

case sensitive:

Distinguishing upper- and lowercase characters. Easier to implement.

New cards
23

case-insensitive:

Both the uppercase and lowercase forms of a character are considered by a computer program to be the same

New cards
24

reserved words

Words that have predefined meanings that cannot be changed. *Keywords: private, void, static, etc. 25. Identifiers: names given to entities, such as variables, functions, structures, etc.

New cards
25

Variable:

Location in memory that is subject to destructive update which is bound to a name. Value can change overtime.

New cards
26

L-Value:

address location of variable in memory

New cards
27

R-value:

Actual value that is stored in the memory address location

New cards
28

Aliasing

One part of memory has multiple names leading to it

New cards
29

Symbol Table

A data structure that links names to information about the objects denoted by the names. Keeps track of binding between name and memory locations.

New cards
30

Storage

*Statically Allocated Variables *Dynamically Allocated Variables

New cards
31

Binding

the association of a name with a variable or value. Also, the time when it happens

New cards
32

Types of binding

*Static binding *Dynamic binding

New cards
33

Static Binding:

Binding performs before program runs

New cards
34

Dynamic Binding:

Binding performs while program is running

New cards
35

Static Typing:

Types are checked before program runs PROS: *Faster Execution time *Readability in increased CONS: *No flexibility *More initial overhead

New cards
36

Dynamic Typing:

Types are checked while program is running PROS: *Flexibility (no need to explicitly write type annotation) *Less initial overhead before deployment CONS: *Slower Execution Time *Decreased Readability

New cards
37

Type annotation:

*Explicit *Implicit

New cards
38

Explicit Typing:

Language demands the programmer explicitly state type

New cards
39

Implicit Typing:

Language does no demand explicit denotation of data

New cards
40

Destructive Updates

Any change to a memory location that replaces the current value

New cards
41

Scope

Region in program in which the lifetime of a name is defined. Lexical region in which a name is visible/usable *Nested functions *Blocks *Order of declaration *Global variables

New cards
42

Static Scope

Region is defined using lexical features, delimiters. *A region in a text of the program *Implemented using "blocks"

New cards
43

Dynamic Scope

: Value is determined by the identifier associated with the most recent environment

New cards
44

Scope Blocks:

Lexical region in program where a name is visible

New cards
45

Constants:

Value can not be changed

New cards
46

Data Types:

Primitive Data Types *Integral numbers *Floating point numbers *Boolean types *Character

New cards
47

Integral Numbers:

Int: 32 bits = 4 bytes Byte: 8 bits = 1 byte Short: 16 bits = 2 bytes Long: 64 bits= 8 bytes

New cards
48

floating point numbers:

Float: 32 bits = 4 bytes Double: 64 bits = 8 bytes

New cards
49

Boolean type

Boolean: 8 bits = 1 byte bool: 8 bits = 1 byte

New cards
50

Character:

character: 8 bits = 1 byte char: 8 bits = 1 byte

New cards
51

string type:

-a string is a sequence of characters -the String type is used to declare variables that store strings -is not a primitive type: it is known as a class or reference type -one or more characters in double quotes -strings as character arrays

New cards
52

Types of strings:

-Dynamic size up to a bound (array) -Constant size (immutable)

New cards
53

Pointer

Special variables that allow access to l-values of memory locations

New cards
54

Syntax

the rules for combining words into grammatically sensible sentences in a given language

New cards
55

Semantics:

the set of rules by which we derive meaning from morphemes, words, and sentences in a given language; also, the study of meaning

New cards
56

lexicon:

Valid words of the language. A dictionary; a specialized vocabulary used in a particular field or place

New cards
57

grammar:

a set of rules that specify how the units of language can be combined to produce meaningful messages and sentences.

New cards

Explore top notes

note Note
studied byStudied by 37 people
... ago
5.0(2)
note Note
studied byStudied by 16 people
... ago
5.0(1)
note Note
studied byStudied by 10 people
... ago
5.0(1)
note Note
studied byStudied by 2899 people
... ago
4.9(13)
note Note
studied byStudied by 16 people
... ago
5.0(1)
note Note
studied byStudied by 506 people
... ago
4.9(11)
note Note
studied byStudied by 10 people
... ago
5.0(1)
note Note
studied byStudied by 10199 people
... ago
4.8(98)

Explore top flashcards

flashcards Flashcard (142)
studied byStudied by 22 people
... ago
5.0(1)
flashcards Flashcard (94)
studied byStudied by 31 people
... ago
5.0(1)
flashcards Flashcard (93)
studied byStudied by 1 person
... ago
5.0(1)
flashcards Flashcard (20)
studied byStudied by 3 people
... ago
5.0(1)
flashcards Flashcard (20)
studied byStudied by 31 people
... ago
5.0(1)
flashcards Flashcard (106)
studied byStudied by 1 person
... ago
5.0(1)
flashcards Flashcard (79)
studied byStudied by 13 people
... ago
5.0(1)
flashcards Flashcard (72)
studied byStudied by 14 people
... ago
5.0(1)
robot