Are there any applications of Abstract Algebra to Programming Language Theory? Is there anything that would be useful in language design and compiler implementation?
-
7$\begingroup$ Uses of algebraic structures in theoretical computer science $\endgroup$Sasho Nikolov– Sasho Nikolov2012年08月20日 03:12:39 +00:00Commented Aug 20, 2012 at 3:12
-
3$\begingroup$ Have you checked the question linked above? Also Is Category Theory useful for learning functional programming? and Functional Programming. Do they answer your question? $\endgroup$Kaveh– Kaveh2012年08月20日 06:19:02 +00:00Commented Aug 20, 2012 at 6:19
3 Answers 3
Algebra in the classical sense of the word is used in modeling of computational effects as algebraic operations, see for example these slides by Gordon Plotkin, or you can read real papers and Ph.D. theses, if you actually meant to ask the question.
And to blow my own horn, have a look at Eff and read about it, a language designed around the idea that computational effects are algebraic operations and that handlers are homomorphisms of algebras.
-
1$\begingroup$ Eff is very cool -- what I understand about deliminted continuations comes mostly from it. $\endgroup$Neel Krishnaswami– Neel Krishnaswami2012年08月21日 11:31:41 +00:00Commented Aug 21, 2012 at 11:31
-
$\begingroup$ I am considering a blog reaction to Oleg's "callcc considered harmful" in which I argue that eff is the structured way of working with continuations. $\endgroup$Andrej Bauer– Andrej Bauer2012年08月21日 20:56:49 +00:00Commented Aug 21, 2012 at 20:56
-
$\begingroup$ Thanks to everyone for answering. I had to accept @AndrejBauer's answer since he implemented his own language as an answer to the question :) $\endgroup$n00b101– n00b1012012年08月22日 01:25:33 +00:00Commented Aug 22, 2012 at 1:25
-
$\begingroup$ You've got the order of things wrong there :) It just so happens that Matija and I implemented a language which fits your question. $\endgroup$Andrej Bauer– Andrej Bauer2012年08月22日 16:28:30 +00:00Commented Aug 22, 2012 at 16:28
I've hesitated to answer because any answer beyond a simple "yes" could and does fill volumes. Programming language semantics has been profoundly shaped by and in turn has deeply shaped the development of categorical logic, which is the application of algebra to logic.
But I suspect the best way of answering this question is to tell you to go learn Agda -- the experience of learning to program with dependent types is in large measure coming to grips with how comprehensively algebra pervades computer programming.
Actually there a software for theorical abstract algebra. This soft allow compute some kinds of things like actions groups, Homomorphism etc... It is Magma: http://magma.maths.usyd.edu.au/magma/
I hope this can help you.
-
2$\begingroup$ I am afraid that you have probably misunderstood the question. $\endgroup$Tsuyoshi Ito– Tsuyoshi Ito2012年08月22日 21:17:45 +00:00Commented Aug 22, 2012 at 21:17
-
$\begingroup$ You think? Well, with Magma you have a library in particular topic about abstract algebra, useful environment for apply in other fields, for example programming language... $\endgroup$Camilo Soler– Camilo Soler2012年08月23日 00:08:39 +00:00Commented Aug 23, 2012 at 0:08
-
1$\begingroup$ (1) If Magma has a library in particular topic about abstract algebra which is useful to apply to the programming language theory, then you should write about that application. I do not think that a pointer to Magma is helpful in the context of this question. (2) To be honest, I doubt that you understand what "programming language theory" means. $\endgroup$Tsuyoshi Ito– Tsuyoshi Ito2012年08月25日 17:17:51 +00:00Commented Aug 25, 2012 at 17:17
-
$\begingroup$ OK, I just wanted express my idea on another platform that has a library of abstract algebra as the basis (like example) for create or design another "programming language"... is not easy discuss here. I'm sorry if my idea was bad or wrong. $\endgroup$Camilo Soler– Camilo Soler2012年08月28日 03:31:11 +00:00Commented Aug 28, 2012 at 3:31