1 of 83

1

Too Many Bugs to Count

An Intuition into Why Formal Verification is Fundamentally Hard

Ali Atiia

Electisec Block II Retreat Session

July 24th 2022

2 of 83

2

Motivation:

  • FAQ: will automation tools replace auditors long-term?�
  • Intuition into the notions of impossibility and hardness of computational problems�

3 of 83

3

xP-Ex-

4 of 83

4

xP-Ex-

Take the following meaningless sentence as absolute Truth :

Hofstadter, D.R. Gödel, Escher, Bach: An Eternal Golden Braid. London: Penguin, 2000. (with modification)

5 of 83

5

xP-Ex-

Take the following meaningless sentence as absolute Truth :

It is composed of three letters: �P, E, and Hyphen (-)

6 of 83

6

xP-Ex-

Take the following meaningless sentence as absolute Truth :

It is composed of three letters: �P, E, and Hyphen (-)

x is not a letter, it is just a placeholder

for one or more Hyphens

7 of 83

7

This sentence is True … �self-evidently so … �no questions asked.

xP-Ex-

Take the following meaningless sentence as absolute Truth :

It is composed of three letters: �P, E, and Hyphen (-)

x is not a letter, it is just a placeholder

for one or more Hyphens

8 of 83

8

xP-Ex-

Take the following meaningless sentence as absolute Truth :

Obey the following rule mechanically & blindly :

If xPyEz is True,

Then xPy-Ez- is True too

9 of 83

Take the following meaningless sentence as absolute Truth :

9

Obey the following rule mechanically & blindly :

xP-Ex-

x,y,z stand for one or more hyphens

If xPyEz is True,

Then xPy-Ez- is True too

10 of 83

Take the following meaningless sentence as absolute Truth :

10

Obey the following rule mechanically & blindly :

xP-Ex-

-P-E--

--P-E---

Examples: �self-evident Truths

If xPyEz is True,

Then xPy-Ez- is True too

11 of 83

Take the following meaningless sentence as absolute Truth :

11

Obey the following rule mechanically & blindly :

xP-Ex-

-P-E--

--P-E---

-P--E---

--P--E----

Examples: �Truths by virtue of rule

If xPyEz is True,

Then xPy-Ez- is True too

Examples: �self-evident Truths

12 of 83

Take the following meaningless sentence as absolute Truth :

12

Obey the following rule mechanically & blindly :

xP-Ex-

-P-E--

-P--E---

--P-E---

--P--E----

If xPyEz is True,

Then xPy-Ez- is True too

Infinitely many Truths

13 of 83

Take the following meaningless sentence as absolute Truth :

13

Obey the following rule mechanically & blindly :

xP-Ex-

Infinitely many Truths

If xPyEz is True,

Then xPy-Ez- is True too

14 of 83

Take the following meaningless sentence as absolute Truth :

14

Obey the following rule mechanically & blindly :

xP-Ex-

?

What if we interpreted :

P as ‘plus’ and

E as ‘equals’ ?

- P – E --

1 + 1 = 2

If xPyEz is True,

Then xPy-Ez- is True too

15 of 83

Take the following meaningless sentence as absolute Truth :

15

Obey the following rule mechanically & blindly :

xP-Ex-

?

What if we interpreted :

P as ‘plus’ and

E as ‘equals’ ?

- P – E --

If xPyEz is True,

Then xPy-Ez- is True too

-P--E---

1 + 2 = 3

--P-E---

2 +1 = 3

--P--E----

2 + 2 = 4

1 + 1 = 2

16 of 83

Take the following meaningless sentence as absolute Truth :

16

Obey the following rule mechanically & blindly :

xP-Ex-

If xPyEz is True,

Then xPy-Ez- is True too

This is the (meaningful) set of all legal arithmetic additions over the set of natural numbers

17 of 83

Take the following meaningless sentence as absolute Truth :

17

Obey the following rule mechanically & blindly :

xP-Ex-

If xPyEz is True,

Then xPy-Ez- is True too

If we encode symbols with numbers:

P = 101

E = 110

- = 111

18 of 83

Take the following meaningless sentence as absolute Truth :

18

Obey the following rule mechanically & blindly :

xP-Ex-

If xPyEz is True,

Then xPy-Ez- is True too

P = 101

E = 110

- = 111

we can treat strings as numbers,

example:

-P-E-- = 111 101 111 110 111 111

= 253887 (in decimal)

If we encode symbols with numbers:

19 of 83

Take the following meaningless sentence as absolute Truth :

19

Obey the following rule mechanically & blindly :

xP-Ex-

If xPyEz is True,

Then xPy-Ez- is True too

Every dot here is a number which, once decoded back to P’s, E’s and hyphens, corresponds to a a self-evident or derived Truth

we can treat strings as numbers,

example:

-P-E-- = 111 101 111 110 111 111

= 253887 (in decimal)

20 of 83

20

The set of natural numbers N

a subset of N

21 of 83

21

The set of natural numbers N

a subset of N

Let’s employ a ‘bouncer’ to decide which numbers are IN and which are OUT:

22 of 83

22

The set of natural numbers N

a subset of N

Any machine capable of mechanically following simple unambiguous instructions would suffice, no ‘intelligence’ required

Or

Let’s employ a ‘bouncer’ to decide which numbers are IN and which are OUT:

23 of 83

23

The set of natural numbers N

a subset of N

Any machine capable of mechanically following simple unambiguous instructions would suffice, no ‘intelligence’ required

Let’s employ a ‘bouncer’ to decide which numbers are IN and which are OUT:

1. Take a number n as input

2. k = n in binary

3. Generate all TRUTH/TRUTH s, #digit(s) = #digits(k)� put it in container C

4. Examine every element s in C

if s = k, accept n and halt.

5. Reject n

24 of 83

24

The set of natural numbers N

The language … and the machine

a subset of N

1. Take a number n as input

2. k = n in binary

3. Generate all TRUTH/TRUTH s, #digit(s) = #digits(k)� put it in container C

4. Examine every element s in C

if s = k, accept n and halt.

5. Reject n

25 of 83

25

The set of natural numbers N

The language … and the machine

a subset of N

1. Take a number n as input

2. k = n in binary

3. Generate all TRUTH/TRUTH s, #digit(s) = #digits(k)� put it in container C

4. Examine every element s in C

if s = k, accept n and halt.

5. Reject n

The machine instructions are themselves written using some kind of alphabet (English-ish, Java, Python, assembly … doesn’t matter)

If we encode that alphabet with numbers, then the above machine is a number itself

26 of 83

26

The set of natural numbers N

1. Take a number n as input

2. k = n in binary

3. Generate every TRUTH/TRUTH s, #digit(s) = #digits(k)� put it in container C

4. Examine every element s in C

if s = k, accept n and halt.

5. Reject n

The language … and the machine

a subset of N

The machine instructions are themselves written using some kind of alphabet (English-ish, Java, Python, assembly … doesn’t matter)

If we encode that alphabet with numbers, then the above machine is a number itself

27 of 83

27

The set of natural numbers N

The language … and the machine

28 of 83

28

The set of natural numbers N

The language … and the machine

More languages and machines …

29 of 83

29

The set of natural numbers N

The language … and the machine

More languages and machines …

The English language (i.e. an infinite set of numbers each encoding one of the infinitely-many syntactically-correct English sentences)

30 of 83

30

The set of natural numbers N

The language … and the machine

More languages and machines …

The English language (i.e. an infinite set of numbers each encoding one of the infinitely-many syntactically-correct English sentences)

a parser written in Java (more precisely, the number encoding for that parser’s code)

31 of 83

31

The set of natural numbers N

The language … and the machine

More languages and machines …

All DNA sequences encoding for valid Panda genomes

32 of 83

32

The set of natural numbers N

The language … and the machine

More languages and machines …

All DNA sequences encoding for valid Panda genomes

A number encoding bio-specs of female Panda womb (or encoding the software program simulating it)

33 of 83

33

The set of natural numbers N

The language … and the machine

More languages and machines …

Prime numbers (or the numbers encoding those numbers!)

34 of 83

34

The set of natural numbers N

The language … and the machine

More languages and machines …

Primality-testing algorithm (or the software implementation of that algorithm (more precisely: the number encoding that implementation … yadda .. yadda))

Prime numbers (or the numbers encoding those numbers!)

35 of 83

35

The set of natural numbers N

The language … and the machine

More languages and machines …

an infinite set of numbers each encoding a triplet (a, b, c) where c is the Greatest Common Divisor of a and b

36 of 83

36

The set of natural numbers N

The language … and the machine

More languages and machines …

Euclid’s method for finding greatest common divisor

an infinite set of numbers each encoding a triplet (a, b, c) where c is the Greatest Common Divisor of a and b

37 of 83

37

Languages

Machines

38 of 83

38

Languages

Machines

TRUTHS

PROOFS

39 of 83

39

Languages

Machines

TRUTHS

PROOFS

40 of 83

40

Is there a SUPER-language ? A language of all languages ?

Languages

Machines

TRUTHS

PROOFS

41 of 83

41

Is there a SUPER-language ? A language of all languages ?

In other words …

If we started off with a more sophisticated set of alphabet like :

∀ ∃ ∄ { } | ∩ ∪ ⊆ ⊂ ⊄ ⊇ ⊃ ⊅ \ ∈ ∉ × Ø % ⇒ ¬

plus the Greek alphabet as placeholders of objects etc

Languages

Machines

TRUTHS

PROOFS

42 of 83

42

Is there a SUPER-language ? A language of all languages ?

And accepted few self-evident Truths (axioms)

In other words …

If we started off with a more sophisticated set of alphabet like :

∀ ∃ ∄ { } | ∩ ∪ ⊆ ⊂ ⊄ ⊇ ⊃ ⊅ \ ∈ ∉ × Ø % ⇒ ¬

plus the Greek alphabet as placeholders of objects etc

Languages

Machines

TRUTHS

PROOFS

43 of 83

43

Is there a SUPER-language ? A language of all languages ?

Is there a guarantee that every conceivable language (hence every Truth) is inside this SUPER-language ?

In other words …

If we started off with a more sophisticated set of alphabet like :

And accepted few self-evident Truths (axioms)

∀ ∃ ∄ { } | ∩ ∪ ⊆ ⊂ ⊄ ⊇ ⊃ ⊅ \ ∈ ∉ × Ø % ⇒ ¬

plus the Greek alphabet as placeholders of objects etc

Languages

Machines

TRUTHS

PROOFS

44 of 83

44

Is there a SUPER-language ? A language of all languages ?

Languages

Machines

TRUTHS

PROOFS

45 of 83

45

Is there a SUPER-language ? A language of all languages ?

Is there a SUPER-machine ? A bouncer machine for SUPER-language ?

Languages

Machines

TRUTHS

PROOFS

46 of 83

46

Is there a SUPER-language ? A language of all languages ?

Is there a SUPER-machine ? A bouncer machine for SUPER-language ?

SUPER-machine = aware of the axioms of SUPER-language

faithful to the rules of SUPER-language

Languages

Machines

TRUTHS

PROOFS

47 of 83

47

Is there a SUPER-language ? A language of all languages ?

Is there a SUPER-machine ? A bouncer machine for SUPER-language ?

Nothing SUPER about this machine really, when consulted about whether a number is IN our OUT, it consults the axioms and applies the rules mechanically

e.g. recall the machine sketched above for the P-E language has no conception of “addition”

SUPER-machine = aware of the axioms of SUPER-language

faithful to the rules of SUPER-language

Languages

Machines

TRUTHS

PROOFS

48 of 83

48

Is there a SUPER-language ?

Is there a SUPER-machine ?

Suppose someone clever constructed a SUPER-language L

(s/he chose an alphabet, declared some axioms, and defined the rules of derivation)

Languages

Machines

TRUTHS

PROOFS

49 of 83

49

Supposedly L contains all Truths about anything:

Numbers ………………………...….arithmetic etc

Cities, People ………………………….. graphs etc

DNA Sequences ……………….. alignments etc

P-E system …………………….........……addition

.

.

objects …………………………….relations

Is there a SUPER-language ?

Is there a SUPER-machine ?

Suppose someone clever constructed a SUPER-language L

(s/he chose an alphabet, declared some axioms, and defined the rules of derivation)

Languages

Machines

TRUTHS

PROOFS

50 of 83

50

Supposedly L contains all Truths about anything:

Numbers ………………………...….arithmetic etc

Cities, People ………………………….. graphs etc

DNA Sequences ……………….. alignments etc

P-E system …………………….........……addition

.

.

objects …………………………….relations

Take this to your wildest most abstract imagination

Is there a SUPER-language ?

Is there a SUPER-machine ?

Suppose someone clever constructed a SUPER-language L

(s/he chose an alphabet, declared some axioms, and defined the rules of derivation)

Languages

Machines

TRUTHS

PROOFS

51 of 83

51

Supposedly L contains all truths about anything:

So consider this statement which should be in L :

G = “G is not a Truth in L”

(cleverly constructed using L’s own alphabet/rules/axioms)

Is there a SUPER-language ?

Is there a SUPER-machine ?

Languages

Machines

TRUTHS

PROOFS

52 of 83

52

G = “G is not a Truth in L”

If L said G is True, it would have effectively shot itself in the foot and proven its own inconsistency !

Why ?

Is there a SUPER-language ?

Is there a SUPER-machine ?

Supposedly L contains all truths about anything:

So consider this statement which should be in L :

Languages

Machines

TRUTHS

PROOFS

(cleverly constructed using L’s own alphabet/rules/axioms)

53 of 83

53

G = G is not a Truth in L”

If L said G is True, it would have effectively shot itself in the foot and proven its own inconsistency !

Why ? Because both G and NOT(G) would be True … ops!

Is there a SUPER-language ?

Is there a SUPER-machine ?

Supposedly L contains all truths about anything:

So consider this statement which should be in L :

Languages

Machines

TRUTHS

PROOFS

Logical blackhole (!)

54 of 83

54

Socrates: “All Greeks are liars”

G is basically the Liar’s Paradox stated mathematically :

55 of 83

55

Socrates: “All Greeks are liars”

Neither True nor False … but something weird in between

G is basically the Liar’s Paradox stated mathematically :

56 of 83

56

“For any universal record player, realized or yet to be, there exists a record which, if played, will result in the player’s indirect self-destruction.”

Hofstadter, D.R. Gödel, Escher, Bach: An Eternal Golden Braid. London: Penguin, 2000. (with modification)

A metaphor ..

57 of 83

57

No

Some Truths are beyond provability

Is there a SUPER-machine ?

Is there a SUPER-language ?

Languages

Machines

TRUTHS

PROOFS

58 of 83

58

Is there a SUPER-machine ?

Is there a SUPER-language ?

Languages

Machines

TRUTHS

PROOFS

59 of 83

59

Is there a SUPER-machine ?

Is there a SUPER-language ?

Let’s settle for a super-language (small letter ‘s’) ..

(ignore those logical blackholes, when was the last time someone bumped into one anyway, practically speaking ? )

Languages

Machines

TRUTHS

PROOFS

60 of 83

60

super-language = all Truths (minus some weird “problematic statements)

Is there a SUPER-machine ?

Is there a SUPER-language ?

Let’s settle for a super-language (in small letters) ..

Languages

Machines

TRUTHS

PROOFS

61 of 83

61

super-language = all Truths (minus some weird “problematic statements)

super-language can describe everything, including machines

Is there a SUPER-machine ?

Is there a SUPER-language ?

Let’s settle for a super-language (in small letters) ..

Languages

Machines

TRUTHS

PROOFS

62 of 83

62

Every conceivable sentence

1

2

3

4

5

.

.

n

.

.

1

2

3

4

.

.

.

n

.

.

Every conceivable machine

Is there a SUPER-machine ?

Is there a SUPER-language ?

Languages

Machines

TRUTHS

PROOFS

63 of 83

63

1

2

3

4

5

.

.

n

.

.

1

0

0

89

3

0

.

.

0

.

.

2

10

1

0

0

0

.

.

0

.

.

3

0

0

0

0

0

.

.

0

.

.

4

20

0

4

1

0

.

.

56

.

.

.

60

0

0

0

0

.

.

3

.

.

.

0

0

0

0

6

.

.

0

.

.

.

30

0

0

3

0

.

.

3

.

.

n

0

9

0

0

2

.

.

40

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

Every conceivable machine

This is the result returned by

machine number 2 when supplied with 1 as input

Is there a SUPER-machine ?

Is there a SUPER-language ?

Every conceivable sentence

Languages

Machines

TRUTHS

PROOFS

64 of 83

64

1

2

3

4

5

.

.

n

.

.

1

0

0

89

3

0

.

.

0

.

.

2

10

1

0

0

0

.

.

0

.

.

3

0

0

0

0

0

.

.

0

.

.

4

20

0

4

1

0

.

.

56

.

.

.

60

0

0

0

0

.

.

3

.

.

.

0

0

0

0

6

.

.

0

.

.

.

30

0

0

3

0

.

.

3

.

.

n

0

9

0

0

2

.

.

40

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

Is there a SUPER-machine ?

Is there a SUPER-language ?

Consider machine number k which operates as follows:

Languages

Machines

TRUTHS

PROOFS

65 of 83

65

1

2

3

4

5

.

.

n

.

.

1

0

0

89

3

0

.

.

0

.

.

2

10

1

0

0

0

.

.

0

.

.

3

0

0

0

0

0

.

.

0

.

.

4

20

0

4

1

0

.

.

56

.

.

.

60

0

0

0

0

.

.

3

.

.

.

0

0

0

0

6

.

.

0

.

.

.

30

0

0

3

0

.

.

3

.

.

n

0

9

0

0

2

.

.

40

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

Is there a SUPER-machine ?

Is there a SUPER-language ?

Consider machine number k which operates as follows:

1. It receives sentence n

Languages

Machines

TRUTHS

PROOFS

66 of 83

66

1

2

3

4

5

.

.

n

.

.

1

0

0

89

3

0

.

.

0

.

.

2

10

1

0

0

0

.

.

0

.

.

3

0

0

0

0

0

.

.

0

.

.

4

20

0

4

1

0

.

.

56

.

.

.

60

0

0

0

0

.

.

3

.

.

.

0

0

0

0

6

.

.

0

.

.

.

30

0

0

3

0

.

.

3

.

.

n

0

9

0

0

2

.

.

40

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

Is there a SUPER-machine ?

Is there a SUPER-language ?

Consider machine number k which operates as follows:

1. It receives sentence n

2. It feeds sentence n to machine n

Languages

Machines

TRUTHS

PROOFS

67 of 83

67

1

2

3

4

5

.

.

n

.

.

1

0

0

89

3

0

.

.

0

.

.

2

10

1

0

0

0

.

.

0

.

.

3

0

0

0

0

0

.

.

0

.

.

4

20

0

4

1

0

.

.

56

.

.

.

60

0

0

0

0

.

.

3

.

.

.

0

0

0

0

6

.

.

0

.

.

.

30

0

0

3

0

.

.

3

.

.

n

0

9

0

0

2

.

.

40

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

Is there a SUPER-machine ?

Is there a SUPER-language ?

Consider machine number k which operates as follows:

1. It receives sentence n

2. It feeds sentence n to machine n

3. It adds 1 to the result (diagonal+1)

Languages

Machines

TRUTHS

PROOFS

68 of 83

68

1

2

3

4

5

.

.

n

.

.

1

0

0

89

3

0

.

.

0

.

.

2

10

1

0

0

0

.

.

0

.

.

3

0

0

0

0

0

.

.

0

.

.

4

20

0

4

1

0

.

.

56

.

.

.

60

0

0

0

0

.

.

3

.

.

.

0

0

0

0

6

.

.

0

.

.

.

30

0

0

3

0

.

.

3

.

.

n

0

9

0

0

2

.

.

40

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

Consider machine number k which operates as follows:

1. It receives sentence n

2. It feeds sentence n to machine n

3. It adds 1 to the result (diagonal+1)

4. It terminates

Is there a SUPER-machine ?

Is there a SUPER-language ?

Languages

Machines

TRUTHS

PROOFS

69 of 83

69

1

2

3

4

5

.

.

n

.

.

1

0

0

89

3

0

.

.

0

.

.

2

10

1

0

0

0

.

.

0

.

.

3

0

0

0

0

0

.

.

0

.

.

4

20

0

4

1

0

.

.

56

.

.

.

60

0

0

0

0

.

.

3

.

.

.

0

0

0

0

6

.

.

0

.

.

.

30

0

0

3

0

.

.

3

.

.

n

0

9

0

0

2

.

.

40

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

mk (n) = mn (n) + 1

In other words, in shorthand notation :

Consider machine number k which operates as follows:

1. It receives sentence n

2. It feeds sentence n to machine n

3. It adds 1 to the result (diagonal+1)

4. It terminates

Is there a SUPER-machine ?

Is there a SUPER-language ?

Languages

Machines

TRUTHS

PROOFS

70 of 83

70

1

2

3

4

5

.

.

n

.

.

1

0

0

89

3

0

.

.

0

.

.

2

10

1

0

0

0

.

.

0

.

.

3

0

0

0

0

0

.

.

0

.

.

4

20

0

4

1

0

.

.

56

.

.

.

60

0

0

0

0

.

.

3

.

.

.

0

0

0

0

6

.

.

0

.

.

.

30

0

0

3

0

.

.

3

.

.

n

0

9

0

0

2

.

.

40

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

What happens if we supply sentence k iself to mk ?

Is there a SUPER-machine ?

Is there a SUPER-language ?

Languages

Machines

TRUTHS

PROOFS

71 of 83

71

1

2

3

4

5

.

.

n

.

.

1

0

0

89

3

0

.

.

0

.

.

2

10

1

0

0

0

.

.

0

.

.

3

0

0

0

0

0

.

.

0

.

.

4

20

0

4

1

0

.

.

56

.

.

.

60

0

0

0

0

.

.

3

.

.

.

0

0

0

0

6

.

.

0

.

.

.

30

0

0

3

0

.

.

3

.

.

n

0

9

0

0

2

.

.

40

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

mk (k) = mk (k) + 1

What happens if we supply sentence k to mk ?

Is there a SUPER-machine ?

Is there a SUPER-language ?

Languages

Machines

TRUTHS

PROOFS

72 of 83

72

1

2

3

4

5

.

.

n

.

.

1

0

0

89

3

0

.

.

0

.

.

2

10

1

0

0

0

.

.

0

.

.

3

0

0

0

0

0

.

.

0

.

.

4

20

0

4

1

0

.

.

56

.

.

.

60

0

0

0

0

.

.

3

.

.

.

0

0

0

0

6

.

.

0

.

.

.

30

0

0

3

0

.

.

3

.

.

n

0

9

0

0

2

.

.

40

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

mk (k) = mk (k) + 1

What happens if we supply sentence k to mk ?

(!)

Logical blackhole, so mk does not, could not, exist!

Is there a SUPER-machine ?

Is there a SUPER-language ?

Languages

Machines

TRUTHS

PROOFS

73 of 83

73

No

Some Truths are beyond provability

No

There are more languages than there are machines to decide them!

Is there a SUPER-machine ?

Is there a SUPER-language ?

Languages

Machines

TRUTHS

PROOFS

74 of 83

74

No

There are more languages than there are machines to decide them!

Is there a SUPER-machine ?

Languages

Machines

TRUTHS

PROOFS

  • These are questions about the the foundation of mathematics itself

  • Computer Science was born out of answers to these questions in the 1930’s (Kurt Gödel, Alain Turing, and Alonso Church)

No

Some Truths are beyond provability

Is there a SUPER-language ?

75 of 83

75

Logical blackholes (unprovable Truths)

Boundary of the provable (what’s inside is decidable/solvable/provable… in principle)

76 of 83

76

Chess

Protein folding

Sequence alignment

Arithmetic

77 of 83

77

Chess

Protein folding

Sequence alignment

Arithmetic

Complexity Hierarchy: the closer the language is to this boundary, the harder (more computationally expensive) it is for a decider to tell who is IN and who is OUT

78 of 83

78

Complexity Hierarchy is to computer scientists what the Periodic Table is to physicists

79 of 83

79

No

There are more languages than there are machines to decide them!

Is there a SUPER-machine ?

Languages

Machines

TRUTHS

PROOFS

No

Some Truths are beyond provability

Is there a SUPER-language ?

No

There are more bugs than there are algorithms to find them!

is there an algorithm to detect every bug?

80 of 83

What about muh Formal Verification?

  • It works well for limited scope algorithms with manageable non-determinism. Example: ETH2 deposit contract.�
  • You must define what invariants to check�
  • Two challenges:
    • you forget to define an invariant
    • you misdefine an invariant (a bug in the spec itself)

80

81 of 83

What about muh Formal Verification?

81

82 of 83

82

Languages

Machines

TRUTHS

PROOFS

Conclusion:

  • why can’t automated auditing ever replace human intuition?

  • Theoretical limitation: because there are more bugs than algorithms to find them!
  • Practical limitation: defining invariants to formally verify is arduous, and the definitions (“spec”) themselves can be buggy

  • Further reading: check out Rice’s theorem

83 of 83

Thank you

83