Refactor the code related to Constant.list, including coverting and
forall loop.