Save
Untitled
Chapter 4
Save
Share
Learn
Content
Leaderboard
Learn
Created by
Mogau Twala
Visit profile
Cards (13)
Assembly
language
A
mnemonic
system for representing machine
instructions
Assembly
language
One-to-one correspondence between machine
instructions
and
assembly
instructions
Programmer
must think like the
machine
Inherently
machine-dependent
Converted to machine language by a program called an
assembler
Third
Generation Language
Uses
high-level
primitives
Machine
independent (mostly)
Examples: C++,
FORTRAN
,
COBOL
Each primitive corresponds to a
sequence
of machine
language
instructions
Converted to machine
language
by a program called a
compiler
Data
Types
Integer: Whole
numbers
Real (float): Numbers with
fractions
Character:
Symbols
Boolean:
True
/
false
Variable
Declarations
float Length,
Width
;
int
Price
, Total,
Tax
;
char
Symbol;
Declarative
Programming
Resolution
: Combining two or more statements to produce a new statement (that is a logical consequence of the originals)
Unification
: Assigning a value to a variable so that two statements become "compatible"
Resolution
(P OR Q)
AND
(R OR Q) resolves to (P OR R)
Resolvent
: A new statement deduced by
resolution
Clause form: A statement whose
elementary
components are connected by the
Boolean
operation OR
To find if
Q
is consistent with the following set of statement we
introduce
¬Q
Polish strings uses tree
structure
and
stack
The
translation
process
1.
Parse tree
2.
Polish strings
Polish
strings
A
+
B