0% found this document useful (0 votes)
594 views

CMPUT 174 Computation Vignette Notes

CMPUT 174 discusses concepts maps and computational concepts. A concept map uses boxes and arrows to show relationships between concepts. Key computational concepts include tokens, compilers, interpreters, and objects. A compiler translates an entire program into machine instructions, while an interpreter translates programs line-by-line. Python creates objects that have a unique identity, immutable type, and represent data.

Uploaded by

2012isdaboss
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
594 views

CMPUT 174 Computation Vignette Notes

CMPUT 174 discusses concepts maps and computational concepts. A concept map uses boxes and arrows to show relationships between concepts. Key computational concepts include tokens, compilers, interpreters, and objects. A compiler translates an entire program into machine instructions, while an interpreter translates programs line-by-line. Python creates objects that have a unique identity, immutable type, and represent data.

Uploaded by

2012isdaboss
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

CMPUT 174: Computations

Concept Maps or Conceptual Diagrams:

- A chart representing relationship between concepts, typically in the form of a branching


hierarchical structure connected by lines or arrows.
- used to represent concepts and relationships in any technical domain, as well as computing
science terms and relationships between them
- meanings can be very different as words can be defined in terms of common terms as well as for
computing science; henceforth, definitions not pertaining to that of computer science is not
accepted in this space

e.g.) Token: the smallest meaningful unit of information in a sequence of data for a compiler; a
sequence of bits passed continuously in a fixed order and enabling a node to transmit information

- for concept maps; generally the blue nouns (noun phrases) are enclosed in a rectangle and
represent basic concepts; black verbs (two-word phrases) denote relationships between
concepts labelled on arrows -> help explain definitions using linkages
- Is a black verbs define relationships between individuals and categories
- Kind of defines sub-categories between nouns; DOES NOT WORK IN BOTH DIRECTIONS!! i.e.
every giraffe is a herbivore but not every herbivore is a giraffe
- Use inference rules to infer new relationships part of i.e. if a membrane is part of a cell and a
cell is part of an organism, then a membrane is part of an organism and kind of (with kind of,
any relation relating to a parent noun can be linked to the child noun, for example: giraffe is a
herbivore and herbivores eat plants, therefore giraffes eat plants)

Introduction to Computation: Refer to Mind Map in CMPUT 174 Directory

Programming:
- Computation is used for computational problem solving and creating a computer application is
one kind of computational problem solving; we want a computer to perform appropriate
computations in the application
How can we get a computer to perform the appropriate computations?

- Application creation is a process, and part of that process is program creation


- The program creation process is performed by one or more programmers who create a
computer program to describe the computation that will be performed by the computer
- The programmers use a programming language to express the computer program

Can the computer execute the computer program to perform its computation?
No. The computer program is a high-level description written in a programming language and
the computer can only execute machine instructions.
- A translator must first translate the computer program into machine instructions, which the
computer can then execute to perform the computation.

There are two kinds of translators: compilers and interpreters:


The Oxford Dictionary of English (ODE) has a computing definition of compiler:
- A program that converts instructions into a machine-code or lower-level form so that they can
be read and executed by a computer.
- A compiler is a kind of translator that translates an entire program into machine instructions by
compiling it.
- All of the machine instructions are then executed by the computer to perform the entire
computation.

The ODE has a computing definition of interpreter:


- A program that can analyse and execute a program line by line.
- interpreter translates one line of a program into machine instructions by interpreting that line.
- These few machine instructions are then executed by the computer to perform part of the
computation.
- The interpreter and computer then continue this interpret-execute cycle until every program line
has been translated and all of the generated machine instructions have been executed

We can use an analogy to better understand the difference between a compiler and an interpreter.

Consider the problem of translating natural languages such as English, Chinese and sign language.
- There are two kinds of translation. One kind of translation is where a translator translates an
entire document from one language to another. This process is usually just called translation and
is analogous to compilation of computer languages.
The ODE has this definition for interpreter:
- A person who interprets, especially one who translates speech orally or into sign language.
Interpretation occurs in real time, since an interpreter translates speech, one phrase at a time, as a
speaker is speaking. This kind of translation is sometimes called simultaneous interpretation and is
analogous to interpretation of computer languages.
Summary: a computer program describes a computation that solves a computational problem and how
an interpreter or compiler translates this solution description into machine language instructions that a
computer executes to solve the problem.

Objects:

- Python interpreter creates the object, which has a type, value and identity

The identity of the object is unique and cannot be changed; can be represented as an address in
computer memory

The type of object determines the operations that can be performed on the object, and its format
and layout in memory (memory format). Inferring from this statement, and the fact that the memory
format cant change without disrupting close objects in memory, therefore the type of an object is
immutable (immovable)

int is a python type, that represents a whole number that supports operations (+,-,/)

the exact memory format of a type depends on the specific Python interpreter
- The object represents data

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy