PPL Flashcards

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/67

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 7:51 PM on 3/19/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

68 Terms

1
New cards

Generator for Regular Class

Regular expression

2
New cards

Recognizer for Regular Class

Finite automata

3
New cards

Generator for Context-Free Class

Context free grammar

4
New cards

Recognizer for Context-Free Class

Push down automata

5
New cards

Generator for Context-Sensitive Class

Context-sensitive grammar

6
New cards

Recognizer for Context-Sensitive Class

Linear bounded automata

7
New cards

Generator for Recursively Enumerable Class

Generating Turing machine

8
New cards

Recognizer for Recursively Enumerable Class

Recognizing Turing machine

9
New cards

Reserved characters for regular expressions

+ | ? * [] () /

10
New cards

ab

Sequence: a followed by b

11
New cards

a + b, a | b

Either a OR b

12
New cards

a?

0 or 1 copies of a

13
New cards

a*

0 to unlimited copies of a

14
New cards

a+

1 to unlimited copies of a

15
New cards

\+, \?, etc.

Direct use of reserved characters

16
New cards

(abc)

Grouping

17
New cards

[AB][ab]

Classes

18
New cards

[0-3]

Lazy class listing: means one of 0, 1, 2, 3

19
New cards

\d = [0-9], \w = [A-Za-z0-9]

Named combinations; Use slash

20
New cards

<while> → while (<log-expr>){<stmt>};

<id-list> → <id>|<id>, <id-list>;

<var> → M|N|P|Q

Backus-Naur Form (BNF)

21
New cards

Ambiguity

Multiple derivations of an expression exist.

22
New cards

(m+n) + p = m + (n + p)

Associativty

23
New cards

<if_stmt> → if (<log>) <stmt> [ else <stmt>]

Extended BNF

24
New cards

Relations

Mapping between sets

25
New cards

Functions

Special class of relations;

Each input has at most one output

26
New cards

Partial Function

Not every input results in an output

27
New cards

Injective Function

1-1 functions

28
New cards

Surjective functions

Onto functions

29
New cards

Bijective Functions

Functions that are both injective and surjective

30
New cards

Implicitly Typed Function

fn x => x * x * x

31
New cards

val

Can hold a function as its value

32
New cards

fun

Named function

33
New cards

real

Number with decimal point

34
New cards

int

Number without decimal point

35
New cards

Operators that imply int

=, <, >, >=, <=

36
New cards

SML Operators

+, -, *, div, mod, ~, abs

37
New cards

Real(x)

Cast to real

38
New cards

string

“_____” - chars in double quotes

39
New cards

implode

Take a list of chars and turn them into a string

40
New cards

explode

take a string and turn it into a list of its characters

41
New cards

char

A single character

42
New cards

ord

Returns the ASCII value of a passed character

43
New cards

succ

Returns the successor to the current char

44
New cards

pred

Returns the predecessor to the current char

45
New cards

toLower

Turn a char to its lowercase form

46
New cards

toUpper

Turn a char to its uppercase form

47
New cards

isLower, isUpper, isDigit, isAlpha, isAscii

Check state and return true or false

48
New cards

(* —— *)

SML comment syntax

49
New cards

()

Tuple

50
New cards

Terminal Representation for Tuple

type*type*…*type

51
New cards

Record

Tuples with field-named sets of values

{a=3, b=2.0, c=”dog”}

52
New cards

[]

Empty list

53
New cards

::

List constructor

54
New cards

All elements of a list must be _______

Same type

55
New cards

:: type

‘a * ’a list → ‘a list

56
New cards

length L

Returns length of list

57
New cards

hd L

Returns first value of a list

58
New cards

tl L

Returns last value in a list

59
New cards

rev L

Returns reversed list

60
New cards

_

Wiidcard

61
New cards

Referential Transparency

Can interchange a computation and a value without impacting the overall program

62
New cards

Lexeme

It represents a single word or a base form of a word; Can be nouns, verbs, adjectives, adverbs

63
New cards

Type Specs

What types do the inputs have; what types do the outputs have

64
New cards

Semantic

Actual properties of the values

65
New cards

Mutual Recursion

Two functions that call each other recursively

66
New cards

Strongly Typed Language

Types computable at compile time

67
New cards

Enumeration

Type with a fixed list of values

68
New cards

[||]

Empty Array

Explore top flashcards

flashcards
World War 1
49
Updated 1216d ago
0.0(0)
flashcards
AP Lang Vocab Review Set
120
Updated 1127d ago
0.0(0)
flashcards
Anti-arrhythmics
60
Updated 471d ago
0.0(0)
flashcards
LG
330
Updated 1024d ago
0.0(0)
flashcards
World War 1
49
Updated 1216d ago
0.0(0)
flashcards
AP Lang Vocab Review Set
120
Updated 1127d ago
0.0(0)
flashcards
Anti-arrhythmics
60
Updated 471d ago
0.0(0)
flashcards
LG
330
Updated 1024d ago
0.0(0)