5.1: Abstract Data Types

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

1/10

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.

11 Terms

1
New cards

Abstraction

Ignoring implementation details

2
New cards

Information Hiding

Hiding the complexity of programs

3
New cards

Purpose of abstraction

Provides an abstract view of a program; only needs to understand the abstract view to use it.

4
New cards

Modularity

Good approach to problem-solving to divide a problem into smaller independent problems

5
New cards

Functional Abstraction

Provided with:

  • Inputs

  • Outputs

  • Pre-conditions

  • Post-conditions

Don’t need to know how it works internally

6
New cards

Data Abstraction

Abstracts over data - does not specify how the data is implemented, nor how the functions manipulating the data are implemented

7
New cards

Abstract Data Type Components

  • An abstract type name A

  • An abstract interface to these operations

  • A concrete representation type T

  • Concrete implementation of operations on T

8
New cards

Haskell Modules

Used to define ADTs.

9
New cards

Module Components

  • Data types

  • Type declarations

  • Functions

  • Type signatures

  • Type classes

  • Instances of type classes

  • Other kinds of declarations that we have not discussed yet

10
New cards

Type Classes

Provides a form of abstraction:

  • A type class specifies an interface

  • Specifies a class of types abstractly

  • A member of that class must implement this interface

11
New cards

Object components

  • Some internal state

  • Methods to manipulate the state