How to guarantee the safety of autonomous vehicles