update solver invoke pattern in function main().