Approximately 12000 words on my dissertation so far! The cap is 15000 – I’m getting dangerously close. I should be able to reduce it a lot by swapping out code samples for images though. This would also make them easier to read as they will have syntax highlighting. Redoing my poster this weekend too.

Dissertation Project is almost complete!

Latest improvements:

Sub-expressions are now matched and swapped out if a reduction is made.

Conditionals evaluate with bindings correctly.

Executor forms also evaluate with bindings correctly.

I have a few abstract ideas about ensuring termination, but nothing properly explored yet.

As well as cycle capturing for termination, I also have to build an infix expression parser. For which, I am thinking about implementing a modified version of the shunting-yard algorithm. We’ll see how that goes.

I have a meeting with my project supervisor at 11am today. I’m wondering what he’ll say if I tell him I started from scratch two days ago and have already completed the core functionality. :D

Dissertation Project Progress!

This morning I have worked on my dissertation project.

I’ve built a very simple reduction mechanism which works as such:

Take a rule:
a * (b + c) = (a * b) + (a * c)

Have an expression:
x * (3 + (b / 2))

Apply the rule, and generate variable mappings if appropriate:
{ a : x
  b : 3
  c : (b / 2) }

Apply a the variable map with rule to get the reduced expression:
(x * 3) + (x * (b / 2))

I’ve the written the expressions here in infix but really they work as s-expressions. I’m building a parser to translate infix to s-expression to make my reduction system usable with expressions as they are usually written in mathematics (in infix).

I’m anticipating that the next difficult parts may be: reduction cycle detection and termination, the whole infix-parser, and the infix printer (if necessary).