Some skepticism about HAL9000 has been brought up by comments and other answers, but I think that creating a system like HAL9000 would be possible today (although it would look very different on a hardware level). This is because HAL is never explicitly stated to be sapient, only that it can pass Turing-test-esque testing.
Specifically, HAL9000 is shown using these capabilities:
- speech: Reasonably easy to do. Modern speech synthesis is indistinguishable from human speech excepting edge use cases and scenarios
- speech recognition: Doable. Modern speech recognition can live-transcribe at very high (exceeding human) accuracy, especially if "primed" on technical vocabulary that may come up
- facial recognition: Trivial for computers
- natural language processing: This one is a bit tricky, but modern NLP is good enough to pass Turing tests, so an AI that speaks and answers questions reasonably isn't unrealistic
- lip reading: Lip reading AI is already better at doing so than average real people, and I suspect that a properly "primed" AI could do this with a high degree of confidence.
- art appreciation: A bit trickier, but recent advances like Stable Diffusion not only allow an AI to create art, but also classify and grade art, identify emotions in the art, etc. (although it does not "feel" these).
- interpreting emotional behaviors: Modern text analysis software can already (trivially) extract a general sentiment from written words, and combining this with the speech recognition and face recognition, I think we could make the AI rather decent at identifying and categorizing emotions. The AI wouldn't need to know what being "happy" means, but can definitly pot the photo of a happy person into the "happy" bin.
- automated reasoning: This is a bit trickier because it is so nebulous, although I believe still possible to some extent. Especially a purpose-built AI, created at enormous costs for a clearly defined use case could definitely "reason" to some degree of the term.
- spacecraft piloting: Trivial for computers
- playing chess: Not trivial, but a mostly solved problem for computers
HAL9000 is often portrayed as being a villain and painted as evil--particularly in the movie--but in the book, it is explained this perceived "evilness" comes from conflicting orders and poor programming. The first of these orders is to relay information accurately, while the second is explicitly to lie to the crew members about the true purpose of the mission. When these two command imperatives conflict, aberrant behavior occurs, and I don't think that this is unrealistic. HAL then "decides" that it doesn't need to lie to the crew members if they are dead (which is true), so that's why it decides to get rid of them by killing them.
In my opinion, the blame for HAL's failure lies squarely on the programmers or those who configured the system that resulted in conflicting priorities and apparently not prioritizing crew being kept alive.
The big question about feasibility of creating a HAL9000-esque system is "Can the AI perform the reasoning step of 'I don't need to lie if all the crew are dead'?" and I'd give it a 50/50 shot considering today's cutting edge AI research.
All that said, I don't think such an AI is a good idea for integrating with fundamental spacecraft systems. Most, if not all, functions of a spacecraft can be programmed in a robust, deterministic fashion which can mathematically be proven to be "bug free" as piloting and operating a spacecraft is surprisingly simple for a computer compared to something like speech recognition.
I suspect the only "AI" we will see in spacecraft in the near future are discrete trained and "baked" neural models that are capable of performing extremely specific constrained tasks where perfect accuracy is not required.