arrows
Made some progress on the arrows wikibook last night. I understand what the Swierstra and Duponcheel parser does now. Kinda funny, I keep calling it S+W when I should be saying S+D. Think I must be getting confused by the 'w' in Swierstra.the Useful Thought
I had a Useful Thought while eating my Weetabix this morning: if I understand correctly, which I probably don't, the usefulness of arrows come from the fact that they helpful avoid to needlessly expect sequence conditions. That is, when two calculations do not depend on each other, arrows help you to avoid fooling your computer into thinking they do. As a result of this, you get to avoid all sorts of nasty space and time leaks. Or maybe I'm completely missing the point here, maybe it's just because you can do tricks like the Swierstra and Duponcheel static parser thingy... ugh... I hate this hazy understanding of stuff.Anyway, the Useful Thought is that if avoiding stupid sequencing is important, then the way for me to exploit arrows would consist of finding computations that are inherently parallel... but ugh... what? This is bottom up parsing, items depend on other items being generated. There is one place where we can have some parallelism, though: everytime you select an agenda item, you try to combine it with all of the items in the chart. Each of these comparisons can be done in parallel, yet in the GenI code, they are sequenced by a mapM. Could I do something useful like the StaticParser trick to avoid a bunch of useless computation, or to help my computer know when it can garbage collect something? I dunno. What's kind of amusing about this, again if I understand correctly, is that arrows help your program behave like you'd naively expect it do - they help you get down to the theoretical complexity.
Anyway, be careful with the paragraph above. I might also be full of shit.
the mammoth patch
Early this afternoon, I finished off my mammoth patch from yesterday. I guess I'm coming to terms with the added complexity. Part of it is that I found a less ugly way of doing something I was trying to do last night. The part is that I realised that some of this complicatedness can not be helped, because in some places, I'm adding more sophisticated behaviour such as using bit vectors to represent the semantics.dependency graph
Look at the difference between these dependency graphs.Before:

After:

See what a difference a little transitive reduction makes?






