implemented FormulaValue::optimize().