Posts

A tiny proof checker in Prolog

The Prolog code for this post is available on GitHub . I am crazy enough to teach Hoare logic (axiomatic semantics) in the first course for our CS students. For instance, consider the following program (in some simple imperative language), which is supposed to compute quotient q and remainder r according to Euclidian division for operands  x and y : q = 0; r = x; while (r >= y) { r = r - y; q = q + 1; } Given natural numbers x and y , the postcondition of the program is this: x == q*y + r && q >= 0 && r>=0 && r < y The precondition is this is: x >= 0 && y > 0 We are supposed to prove the "triple" consisting of precondition, program, and postcondition. Let's face it, verification according to Hoare logic is not easily understood by beginners. Many of my students aren't mathematically / logically fit, when they enter the curriculum. So it is a pain in the neck for them to listen and for ...

My Gear Fit Wish List

For like 10 days I own and use a  Samsung Gear Fit . I love it. I don't agree with this  negative review . However, I hope Samsung improves the software in a timely manner. Here are some proposals, I should edit this blog post, as I see fit. Bug report : Cycling exercise stops recording because of "no movements" This happens after 10mins of recording. I think this happens because it uses a sanity check that may be right for running exercises, but there is no arm/hand movements, if you are cycling in a proper way. Within some time window, I can cancel the stop message to make it continue measuring. Anyway, this is highly annoying, as I need to hit a small on-display button while cycling. I don't see how one could not have caught this by basic field testing. [Added on 19 May 2014] Feature request : Usable wake-up gesture needed Currently, we have the choice between pushing the small hardware button on the Gear Fit to wake it up or relying on movement-bas...

Ostzonenprogrammierung

Einträge aus dem gefälschten Tagebuch eines Zonenprogrammierers um Weihnachten '88 Ralf Lämmel, 17.12.2013, Redevorlage für eine tierisch ernste Weihnachtsfeier Vorwort Derartige Text generieren mitunter gehässige Leserkommentare, welche dann hinterfragen, wie es sein kann, dass Beamte dieses Landes ihre Zeit auf solchen Quatsch verwenden. Deswegen soll hier ich pro forma betonen, dass ich diesen Unsinn zwischen den unbezahlten Überstunden an einem Wochenende durch grobe Vernachlässigung etwaig empfohlener Schlafmengen erstellt habe. Auch möchte ich erwähnen, dass ich als geborener Ostzonenprogrammierer ja nur durch geschichtliche Verwicklungen in diesem System gelandet bin, dessen Überlegenheit ich aber allein schon an der Menge und der Qualität der verfügbaren Bananen ablesen kann. Wir versetzen uns zurück in das Jahr 1988 , also dem Jahr vor 1989, also dem Jahr vor dem Jahr, in dem die Mauer viel -- wie man so sagt. Eigentlich ist die Mauer ja erst viel später v...

Install Mac OS X Mavericks from USB

It's really easy. Why would you do it? Do it on many machines without downloading Mavericks time and again. Do it on a machine that it not working proper in terms of its Mac OS X install. Do it on a machine where you want to flatten the old Mac OS X. Do it on a machine that refuses to install in the normal way so that you like to flatten. For instance, I had a 10.6 machine where the installer would fail because the existing partition was found to be non-usable. Apparently, this is a common problem also covered by the Apple KB . My partition was a standard one, as far as I can tell. How to prepare a USB install drive? A somewhat verbose story is given elsewhere : If you know sudo , then it is trivial: Format the USB stick with Disc Utility ; call it "Untitled" say. Just download Maverick (as if you wanted to install it). Run the following sudo command that prepares the USB drive in a few minutes. sudo /Applications/Install\ OS\ X\ Mavericks.app/Conte...
With two friends, I participated in a "Dinner for one" online quiz last night. Quite proud of our combined insight. Urkunde: Auswertung für den Test Dinner for one Super! Sie wissen was Miss Sophie und James jedes Jahr tun! Sie haben 10 von 10 Aufgaben richtig beantwortet. Im Durchschnitt haben die 1912 Surfer, die das Quiz gemacht haben, 6.77 richtige Antworten gegeben.   Auch das Quiz Dinner for one spielen?

Undergraduate reading material on SLE

What is SLE? You can shop around for definition attempts. ... on the websites of SLE conference series . ... in the guest editors' introduction to the IEEE TOSEM 2009 special issue on SLE . As a matter of fact, we don't have a proper, generally accepted and adopted definition. This indeed also showed at last year's SLEBOK workshop at SLE 2012. There is quite a few people (including me) who think that this needs to be fixed. On a related account, it is not even particularly clear what the core or extended set of SLE concepts would be. This makes it hard to properly cover the subject in teaching. I somehow have managed in my SLE class, but I do not claim to be very consistent and palatable as to the use of terminology (ontology) in the course. This semester's edition of my SLE course will feature reading (and corresponding presentations and discussions by the students) with one reading slot focused on basic SLE literature. I have started to collect a richly an...

Short note on syntactic sugar

Bran Selic, during his #models13 tutorial on modeling language design, mentioned the notion of "syntactic sugar" in passing, and he sort of stated, as far as I understood, that he isn't too happy with the term, as it seems to belittle those constructs; they are certainly important presumably for those who want to benefit from these constructs, for as long as we assume that the constructs do indeed capture valuable domain concepts. (Sorry if I am getting him wrong.) This got me thinking in that I wanted to hypothesize profoundly why this stuff is called "syntactic sugar". I was always assuming (and I think this is not controversial) that it simply classifies a language construct such that it can be eliminated from the language syntax by "desugaring", i.e., by a syntactic translation to core constructs. Of course, people use the term syntactic sugar in a somewhat more flexible manner. That is, they may also use it for constructs that do require a bit...