1/46
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
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
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
NetBeans
It is a free, open-source IDE that allows the development of desktop, mobile, and web apps
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
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.
Readability
Important criterion for assessing a programming language is the ease with which programs can be read and understood
Simplicity
The overall — of a programming language strongly impacts its readability
Problems in readability:
Feature Multiplicity
A scenario of more than one(1) way to accomplish a particular operation
Problems in readability:
Operator Overloading
A scenario wherein a single operator symbol has more than one(1) meaning.
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.
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
Data Types
The presence of adequate facilities for defining data types and data structure offers a significant aid to readability.
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.
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.
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.
Reliability
It is met if a program performs to its specifications under all conditions.
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.
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.
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.
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.
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 —.
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.
Operators
Symbols that perform operations on variable and values. ie +, -, &&, ||
Punctuation
Includes symbols such as commas, semicolons, braces that help structure the program.
Identifiers
are names that identify user-defined items such as variables, functions, and arrays.
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.
Terminals
Strings that must exactly match specific items in the input ie “def”, “return”, “:”N
Nonterminals
Symbols that will be replaced by a concrete value ie. <letter>, <digit>
Rules
Conventions of terminals and nonterminals that defined how the elements relate ie <letter> :: = “a”
BNF rules
Can be created by combining terminals and nonterminals.
Also called production rules
Core component of BNF grammar.
name
Holds the name of a rule or nonterminal
::=
Means expand into
|
Separates alternatives
*
Accepts zero or more repetitions of preceding item
+
Accepts one or more repetitions of preceding item
[ ]
Accepts zero or one occurrence, which means that the enclosed item is optional
( )
Groups options
“ “
Defines literal strings
space
Only meaningful to separate tokens
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
Semantics
Is the meaning of those expressions, statements, and program units that syntax forms.
Is concerned with the meaning behind that structure
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
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
Formal Semantics
Formal methods often employed to define a programming language’s semantics
Operational Semantics
Describes the behavior of a program in terms of abstract machine execution steps.D
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.
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.