@@ -430,7 +430,8 @@ module Make (Thread : Thread_intf.S) = struct
430430 | `Unknown -> assert false
431431
432432 let select_inner ~explore_first ?(with_breadcrumbs = true )
433- (cond : Symbolic_value.bool ) ~prio_true ~prio_false =
433+ ~check_only_true_branch (cond : Symbolic_value.bool ) ~prio_true ~prio_false
434+ =
434435 let v = Smtml.Expr. simplify cond in
435436 match Smtml.Expr. view v with
436437 | Val True -> return true
@@ -465,15 +466,21 @@ module Make (Thread : Thread_intf.S) = struct
465466 in
466467
467468 let true_branch = branch v true prio_true in
468- let false_branch = branch (Symbolic_value.Bool. not v) false prio_false in
469- let * thread in
470- Thread. incr_path_count thread;
471- if explore_first then choose true_branch false_branch
472- else choose false_branch true_branch
469+
470+ if check_only_true_branch then true_branch
471+ else
472+ let false_branch =
473+ branch (Symbolic_value.Bool. not v) false prio_false
474+ in
475+ let * thread in
476+ Thread. incr_path_count thread;
477+ if explore_first then choose true_branch false_branch
478+ else choose false_branch true_branch
473479 [@@ inline]
474480
475481 let select (cond : Symbolic_value.bool ) ~prio_true ~prio_false =
476482 select_inner cond ~explore_first: true ~prio_true ~prio_false
483+ ~check_only_true_branch: false
477484 [@@ inline]
478485
479486 let summary_symbol (e : Smtml.Expr.t ) =
@@ -537,6 +544,7 @@ module Make (Thread : Thread_intf.S) = struct
537544 let * assertion_true =
538545 select_inner c ~with_breadcrumbs: false ~explore_first: false
539546 ~prio_true: Prio. Default ~prio_false: Prio. Default
547+ ~check_only_true_branch: false
540548 in
541549 if assertion_true then return ()
542550 else
@@ -551,10 +559,9 @@ module Make (Thread : Thread_intf.S) = struct
551559
552560 let assume c =
553561 let * assertion_true =
554- select_inner c ~with_breadcrumbs: false
555- ~explore_first: false
556- (* TODO: make the prio false very low, we are not interested in such branches *)
562+ select_inner c ~with_breadcrumbs: false ~explore_first: true
557563 ~prio_true: Prio. Default ~prio_false: Prio. Default
564+ ~check_only_true_branch: true
558565 in
559566 if assertion_true then return () else stop
560567end
0 commit comments