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
46d4b2bf
Commit
46d4b2bf
authored
11 years ago
by
Thorsten Wißmann
Browse files
Options
Downloads
Patches
Plain Diff
Add prov task
parent
cae4b8d1
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
coalg.ml
+29
-3
29 additions, 3 deletions
coalg.ml
with
29 additions
and
3 deletions
coalg.ml
+
29
−
3
View file @
46d4b2bf
...
@@ -5,6 +5,7 @@
...
@@ -5,6 +5,7 @@
*)
*)
module
CM
=
CoAlgMisc
module
CM
=
CoAlgMisc
module
CF
=
CoAlgFormula
(* The type of formulae that are accepted. *)
(* The type of formulae that are accepted. *)
(*
(*
...
@@ -36,7 +37,7 @@ let _ = Gc.set { (Gc.get()) with Gc.minor_heap_size = 4194304; major_heap_increm
...
@@ -36,7 +37,7 @@ let _ = Gc.set { (Gc.get()) with Gc.minor_heap_size = 4194304; major_heap_increm
let
printUsage
()
=
let
printUsage
()
=
print_endline
"Usage:
\"
alc <task> <functor> [<flags>]
\"
where"
;
print_endline
"Usage:
\"
alc <task> <functor> [<flags>]
\"
where"
;
print_endline
" <task> in { sat print }"
;
print_endline
" <task> in { sat print
prov (is
\
f -> not (sat (not f)))
}"
;
print_endline
" <functor> in { MultiModalK MultiModalKD CoalitionLogic GML"
;
print_endline
" <functor> in { MultiModalK MultiModalKD CoalitionLogic GML"
;
print_endline
" (or: K) (or: KD) (or: CL) }"
;
print_endline
" (or: K) (or: KD) (or: CL) }"
;
print_endline
" <flags> = a list of the following items"
;
print_endline
" <flags> = a list of the following items"
;
...
@@ -79,15 +80,39 @@ let choiceSat () =
...
@@ -79,15 +80,39 @@ let choiceSat () =
while
true
do
while
true
do
let
input
=
read_line
()
in
let
input
=
read_line
()
in
if
not
(
GenAndComp
.
isEmptyString
input
)
then
if
not
(
GenAndComp
.
isEmptyString
input
)
then
let
(
f
,
tbox
)
=
CoAlgFormula
.
importQuery
input
in
let
(
tbox
,
f
)
=
CoAlgFormula
.
importQuery
input
in
incr
counter
;
incr
counter
;
print_string
(
"
\n
Formula "
^
(
string_of_int
!
counter
)
^
": "
);
print_string
(
"
\n
Formula "
^
(
string_of_int
!
counter
)
^
": "
);
flush
stdout
;
flush
stdout
;
printRes
(
CoAlgReasoner
.
isSat
~
verbose
:
verb
sorts
nomTable
f
tbox
)
printRes
(
CoAlgReasoner
.
isSat
~
verbose
:
verb
sorts
nomTable
tbox
f
)
else
()
else
()
done
done
with
End_of_file
->
()
with
End_of_file
->
()
let
choiceProvable
()
=
let
verb
=
!
verbose
in
let
sorted_not
((
s
,
f
)
:
CF
.
sortedFormula
)
:
CF
.
sortedFormula
=
(
s
,
CF
.
NOT
f
)
in
let
sorts
=
[
|
(
parseFunctor
Sys
.
argv
.
(
2
)
,
[
0
])
|
]
in
let
printRes
sat
=
if
not
verb
then
print_endline
(
if
not
sat
then
"provable
\n
"
else
"unprovable
\n
"
)
else
()
in
try
while
true
do
let
input
=
read_line
()
in
if
not
(
GenAndComp
.
isEmptyString
input
)
then
let
(
tbox
,
f
)
=
CoAlgFormula
.
importQuery
input
in
let
fneg
=
sorted_not
f
in
incr
counter
;
print_string
(
"
\n
Formula "
^
(
string_of_int
!
counter
)
^
": "
);
flush
stdout
;
printRes
(
CoAlgReasoner
.
isSat
~
verbose
:
verb
sorts
nomTable
tbox
fneg
)
else
()
done
with
End_of_file
->
()
let
choicePrint
()
=
let
choicePrint
()
=
try
try
while
true
do
while
true
do
...
@@ -130,6 +155,7 @@ let _ =
...
@@ -130,6 +155,7 @@ let _ =
parseFlags
Sys
.
argv
3
;
parseFlags
Sys
.
argv
3
;
match
choice
with
match
choice
with
|
"sat"
->
choiceSat
()
|
"sat"
->
choiceSat
()
|
"prov"
->
choiceProvable
()
|
"print"
->
choicePrint
()
|
"print"
->
choicePrint
()
|
_
->
printUsage
()
|
_
->
printUsage
()
...
...
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