Karachi   ->   Sweden   ->   Karachi, again   ->   Dubai   ->   Bahrain   ->   Karachi, once more   ->   London and Leeds

Wednesday, December 15, 2004

"Snow is white" is true if and only if snow is white

Tarski was the first person who argumented in this manner. Considering this from a purely software development point of view (and not as a Logician or Mathematician), this corresponds to the difference in the following two statements:

string s = "2+3 > 5";
bool b = 2+3 > 5;

As you can see, the two statements look alike but they are very different. The first one is just a sequence of symbols and the later is actually a comparison. However, one can write an eval function:

bool b = eval (s);

This can be thought of as interpretation of the syntax into semantics.

Trivial as it might seem, many people forget the difference while designing systems and realize this only some time later during development. For example, many times I have heard people saying, "we can store the names of the functions in a database table and call appropriate function by searching the name in the table." This really happens when people are naively designing a workflow engine kind of thing. How on earth are you going to relate the code with the string from the table? You need reflection!

I wanted to say a lot more but while writing this and looking for appropriate links, I found out this pdf. Too bad for me; nowadays, it's hard to come up with stuff people have not already thought of. I was trying to relate the completeness property of logic with software.



I just finished my second term here. The exams went pretty well, Alhumdo Lillah. My push-ups count has reached 3,597 in 30 days and I am lagging by 483 now! Exams are to be blamed.

پڑھ پڑھ لکھ لکھ لاویں ڈھیر، ڈھیر کتاباں چار چپھیر
گردے چانن، وچ انھیر، جاندی عمر نہیں اعتبار
اکو الف تیرے درکار

(Bulleh Shah, Sung by Junoon)

No comments:

Post a Comment