let check_limit s = if !cpt_nodes > maxnodes || s.depth > maxrounds then raise ReachedLimit