That was Hal's exact behavior in "_2001"
It "decided to “kill” its operator to prevent it from interfering with its efforts to achieve its mission."
Space/Science » in reply to In a simulation, USAF AI drone kills its operator.
It "decided to “kill” its operator to prevent it from interfering with its efforts to achieve its mission."