Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cool
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hans-Peter Deifel
cool
Commits
1717d534
Commit
1717d534
authored
7 years ago
by
Hans-Peter Deifel
Browse files
Options
Downloads
Patches
Plain Diff
Add a single satisfiable game node to states without children
parent
b1e625e9
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/lib/CoAlgReasoner.ml
+12
-19
12 additions, 19 deletions
src/lib/CoAlgReasoner.ml
with
12 additions
and
19 deletions
src/lib/CoAlgReasoner.ml
+
12
−
19
View file @
1717d534
...
...
@@ -139,7 +139,6 @@ let solveGame () =
|
Unsat
->
PG_Map
.
unsat_node
|
Open
->
stateGetIdx
state
in
let
coreGetIdxOr
node
core
=
match
coreGetStatus
core
with
|
Expandable
->
...
...
@@ -160,28 +159,22 @@ let solveGame () =
|
Open
->
coreGetIdx
core
in
let
emptyToSat
=
function
|
[]
->
[
PG_Map
.
sat_node
]
|
x
->
x
in
let
nodeSucessors1
node
=
let
res
=
match
PG_Map
.
find
node
with
|
PG_Map
.
State
state
->
List
.
map
fst
(
stateGetRulesWithIndex
state
)
|
PG_Map
.
Core
core
->
List
.
map
(
stateGetIdxOr
(
Some
PG_Map
.
unsat_node
))
(
coreGetChildren
core
)
|
PG_Map
.
Rule
(
_
,
cores
)
->
List
.
map
coreGetIdxOr1
cores
|
PG_Map
.
Sat
->
[
PG_Map
.
sat_node
]
|
PG_Map
.
Unsat
->
[
PG_Map
.
unsat_node
]
in
if
res
=
[]
then
begin
Printf
.
printf
"Empty children: "
;
match
PG_Map
.
find
node
with
|
PG_Map
.
State
_
->
Printf
.
printf
"State
\n
"
|
PG_Map
.
Core
core
->
Printf
.
printf
"Core: %s
\n
"
(
coreToString
core
)
|
PG_Map
.
Rule
_
->
Printf
.
printf
"Rule
\n
"
|
PG_Map
.
Sat
->
Printf
.
printf
"Sat
\n
"
|
PG_Map
.
Unsat
->
Printf
.
printf
"Unsat
\n
"
end
;
res
match
PG_Map
.
find
node
with
|
PG_Map
.
State
state
->
emptyToSat
(
List
.
map
fst
(
stateGetRulesWithIndex
state
))
|
PG_Map
.
Core
core
->
List
.
map
(
stateGetIdxOr
(
Some
PG_Map
.
unsat_node
))
(
coreGetChildren
core
)
|
PG_Map
.
Rule
(
_
,
cores
)
->
List
.
map
coreGetIdxOr1
cores
|
PG_Map
.
Sat
->
[
PG_Map
.
sat_node
]
|
PG_Map
.
Unsat
->
[
PG_Map
.
unsat_node
]
in
let
nodeSucessors2
node
=
match
PG_Map
.
find
node
with
|
PG_Map
.
State
state
->
List
.
map
fst
(
stateGetRulesWithIndex
state
)
|
PG_Map
.
State
state
->
emptyToSat
(
List
.
map
fst
(
stateGetRulesWithIndex
state
)
)
|
PG_Map
.
Core
core
->
List
.
map
(
stateGetIdxOr
(
Some
PG_Map
.
sat_node
))
(
coreGetChildren
core
)
|
PG_Map
.
Rule
(
_
,
cores
)
->
List
.
map
(
coreGetIdxOr
(
Some
PG_Map
.
sat_node
))
cores
|
PG_Map
.
Sat
->
[
PG_Map
.
sat_node
]
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment