Skip to content
Snippets Groups Projects
Commit a2ec2dfc authored by Hans-Peter Deifel's avatar Hans-Peter Deifel :turtle:
Browse files

Set states without children to Sat early

We can set states without children to Sat right after we expand them.
parent afeec2f2
Branches
No related tags found
No related merge requests found
......@@ -1114,14 +1114,22 @@ let rec insertAllRules state rules =
List.mem true (List.map (fun (dep, children) -> insertRule state dep children) rules)
let expandState state =
let setSatOrOpen () =
if CU.TList.empty (stateGetRules state) then
stateSetStatus state Sat
else
stateSetStatus state Open
in
match stateNextRule state with
| MultipleElements rules ->
let unsat = insertAllRules state rules in
if not unsat then stateSetStatus state Open
if not unsat then setSatOrOpen ()
| SingleElement (dep, chldrn) ->
let unsat = insertRule state dep chldrn in
if not unsat then queueInsertState state else ()
| NoMoreElements -> stateSetStatus state Open
| NoMoreElements ->
setSatOrOpen ()
let expandCnstr cset =
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment