pl(prelim)

0.0(0)
studied byStudied by 2 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/46

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.

47 Terms

1
New cards

Programming Environments

It is the collection of tools in software development.

It may consist of only a file system, a text editor, a linker, and a compiler, or sometimes,

it may include a large collection of integrated tools wherein each is accessed through a uniform interface

2
New cards

Microsoft Visual Studio Code

It is a redefined and optimized code editor for building and debugging modern web and cloud applications.

It is a lightweight yet powerful source code editor that runs on a desktop and is available for Windows, macOS, and Linux.

It has build-in support for JavaScript, TypeScript, and Node.js

3
New cards

NetBeans

It is a free, open-source IDE that allows the development of desktop, mobile, and web apps

4
New cards

Arduino IDE

It contains a text editor for coding a message area, text console, toolbar for various functions, and a series of menus.

It connects to the * board to upload programs and communicate with them

5
New cards

Blockly

It is a visual programming editor that uses drag-and-drop blocks for coding.

It is made by Google and is currently empowering the most popular coding education worldwide.

6
New cards

Readability

Important criterion for assessing a programming language is the ease with which programs can be read and understood

7
New cards

Simplicity

The overall — of a programming language strongly impacts its readability

8
New cards

Problems in readability:
Feature Multiplicity

A scenario of more than one(1) way to accomplish a particular operation

9
New cards

Problems in readability:
Operator Overloading

A scenario wherein a single operator symbol has more than one(1) meaning.

10
New cards

Problems in readability:
Oversimplicity

A scenario wherein the language is too simple to the point of lacking more complex statements and less obvious program structure.

11
New cards

Orthogonality

Is the ability to change one thing without unseen effects on other things in the program.

It is about the independence of components in a larger system.

It deals with how a relatively small set of primitive constructs can be combined in a relatively small number of ways to build the control and data structure of the language

12
New cards

Data Types

The presence of adequate facilities for defining data types and data structure offers a significant aid to readability.

13
New cards

Syntax Design

The syntax or form of the elements has an impact on the readability of programs

SPECIAL WORDS: Some prog lang have used matching pairs of special words or symbols to form groups.

Form and Meaning: Designing statements to make their appearance partially specify their purpose, which helps readability. Semantics, or meaning, must follow directly from syntax or form.

14
New cards

Writability

It is the measure of how easily a language can be used to create programs for a chosen problem domain.

It is unfair to compare — of different languages of a particular application when one is designed for that application and one that was not.

15
New cards

Simplicity and Orthogonality

A large number of different constructs in a language might confuse some programmers as they might not be familiar with them. This leads to the misuse and disuse of some features.

Too much orthogonality can affect the writability of a prog lang.

16
New cards

Reliability

It is met if a program performs to its specifications under all conditions.

17
New cards

Type Checking

Tests for the type of errors in a program, either by the compiler or during program execution.

As runtype — is expensive, compile-time — is more desireable.

The earlier the errors are detected, the less expensive it is to make the required repairs.

18
New cards

Exception Handling

Is the ability of the program to intercept runtime errors and other unusual conditions detectable by the program, take corrective measures, and then continue.

19
New cards

Functions that can affect the reliability of programs in a given language:

Aliasing

happens when there are two(2) or more distinct names in a program that can be used to access the same memory cell.

It is considered and accepted as a dangerous feature in a programming language.

20
New cards

Functions that can affect the reliability of programs in a given language:

Readability and Writability

A language that does not support natural ways to express the required algorithms in a program will use unnatural approaches that are likely to be incorrect for all possible situations.

A program is more likely to be correct if it is easier to write.

21
New cards

Syntax

In programming languages, it is the form of its expressions, statements, and program units.

It is important to note that every programming language uses different word sets in different orders, meaning they have their —.

22
New cards

Keywords

reserved words that have a special meaning in the language

They form the basic building blocks for writing programs. Ie if, else, for, and while.

23
New cards

Operators

Symbols that perform operations on variable and values. ie +, -, &&, ||

24
New cards

Punctuation

Includes symbols such as commas, semicolons, braces that help structure the program.

25
New cards

Identifiers

are names that identify user-defined items such as variables, functions, and arrays.

26
New cards

BNF (Backus-Naur Form)

It is a natural notation for describing syntax.

Became the most popular method of concisely describing programming language syntax.

Also considered a metalanguage for programming language

A metalanguage is a language or set of terms used to describe another language.

27
New cards

Terminals

Strings that must exactly match specific items in the input ie “def”, “return”, “:”N

28
New cards

Nonterminals

Symbols that will be replaced by a concrete value ie. <letter>, <digit>

29
New cards

Rules

Conventions of terminals and nonterminals that defined how the elements relate ie <letter> :: = “a”

30
New cards

BNF rules

Can be created by combining terminals and nonterminals.

Also called production rules

Core component of BNF grammar.

31
New cards

name

Holds the name of a rule or nonterminal

32
New cards

::=

Means expand into

33
New cards

|

Separates alternatives

34
New cards

*

Accepts zero or more repetitions of preceding item

35
New cards

+

Accepts one or more repetitions of preceding item

36
New cards

[ ]

Accepts zero or one occurrence, which means that the enclosed item is optional

37
New cards

( )

Groups options

38
New cards

“ “

Defines literal strings

39
New cards

space

Only meaningful to separate tokens

40
New cards

Syntax Tree

Tree representation of the syntactic structure of the source code.

Each node in the tree denotes a construct occurring in the source code.

The compiler uses the syntax tree to understand the hierarchical structure of the source code, which is crucial for code analysis and optimization

41
New cards

Semantics

Is the meaning of those expressions, statements, and program units that syntax forms.

Is concerned with the meaning behind that structure

42
New cards

Static semantics

Involves rules checked simultaneously, such as type checking, and scope resolution.

These rules ensure that certain errors are caught before the program runs, enhancing reliability and robustness.

Hint: Compile time error

43
New cards

Dynamic semantics

refers to the behavior of a program when it is run.

It includes the execution of expressions, control structures like loops and conditionals, and manipulating data through functions and procedures.

Defines how the state of a program changes as it executes, which is critical for understanding and predicting program behavior.Fo

44
New cards

Formal Semantics

Formal methods often employed to define a programming language’s semantics

45
New cards

Operational Semantics

Describes the behavior of a program in terms of abstract machine execution steps.D

46
New cards

Denotational Semantics

Maps syntactic constructs to the mathematical objects, offering an abstract, mathematical description of their meaning.

This approach helps in reasoning about program correctness and equivalence.

47
New cards

Axiomatic Semantics

Uses logical assertions, such as preconditions and postconditions, to specify and prove properties about a program.

It is especially useful in verifying the correctness of algorithms.