Professional Documents
Culture Documents
Static Variables
A C functions local variable can remember its value from one invocation to the next, if it
is designated static.
C clears the static variable upon the owning functions first invocation.
A static variable is invisible outside the function, so its data abstraction exceeds global
variables.
A static variable obviously cannot be changed outside the function, because it is invisible
there.
Cs for is an unbounded iterator, because its body can change its expressions:
for (i = initial; i <= final; i += step) { body }
The first expression is initially evaluated. The body executes only once, if the last
expression is zero. Otherwise, it repeatedly executes the last expression, while the middle
expression is true.
Imperative Language
Declarative Language
Postfix
The postfix or reverse Polish notation puts the operator after its operands, also without
parentheses; e.g., the infix expression (a + b) * (c + d) translates into a b + c d + * .
In both Polish notations, one operator can apply to any number of operands.
Heap
Blocks grow according to the Fibonacci series; i.e., slower than powers of 2.
This offers less internal fragmentation than the buddy system.
When a called function is declared inside the calling function (e.g., fcnB inside fcnA), the
called functions (Bs) static chain pointer must point at the callers (As) activation
record.
When a called function is declared outside the calling function (e.g., fcnB outside fcnE),
the caller (E) calculates the called procedures (Bs) static chain pointer by dereferencing
its own static chain pointer a number of times equal to their nested separation.
Or LISP stores them in an association (linked) list for each environment. Each branch is
labeled with a variable name, and its leaves include type, location, active/inactive flag.
Definitions
1. Representational gap: Lowered by object and operation names echoing requirements.
2.
3.
4.
5.
6.
Fourteen Definitions
1. Undecidability: Many important properties of programs cannot be discovered
automatically by an algorithm.
2. Computability: We can be sure a function is computable, when we see a program
compute it.
3. Partiality: A function can be defined for some but not all possible arguments.
4. Turing completeness: All functions that can be computed by other programming
languages also can be computed by the ultimately simple Turing Machine.
5. The halting problem: A static semantic analyzer cannot discover an infinite loop that
depends upon user input.
6. Programming languages expressive power: Flexibility of use, pragmatics and
abstraction principles.
7. Existing languages equivalence: Every programming language can be interpreted into
every other.
8. Turings finite state machine: A controller that reads programs and data from a paper
tape and overwrites the tape with intermediate results and the programs ultimate outputs.
9. More functions than algorithms: We Software Engineers will never run out of problems
to solve.
10. Churchs thesis: We probably never will discover an intuitively computable function that
is not programmable.
11. Static semantic analyzer: A program that checks code against programming standards,
which have been shown to prevent errors.
12. Dynamic semantic analyzer: A program that exposes runtime errors by executing code
in a controlled testing environment.
13. Pragmatic test engineers: Artists who derive test cases from customer requirements,
which anticipate all operational modes.
14. Software testing as art: Every combination of inputs cannot be tested, so a few benign
errors remain in every software product.
For example, a recipe process that transforms raw squash into food.