chris davis final

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

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

1 / 90

encourage image

There's no tags or description

Looks like no one added any tags here yet for you.

91 Terms

1

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

Expressions

New cards
2

Essence of imperative languages is the

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

New cards
3

was one of the motivations for the

development of the first programming languages

Arithmetic evaluation

New cards
4

Arithmetic expressions consist of:

■ Operators

■ Operands

■ Parentheses

■ Function calls

New cards
5

Use of an operator for more than one purpose is called

operator overloading

New cards
6

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

New cards
7

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

New cards
8

is one that has operands of different types

A mixed-mode expression

New cards
9

is an implicit type conversion

A coercion

New cards
10

____ type conversion is called _____

Explicit - Casting

New cards
11

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

True

New cards
12

a < b < c is really ___

(a < b) < c

New cards
13

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

Short Circuit Evaluation

New cards
14

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

shortcircuit evaluated

New cards
15

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

New cards
16

■ 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++

New cards
17

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

■ float f = 2; // legal

■ int i = 2.0; // illegal

New cards
18

Assignment statements can also be

MIXED MODE

New cards
19

Lambda (λ) calculus

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

New cards
20

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.

New cards
21

Programs in logic languages are expressed in a

form of

symbolic logic

New cards
22

Declarative rather that procedural:

– Only specification of results are stated (not detailed

procedures for producing them)

New cards
23

A logical statement that may or may not be true

Proposition (truth table true and false)

New cards
24

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

Symbolic Logic:

New cards
25

Objects in propositions are represented by

Object Representation:

New cards
26

a symbol that represents an object

Constant:

New cards
27

a symbol that can represent different

objects at different times

Variable:

New cards
28

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

A compound term

New cards
29

Propositions can be stated in two forms:

– Fact: proposition is assumed to be true

– Query: truth of proposition is to be determined

New cards
30

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

Resolution

New cards
31

The process of determining useful values for variables

Unification

New cards
32

The temporary assigning of

values to variables to allow unification

Instantiation

New cards
33

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)

New cards
34

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

New cards
35

 Program Optimization , Program Correctness

Program Analysis

New cards
36

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

Information flow analysis

New cards
37

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

Security type system

New cards
38

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

Securing low-level code

New cards
39

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

■(Proof-carrying code (PCC)

■ Typed assembly language (TAL)

Certifying compilation

New cards
40

LBS techniques

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

New cards
41

CMMI measures both

Capability and maturity

New cards
42

CMMI capability levels

1.Initial

2. Managed

3. Defined

New cards
43

CMMI maturity levels

1.Initial

2. Managed

3. Defined

4. Quantitatively Managed

5. Optimizing

New cards
44

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

Hasse diagram

New cards
45

Type Checking

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

New cards
46

Strong Typing

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

New cards
47

Determining when two types are considered the same.

Type Equivalence

New cards
48

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

Arithmetic Expressions

New cards
49

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

Overloaded operators

New cards
50

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

Relational and Boolean Expressions

New cards
51

Type Conversions

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

New cards
52

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

Short-circuit evaluation

New cards
53

 Putting values into variables.

Assignment Statements

New cards
54

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

Mixed Mode Assignment

New cards
55

Choosing what code to run based on conditions

Selection Statements

New cards
56

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

Iterative Statements

New cards
57

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

Local referencing environments

New cards
58

 Different ways to give information to functions or subroutines

Parameter passing methods

New cards
59

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

New cards
60

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

New cards
61

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

New cards
62

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

Input Validation and Representation

New cards
63

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

New cards
64

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

New cards
65

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

New cards
66

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

New cards
67

a nonprofit, public–private partnership that

conducts research for the United States government

Software Engineering Institute (SEI)

New cards
68

Weaknesses Addressed by the SEI CERT C Coding Standard

CWE VIEW ID 1154

New cards
69

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

Fortran I

New cards
70

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

selection statement

New cards
71

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

New cards
72

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

New cards
73

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

nearest previous if

New cards
74

What is evaluation of this Racket code?

(define z 2)

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

    (+ (* x y) z))

17

New cards
75

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

False

New cards
76

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

default clause

New cards
77

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

False

New cards
78

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

False

New cards
79

In Racket, an if control statement requires an else option

False

New cards
80

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

False

New cards
81

In Racket, a when control statement permis an else option

False

New cards
82

In functional programming languages loops are implemented using

Recursion

New cards
83

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

Recursion value

New cards
84

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

New cards
85

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

True

New cards
86

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

c

New cards
87

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

BREAK

New cards
88

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

CONTINUE

New cards
89

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

last

New cards
90

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

Dijkstra

New cards
91

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'

New cards

Explore top notes

note Note
studied byStudied by 5 people
... ago
5.0(1)
note Note
studied byStudied by 65 people
... ago
5.0(1)
note Note
studied byStudied by 18 people
... ago
5.0(1)
note Note
studied byStudied by 11 people
... ago
5.0(1)
note Note
studied byStudied by 5 people
... ago
5.0(1)
note Note
studied byStudied by 302 people
... ago
5.0(2)
note Note
studied byStudied by 8 people
... ago
5.0(1)
note Note
studied byStudied by 83 people
... ago
5.0(2)

Explore top flashcards

flashcards Flashcard (410)
studied byStudied by 14 people
... ago
5.0(1)
flashcards Flashcard (485)
studied byStudied by 43 people
... ago
5.0(1)
flashcards Flashcard (170)
studied byStudied by 28 people
... ago
5.0(1)
flashcards Flashcard (81)
studied byStudied by 59 people
... ago
5.0(1)
flashcards Flashcard (76)
studied byStudied by 29 people
... ago
5.0(1)
flashcards Flashcard (28)
studied byStudied by 3 people
... ago
5.0(1)
flashcards Flashcard (36)
studied byStudied by 37 people
... ago
5.0(1)
flashcards Flashcard (50)
studied byStudied by 31 people
... ago
5.0(3)
robot