add stop condition for partial evaluation