Programming Language Final

Programming Language Final

memorize.aimemorize.ai (lvl 286)
Section 1

Preview this deck

fixed stack-dynamic array

Front

Star 0%
Star 0%
Star 0%
Star 0%
Star 0%

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Active users

0

All-time users

0

Favorites

0

Last updated

6 years ago

Date created

Mar 1, 2020

Cards (37)

Section 1

(37 cards)

fixed stack-dynamic array

Front

An array in which the subscript ranges are statically bound, but the allocation is done at declaration elaboration time during execution, int = x[] = {1, 2, 3};

Back

A recursive decent parser is used to implement

Front

LL(1)

Back

int = x[] = {1, 2, 3}; will c++ alert me if invalid subscript is used

Front

no

Back

Compile time (Bindings)

Front

bind a variable to a type in C or Java

Back

Language design time (Bindings)

Front

bind operator symbols to operations

Back

dynamic scoping

Front

a name is bound to its most recent declaration based on the program's call history

Back

Dynamic Scope

Front

a global identifier refers to the identifier associated with the most recent environment

Back

Union (Pros/Cons)

Front

Pros: allows storing different data types in the same memory location Cons: its non type checking

Back

Examples of Imperative programming paradigm

Front

C (developed by Dennis Ritchie and Ken Thompson), Fortan (developed by John Backus for IBM)

Back

Logic programming paradigms

Front

is a set of sentences in logical form, expressing facts and rules about some problem domain

Back

generic functions

Front

has a set of bodies of code of which a subset is selected for execution, contains a set of methods, a lambda-list, a method combination type, and other information, Lisp

Back

Activation record contains

Front

Local variables, Parameters, Dynamic link, Return address

Back

dangling reference

Front

A pointer to a data object that no longer exists (has been deleted)

Back

variable attributes

Front

name, address, value, type, lifetime, scope

Back

Load time (Bindings)

Front

bind a C or C++ static variable to a memory cell

Back

Examples of Logic programming paradigm

Front

Prolog (is a logic programming language associated with artificial intelligence and computational linguistics), Answer set programming (ASP) and Datalog

Back

Functional programming paradigm

Front

has its roots in mathematics and it is language independent. The key principal of this paradigms is the execution of series of mathematical functions.

Back

function overloading

Front

Process of creating several functions with the same name but different formal parameter lists.

Back

Runtime (Bindings)

Front

bind a nonstatic local variable to a memory cell

Back

How does function overloading look in assembler

Front

(_Z6fooBARdi), (_Z6fooBARid), the last letters are changed to tell valuable type

Back

activation record

Front

an area of computer memory that keeps track of a method call's parameters, local values, return value, and the caller's return address

Back

Control abstraction

Front

The separation of the logical view of a control structure from its implementation, hiding the implementation details

Back

Examples of Functional programming paradigm

Front

JavaScript (developed by Brendan Eich), Haskwell (developed by Lennart Augustsson, Dave Barton), Scala (developed by Martin Odersky)

Back

Imperative Programming Paradigm

Front

It works by changing the program state through assignment statements. It performs step by step task by changing state.

Back

Examples of Object Oriented programming paradigm

Front

Simula (first OOP language), Java (developed by James Gosling at Sun Microsystems), C++ (developed by Bjarne Stroustrup)

Back

deep-access method of Implementing Dynamic Scoping

Front

Nonlocal references are found by searching the activation record instances on the dynamic chain, Length of chain cannot be statically determined, Every activation record instance must have variable names, requires an activation record

Back

What are the Four language paradigms

Front

imperative, functional, logical, and object-oriented

Back

Flex and Bison

Front

are aging unix utilities that help you write very fast parsers for almost arbitrary file formats, they implement Look-Ahead-Left-Right (LALR)

Back

How is char* names[] = {"Bob", "Jake"} established in memory

Front

Bob\o Jake\o with name[0] pointing to bob and name[1] pointing to Jake

Back

Data abstraction

Front

The separation of the logical view of data from its implementation, hiding the details about the data

Back

Static scoping

Front

In this scoping a variable always refers to its top level environment.

Back

Shallow Access method of Implementing Dynamic Scoping

Front

Put locals in a central place, One stack for each variable name, Central table with an entry for each variable name

Back

Language implementation time (Bindings)

Front

bind floating point type to a representation

Back

closures

Front

is a feature in JavaScript where an inner function has access to the outer enclosing function's variables - a scope chain

Back

Dynamic link

Front

points to the function that called it, points to the top of an activation record of the caller

Back

Fixed heap-dynamic array

Front

is one in which the subscript ranges are dynamically bound, and the storage allocation is dynamic, but they are both fixed after storage is allocated int *x = new int[10];

Back

int = x[] = {1, 2, 3}; is *(x) = 42 acceptable assignment

Front

yes

Back