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
ad63163e
Commit
ad63163e
authored
11 years ago
by
Thorsten Wißmann
Browse files
Options
Downloads
Patches
Plain Diff
Improve K formula generator
parent
b59059c4
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
CoolUtils.ml
+4
-0
4 additions, 0 deletions
CoolUtils.ml
CoolUtils.mli
+2
-0
2 additions, 0 deletions
CoolUtils.mli
coalgcompare.ml
+14
-10
14 additions, 10 deletions
coalgcompare.ml
with
20 additions
and
10 deletions
CoolUtils.ml
+
4
−
0
View file @
ad63163e
...
@@ -44,3 +44,7 @@ let cl_set_agents arr = ignore (
...
@@ -44,3 +44,7 @@ let cl_set_agents arr = ignore (
let
intlist_of_string
str
=
List
.
map
int_of_string
(
Str
.
split
(
Str
.
regexp
"[
\t
,]+"
)
str
)
let
intlist_of_string
str
=
List
.
map
int_of_string
(
Str
.
split
(
Str
.
regexp
"[
\t
,]+"
)
str
)
let
compose
f
g
x
=
f
(
g
(
x
))
let
flip
f
y
x
=
f
x
y
This diff is collapsed.
Click to expand it.
CoolUtils.mli
+
2
−
0
View file @
ad63163e
...
@@ -21,3 +21,5 @@ val cl_set_agents : int array -> unit
...
@@ -21,3 +21,5 @@ val cl_set_agents : int array -> unit
val
intlist_of_string
:
string
->
int
list
val
intlist_of_string
:
string
->
int
list
val
compose
:
(
'
b
->
'
c
)
->
(
'
a
->
'
b
)
->
(
'
a
->
'
c
)
val
flip
:
(
'
a
->
'
b
->
'
c
)
->
(
'
b
->
'
a
->
'
c
)
This diff is collapsed.
Click to expand it.
coalgcompare.ml
+
14
−
10
View file @
ad63163e
...
@@ -204,16 +204,20 @@ let doTestK (tboxsizes:int list) (szlist:int list) : testresults =
...
@@ -204,16 +204,20 @@ let doTestK (tboxsizes:int list) (szlist:int list) : testresults =
lPPP A list of pairs (p->p->p, n), e.g. (.+., 1).
lPPP A list of pairs (p->p->p, n), e.g. (.+., 1).
*)
*)
let
timeout
=
!
ptimeout
in
(* 5 minutes *)
let
timeout
=
!
ptimeout
in
(* 5 minutes *)
let
lF
=
List
.
map
(
fun
p
->
(
C
.
AP
(
"p"
^
(
string_of_int
p
))
,
1
))
(
1
--
3
)
in
let
lF
=
List
.
map
(
fun
p
->
C
.
AP
(
"p"
^
(
string_of_int
p
)))
(
1
--
3
)
in
let
lFF
=
[(
C
.
const_not
,
1
)]
in
let
lF
=
List
.
append
lF
(
List
.
map
(
C
.
const_not
)
lF
)
in
let
lFFF
=
[(
C
.
const_and
,
1
)]
in
(* Warning: This forbids disjunctions! *)
let
lF
=
C
.
TRUE
::
C
.
FALSE
::
lF
in
let
lPFF
=
[(
C
.
const_ex
,
1
);
(
C
.
const_ax
,
1
)]
in
let
lF
=
List
.
map
(
fun
v
->
(
v
,
1
))
lF
in
(* role names *)
let
roles
:
string
list
=
List
.
map
(
fun
p
->
"R"
^
(
string_of_int
p
))
(
1
--
3
)
in
let
lP
:
(
string
*
int
)
list
=
List
.
map
(
fun
p
->
(
"R"
^
(
string_of_int
p
)
,
1
))
(
1
--
3
)
in
let
exs
:
(
C
.
formula
->
C
.
formula
)
list
=
List
.
map
C
.
const_ex
roles
in
let
lPP
:
((
string
->
string
)
*
int
)
list
=
[]
in
let
axs
:
(
C
.
formula
->
C
.
formula
)
list
=
List
.
map
C
.
const_ax
roles
in
let
lFP
:
((
C
.
formula
->
string
)
*
int
)
list
=
[]
in
let
lFF
=
List
.
map
(
fun
v
->
(
v
,
1
))
(
List
.
append
exs
axs
)
in
let
lPPP
=
[]
in
let
lFFF
:
(
C
.
formula
->
C
.
formula
->
C
.
formula
)
list
=
List
.
append
let
(
genF
,_
)
=
G
.
mk_generator
lF
lFF
lFFF
lPFF
lP
lPP
lFP
lPPP
in
(
List
.
map
(
fun
x
y
z
->
x
(
C
.
const_and
y
z
))
exs
)
(
List
.
map
(
fun
x
y
z
->
x
(
C
.
const_or
y
z
))
axs
)
in
let
lFFF
=
List
.
map
(
fun
v
->
(
v
,
1
))
lFFF
in
let
(
genF
,_
)
=
G
.
mk_generator
lF
lFF
lFFF
[]
[]
[]
[]
[]
in
let
reasonerNames
=
List
.
map
(
fun
(
_
,
s
)
->
s
)
solvs
in
let
reasonerNames
=
List
.
map
(
fun
(
_
,
s
)
->
s
)
solvs
in
let
s1
=
0
in
(* probably the correct formula... *)
let
s1
=
0
in
(* probably the correct formula... *)
let
formulas
=
List
.
map
(
fun
(
sz
,
cnt
)
->
let
formulas
=
List
.
map
(
fun
(
sz
,
cnt
)
->
...
...
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