Fifth post
This week I was reading a bit about maths and other things and discovered that my approach to primitive recursion has already been done. It is called structural recursion https://en.wikipedia.org/wiki/Structural_induction. (this is about my definition of primitive recursion, not the integration. Also as a side note, I am using primitive recursion in place of terminating recursion because I am lazy with my terminology, I apologize).
I also realized that my project wasn't that interesting and that my type system especially was kinda lame. I feel as if I can go harder and make my type system more interesting and worth doing. I also feel that the amount of time I've given myself too much time so I'll end up not really doing much for most of it. Due to these reasons, I have been exploring some type theories to see if there's anything I can mangle into a type system for this assignment.
The main candidates (so far, this is early days of research) are:
- Hindley Milner
- not because it's particularly challenging, but because of the legacy. Although this is why I am considering not doing it.
- Calculus of constructions
- this would be good because I know that it works in a programming language well (coq).
- It also is good because it's something interesting and new to me so I won't get bored.
- Although as it has already been implemented some of the appeal is lost.
- Homotopy type theory
- I have no idea how it works or how intuitionistic type theory works so I really need to do my research.
- This is the first maths field I have discovered that is actively being researched so the appeal is very high
- (hopefully) nobody has done this yet?
- I am very uncertain on how to apply it to programming languages.
- This is the front runner for me because of how cool it is but it will require some serious reading.
and if this idea falls through and it turns out type theory is not fun then I can always fall back on the super simple type system I was planning on implementing at the start. But so far I have had a lot of fun with it.
Something that I need to consider is how this type system will interact with the integration. The integration is specified with the bottom type in theory but I may have accidentally written myself into a hole here because no function can return the bottom type or something. Either way, I need to get a type system that will handle this oddity or change to returning the unit type, but this is also another issue so I am unsure. Further research is definitely needed.
In terms of challenges this week, learning maths outside of school is always going to be a little hard but it's why I am doing it. It's a fun challenge. On top of this, I am having problems with the relationships between type theory and first-order logic. I am also having a really hard time understanding Curry-Howard correspondence which I think is going to probably be pretty important for a project like this. But I assume this is just a lack of understanding of type theory (and logic) which is holding me back so hopefully by the time I have to begin development on the type system (and fixing the old primitive checker) I will have figured it out. Or potentially get someone to explain it to me.
Comments
Post a Comment