3 ms·
Without spoilers, here's an outline of an interview problem I did last Friday: 1) Here is a very small VM (fewer registers and fewer instructions than you can
by eli_gottlieb 10y ago
Without spoilers, here's an outline of an interview problem I did last Friday:
1) Here is a very small VM (fewer registers and fewer instructions than you can count on your hands). Write an interpreter for it.
2) Add an I/O instruction.
3) Having your interpreter and your I/O instruction, you are given at least one example of a program with a specific property. Write a program analysis which will detect the property soundly and completely.
Managing to finish (3) relies on knowing about certain fundamental concepts from automaton theory and program analysis. The company does actually use this knowledge regularly, so it makes sense that they'll ask. However, even parts (1) and (2) actually manage to test basic programming in a reasonable way.
- NTDF9 10y agoWhat do you work on? Can I interview with you?
- eli_gottlieb 10y agoI was the one interviewing for a job! If I get it, then maybe I can invite you. For now, precious is mine!
- NTDF9 10y agoHaha! Good luck. Sounds like an awesome opportunity if they deal with VMs and registers!
- twic 10y agoRegisters? You were lucky! Last time i did an interview problem with a weird machine, i didn't have any registers at all! And only three instructions, none of which were arithmetic!
- eli_gottlieb 10y agoBy the end the interviewer was telling it was all right for me to have mistakenly thought the registers were 32-bit words, and thus concluded the machine wasn't quite Turing-complete, and he was noting that our analysis should still work for the Turing-complete version with bignum registers.