more type safe inference of parameters

the hierarchy is more detailed now: ExecutionResult and PartialResult