let case_of_optimization logicvar refvar =
  if not logicvar then (if refvar then All else Nothing)
  else  (if refvar then All else Half)