[ prog / sol / mona ]

prog


Lambda Machine

1 2020-03-09 20:39

Would it be possible to build hardware that is based on the lambda calculus and not the Turing machine?

2 2020-03-09 21:17

Yes. All you need is to use a representation of it in hardware. Look at the SECD machine as an example; the machine is based around linked-lists and evaluating expressions based on environments described in other linked-lists.

3 2020-03-09 21:44

Nitpick: Modern Hardware isn't "based" on a Turing machine. Turing machines cannot reprogram themselves, since their program isn't in memory.

Otherwise I consider it unlikely, outside of academic interest, because besides having a backset over 70 years in terms of technical development, the church-turing thesis proves that there is nothing to gain, as least from a computational perspective. It's just a lot easer to build hardware that executes statements, than that evaluates expressions, because the former is simpler in implementation, while the latter is simpler in model, as it hides complexity in it's realization.

4 2020-03-10 07:40

>>2
Thanks. I was vaguely aware of abstract machines, but had no idea someone actually tried implementing one in hardware.

>>3
Don't worry, I am not planning to found a start-up building lambda-chips. I am just curious if other paradigms are possible.

5 2020-03-10 19:24

I am just curious if other paradigms are possible

Do you know about stack-based CPUs? https://en.wikipedia.org/wiki/Stack_machine

6 2020-03-10 19:53

>>5
Yes. As far as I know, there are three classes of CPUs: accumulator based, stack based and register based. They are mostly similar, the main differences being the way they access values.

I am only familiar with register based ones, maybe I should study historical examples of the other two... Any recommendations?

7 2020-03-10 20:05

>>6
Have a look at this nice homemade computer: http://www.aholme.co.uk/Mk1/Architecture.htm or this stack-based CPU in 200 lines of Verilog: https://www.excamera.com/sphinx/fpga-j1.html

The JVM is stack-based too.

8 2020-03-10 20:13

>>6

historical examples

http://www.smecc.org/The%20Architecture%20%20of%20the%20Burroughs%20B-5000.htm

9 2020-03-11 05:39

>>6

As far as I know, there are three classes of CPUs: accumulator based, stack based and register based.

You're wrong, as that's not exhaustive. Another type of machine is memory-to-memory and yet another type is the Mill architecture, which is like a register machine with an implicit destination that isn't one of the source registers.

I've a writeup on this narrow topic, but I'll only link to it if it's wanted.

10 2020-03-11 07:23

>>9
You are right, there are memory-memory, register-memory and register-register (with load/store) architectures. I never heard about the Mill architecture, so let's see what you have to share!

11 2020-03-11 07:45

>>10
Here it is: http://verisimilitudes.net/2017-05-07

I don't cover the more abstract machines of this particular topic, but perhaps you'll find value in reading it anyway.

12


VIP:

do not edit these