JSTarski
June 22nd, 2007Warning: Post is technical in scope, so brush up on Logic, First-order Logic (FOL), and quantifiers.
Last semester I was enrolled in Symbolic Logic, Philosophy U215, which is a pretty crazy class. It was pretty difficult for me to get my head around some of the topics. I’m unaware why they require the class, but it didn’t serve me the purpose it should have. If someone can provide me some insight about the class’s purpose please comment below. I hate to be ignorant so now that I reflect back on last semester I’m pretty infuriated I just let it pass.
The class used the book, “Language, Proof, and Logic” (LPL), from Stanford University. For the book they created a collection of programs. It’s pretty well designed even though there’s a few quirky things, but the biggest drawback is that it is Mac OS X and Windows dependent. LPL Software consists of four programs (descriptions taken from http://www-csli.stanford.edu/LPL/Info/):
- Boole is an aid for creating truth-tables. It includes an option to automatically generate the columns of the truth-table, although this option is disabled in the earliest exercises. Boole can be used to check the truth-table, either as it is being built or when it is complete, and to assess sentences of first order logic.
- Fitch is a tool for building formal proofs in the format presented in LPL. The instant feedback that Fitch provides, in verifying each proof and marking steps that do not check out properly, makes it possible for students to correct and learn from their mistakes without the intervention of an instructor.
- Tarski’s World is an environment in which students can evaluate sentences of first order logic. The students can create worlds, each of which consists of a chess-like board with blocks of various shapes and sizes positioned on it. Sentences are evaluated in the worlds, which can demonstrate counter-examples to the arguments presented in exercises.
- Submit is a very different application. It is used to send exercise files created in the other three applications to the Grade Grinder. There are currently two Grade Grinder servers, one at Stanford and one at Indiana University. Submit chooses one of the servers to connect to. The student must enter a Book Number, which can be found on the sleeve the CD came in, in order to use Submit. He or she must also enter their name and email address. The instructor’s name and email address are optional. After the Grade Grinder verifies the student’s Book Number, name, and email address, it receives the files. The files are graded and a grade report is sent out, by email, from the Grade Grinder to the student. If the student has chosen to submit to an instructor as well, the instructor’s name and email address are verified and an email is sent to him or her.
It was pretty frustrating while taking the class because I had to run a VMware Virtual Machine of Windows XP in the background just to use it since I’m using Kubuntu [Edgy at the time] (if you cringed then you’re probably still mad that the GUI made it mainstream). I started thinking about alternatives and the first that came to mind was a complete rewrite in JavaScript. Instead of tackling the whole collection of apps, I decided to focus on Tarski’s World. I chose this app even though it is the only supported app using Wine, because when I complete it I can propose the Stanford professors to change their code or even use mine!
I wanted to learn advanced JavaScript anyway so the best way to learn is to work on a complex project. I started working on it and figuring out the software logic behind it. For the most part it was pretty simple. I’ve gotten moving shapes, shape “Inspector” configuration panel (shape type, size, and name), logical predicates (e.g. Dodec, Tet, Smaller, etc.), logical operators (and, or, not, conditional, bi-conditional, equal and not equal), and most of verify functionality.
I am having trouble, however, figuring out how to create quantifiers.
