chris davis final

5.0(1)
studied byStudied by 202 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/90

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

91 Terms

1
New cards

____ are the fundamental means of specifying computations in a programming language

Expressions

2
New cards

Essence of imperative languages is the

domain role of assigning expressions (commands in form of words instead of code)

3
New cards

was one of the motivations for the

development of the first programming languages

Arithmetic evaluation

4
New cards

Arithmetic expressions consist of:

■ Operators

■ Operands

■ Parentheses

■ Function calls

5
New cards

Use of an operator for more than one purpose is called

operator overloading

6
New cards

is one that converts an object to a type that cannot include all of the values of the original type e.g., float to int

A narrowing conversion

7
New cards

is one in which an object is converted to a type that can include at least approximations to all of the values of the original type, e.g., int to float

A widening conversion

8
New cards

is one that has operands of different types

A mixed-mode expression

9
New cards

is an implicit type conversion

A coercion

10
New cards

____ type conversion is called _____

Explicit - Casting

11
New cards

Operands (numbers) are boolean if the operator is || and &&

True

12
New cards

a < b < c is really ___

(a < b) < c

13
New cards

is an expression in which the result is determined without evaluating all of the operands and/or operators

Short Circuit Evaluation

14
New cards

All logic operators in Ruby, Perl, ML, F#, and Python are

shortcircuit evaluated

15
New cards

The assignment operator (Example ■ a = a + b can be written as… ■ a += b)

= Fortran, BASIC, the C-based languages (BAD DESIGN CHOICE)

:= Ada, SQL

is Prolog

16
New cards

■ sum = —-

□ count incremented, then assigned to sum

■ sum = ——

□ count assigned to sum, then incremented

■ count++

□ count incremented

■ -count++

□ count incremented then negated, i.e. -(count++)

++count count++

17
New cards

In Java and C#, only widening assignment coercions are done

■ float f = 2; // legal

■ int i = 2.0; // illegal

18
New cards

Assignment statements can also be

MIXED MODE

19
New cards

Lambda (λ) calculus

■ Anonymous functions ■ Immutibility ■ First-order Functions – Functions are “first class citizens” ■ Currying – All functions take a single argument

20
New cards

The λ-calculus incorporates two simplifications that make this

semantics simple.

■ The first simplification is that the λ-calculus treats functions

“anonymously”, without giving them explicit names.

■ The second simplification is that the λ-calculus only uses

functions of a single input.

21
New cards

Programs in logic languages are expressed in a

form of

symbolic logic

22
New cards

Declarative rather that procedural:

– Only specification of results are stated (not detailed

procedures for producing them)

23
New cards

A logical statement that may or may not be true

Proposition (truth table true and false)

24
New cards

Logic which can be used for the basic needs of formal logic

Symbolic Logic:

25
New cards

Objects in propositions are represented by

Object Representation:

26
New cards

a symbol that represents an object

Constant:

27
New cards

a symbol that can represent different

objects at different times

Variable:

28
New cards

is one element of a mathematical relation, written like a mathematical function

A compound term

29
New cards

Propositions can be stated in two forms:

– Fact: proposition is assumed to be true

– Query: truth of proposition is to be determined

30
New cards

an inference principle that allows inferred propositions to be computed from given propositions

Resolution

31
New cards

The process of determining useful values for variables

Unification

32
New cards

The temporary assigning of

values to variables to allow unification

Instantiation

33
New cards

is a set of strategies that may be used to strengthen the security of applications on a high level by leveraging attributes and properties of particular programming languages

Language-Based Security (LBS)

34
New cards

By evaluating the source code ——, the theory and

implementation of the programming language can also be

considered, and more vulnerabilities can be uncovered

before compiling

35
New cards

 Program Optimization , Program Correctness

Program Analysis

36
New cards

set of tools used to analyze the information flow control in a program, in order to preserve confidentiality and integrity

Information flow analysis

37
New cards

be used by software developers in order to check the security properties of their code.

Security type system

38
New cards

avoid using unsafe languages because hackers might look at vulnerable code and use pointers to get into the deep code

Securing low-level code

39
New cards

is the idea of producing a certificate during compilation of source code

■(Proof-carrying code (PCC)

■ Typed assembly language (TAL)

Certifying compilation

40
New cards

LBS techniques

Program Analysis, Information flow analysis, Security type system, Securing low-level code, Certifying compilation

41
New cards

CMMI measures both

Capability and maturity

42
New cards

CMMI capability levels

1.Initial

2. Managed

3. Defined

43
New cards

CMMI maturity levels

1.Initial

2. Managed

3. Defined

4. Quantitatively Managed

5. Optimizing

44
New cards

is a type of graph used to represent a finite partially ordered set

Hasse diagram

45
New cards

Type Checking

Checking if variables and operations in a program match up in terms of data types.

46
New cards

Strong Typing

Strictly enforcing data types in a language, so you can't mix different types without explicit conversion.

47
New cards

Determining when two types are considered the same.

Type Equivalence

48
New cards

 Math operations like addition, subtraction, etc., with numbers

Arithmetic Expressions

49
New cards

Operators (like + or -) that can behave differently based on the types of values they're applied to

Overloaded operators

50
New cards

Comparing values (relational) or evaluating logical statements (Boolean) to get a true/false result.

Relational and Boolean Expressions

51
New cards

Type Conversions

Changing a value from one type to another, either automatically (implicit) or explicitly done by the programmer.

52
New cards

 It's a trick to speed up code by stopping evaluation early if it's clear what the result will be

Short-circuit evaluation

53
New cards

 Putting values into variables.

Assignment Statements

54
New cards

 Putting different types of values into variables at the same time.

Mixed Mode Assignment

55
New cards

Choosing what code to run based on conditions

Selection Statements

56
New cards

Running the same code multiple times until a condition is met.

Iterative Statements

57
New cards

 The context where variables live and can be used, typically within a function or loop.

Local referencing environments

58
New cards

 Different ways to give information to functions or subroutines

Parameter passing methods

59
New cards

This refers to the presence or absence of security mechanisms within the software. Weak or improperly implemented security features can leave systems vulnerable to attacks.

Security Features

60
New cards

Managing —- is crucial in software development. Errors in handling time-related functions (like timestamps) or managing state transitions can lead to security vulnerabilities

Time and State

61
New cards

this involves handling errors and exceptions within the software. Improper error handling can provide attackers with valuable information or lead to unexpected behaviors that compromise security.

Errors

62
New cards

Ensuring that inputs are properly validated and represented is essential for preventing vulnerabilities like injection attacks

Input Validation and Representation

63
New cards

Insecure use of APIs (Application Programming Interfaces) can introduce vulnerabilities into software systems. This includes misuse of APIs, inadequate access controls, or failing to authenticate API calls properly.

API Abuse

64
New cards

The overall quality of code, including readability, maintainability, and adherence to best practices, significantly impacts security. Poorly written or poorly reviewed code is more likely to contain vulnerabilities.

Code Quality

65
New cards

refers to the practice of hiding implementation details and providing controlled access to components. Failure to encapsulate components properly can lead to unintended interactions and security vulnerabilities.

Encapsulation

66
New cards

The —- in which software operates can both mitigate and exacerbate security risks. Factors such as network configuration, access controls, and deployment environments influence the overall security posture of software systems.

Environment

67
New cards

a nonprofit, public–private partnership that

conducts research for the United States government

Software Engineering Institute (SEI)

68
New cards

Weaknesses Addressed by the SEI CERT C Coding Standard

CWE VIEW ID 1154

69
New cards

An early programming language whose control statements were based on the IBM 704 harware.

Fortran I

70
New cards

A —- provides the means of choosing between two or more paths of execution.

selection statement

71
New cards

If the then reserved word or some other syntactic marker is not used to introduce the 'then' clause, the control expression is placed in

Parenthesis

72
New cards

Unlike the C-family of languages that use curly braces to delineate blocks of code, Python uses _____ to indicate a statement's membership in a block.

Indentation

73
New cards

In Java, the else option of an if control statement is bound to

nearest previous if

74
New cards

What is evaluation of this Racket code?

(define z 2)

(let ((x 3)(y 5))

    (+ (* x y) z))

17

75
New cards

A nested if is one way to implement a multiple-way selection statement.

False

76
New cards

The switch keyword that introduces a clause to handle unrepresented case values in a C++ switch is

default clause

77
New cards

A C++ switch allow more than one case to be executed.

False

78
New cards

A C# switch allow more than one case to be executed.

False

79
New cards

In Racket, an if control statement requires an else option

False

80
New cards

In Racket, a cond control statement requires an else option.

False

81
New cards

In Racket, a when control statement permis an else option

False

82
New cards

In functional programming languages loops are implemented using

Recursion

83
New cards

Which of the following is not a value used by a loop variable in counter-controlled loops?

Recursion value

84
New cards

In C-family for loop syntax, match the elements to their description.

for ( A ; B ; C ) D

Initial / terminal / step size / statement to be executed

85
New cards

It is possible to use a loop counter variable in a recursive loop

True

86
New cards

Range-based loops are not possible in which of the following languages?

c

87
New cards

In C++ and  Java it is possible to unconditionally exit a loop with which keyword?

BREAK

88
New cards

In C++ and  Java it is possible to skip the remainder of the current iteration (but not exit the loop) with which keyword?

CONTINUE

89
New cards

In Perl it is possible to unconditionally exit a loop with which keyword?

last

90
New cards

The Guarded Command Language was introduced by which famous computer scientist?

Dijkstra

91
New cards

Seven Pernicious kingdoms speaks about

the common security vulnerabilities in computer systems. The Seven Pernicious Kindoms consist of 'Pillars', 'Classes', 'Base level weaknesses', 'Variant', 'Chain', 'Composite'