Created by Simon Cross / @hodgestar
Which things? Glad you asked! :)
Given a non-trivial property of computable partial functions the problem of whether a particular program computes such a function is undecidable
Properties that refer to behaviour
Properties that refer to input and output only
Properties that refer to the implementation
def has_cool_property(f):
"""Returns True if f has this cool property,
False otherwise."""
# XXX: Put magic here!
def tiny_cool_function(*args, **kw):
"""Tiny function we wrote to show the cool property
is sometimes met."""
# XXX: Write this.
def halts(a, i):
"""Returns True if a halts given input i."""
def t(*args, **kw):
a(i) # this is just here to mess with has_cool_property
return tiny_cool_function(*args, **kw)
return has_cool_property(t)
a.k.a. things that might work
If you want a property, design it in up front ...
because you won't be able to check later. :/
whatever / 25 ; # / ; die "this dies!";
“Compiling a program and staring at a screenfull of nagging messages is a dull and exasperating activity.”
“In fact, I would venture to say that after a couple days playing with Python, many faculty who are now teaching C++ would know Python better.”