Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Kučera Petr RNDr. Ph.D.
PCCompile
Commits
1119ef8e
Commit
1119ef8e
authored
Aug 04, 2021
by
Kučera Petr RNDr. Ph.D.
Browse files
Fixes in pccheck and pccompile
parent
4efb5e12
Changes
2
Hide whitespace changes
Inline
Side-by-side
bin/pccheck.cpp
View file @
1119ef8e
...
...
@@ -110,12 +110,10 @@ dump_config(const config_t &conf, unsigned level)
SUBool
::
dump_enum_value
(
"
\t
"
,
level
,
"impl_system"
,
conf
.
impl_system
,
SUBool
::
kImplSystemNames
);
SUBool
::
logs
.
TLog
(
level
)
<<
"
\t
goal: "
<<
goal_name
(
conf
)
<<
std
::
endl
;
SUBool
::
logs
.
DumpValue
(
"
\t
"
,
level
,
"amo_encoding"
,
SUBool
::
AmoEncoder
::
kEncodingNames
.
at
(
static_cast
<
unsigned
>
(
conf
.
amo_encoding
)));
SUBool
::
logs
.
DumpValue
(
"
\t
"
,
level
,
"exone_encoding"
,
SUBool
::
ExOneEncoder
::
kEncodingNames
.
at
(
static_cast
<
unsigned
>
(
conf
.
exone_encoding
)));
SUBool
::
AmoEncoder
::
kKindAnnotation
.
DumpValue
(
"
\t
"
,
level
,
"amo_encoding"
,
conf
.
amo_encoding
);
SUBool
::
ExOneEncoder
::
kKindAnnotation
.
DumpValue
(
"
\t
"
,
level
,
"exone_encoding"
,
conf
.
exone_encoding
);
SUBool
::
dump_enum_value
(
"
\t
"
,
level
,
"solver_type"
,
conf
.
solver_type
,
SUBool
::
kSolverTypeNames
);
SUBool
::
logs
.
TLog
(
level
)
<<
"END"
<<
std
::
endl
;
...
...
@@ -330,16 +328,14 @@ parse_arguments(int argc, char *argv[], config_t &conf)
"repr = use the representation, "
"seq = use the sequential encoding."
,
cxxopts
::
value
<
std
::
string
>
(
amo_encoding
)
->
default_value
(
SUBool
::
AmoEncoder
::
kEncodingNames
[
static_cast
<
unsigned
>
(
conf
.
amo_encoding
)]))(
"exactly-one"
,
->
default_value
(
SUBool
::
AmoEncoder
::
kKindAnnotation
.
Name
(
conf
.
amo_encoding
)))(
"exactly-one"
,
"Which encoding to use for the exactly-one constraint. "
"repr = use the representation, "
"split = use the splitting encoding."
,
cxxopts
::
value
<
std
::
string
>
(
exone_encoding
)
->
default_value
(
SUBool
::
ExOneEncoder
::
kEncodingNames
[
static_cast
<
unsigned
>
(
conf
.
exone_encoding
)]))(
"positional"
,
->
default_value
(
SUBool
::
ExOneEncoder
::
kKindAnnotation
.
Name
(
conf
.
exone_encoding
)))(
"positional"
,
"Positional arguments: these are the arguments that are entered "
"without an option"
,
cxxopts
::
value
<
std
::
vector
<
std
::
string
>>
());
...
...
@@ -374,10 +370,10 @@ parse_arguments(int argc, char *argv[], config_t &conf)
SUBool
::
AbsEncoder
::
ParseUPOneProve
(
up_one_prove
);
conf
.
up_empower
=
SUBool
::
enum_of_int
<
SUBool
::
PCEncoder
::
UP_EMPOWER
>
(
up_empower
);
conf
.
amo_encoding
=
SUBool
::
enum_of_name
<
SUBool
::
AmoEncoder
::
KIND
>
(
amo_encoding
,
SUBool
::
AmoEncoder
::
k
EncodingNames
);
conf
.
exone_encoding
=
SUBool
::
enum_of_name
<
SUBool
::
ExOneEncoder
::
KIND
>
(
exone_encoding
,
SUBool
::
ExOneEncoder
::
k
E
ncoding
Names
);
conf
.
amo_encoding
=
SUBool
::
AmoEncoder
::
k
KindAnnotation
.
Parse
(
amo_encoding
);
conf
.
exone_encoding
=
SUBool
::
ExOneEncoder
::
k
KindAnnotation
.
Parse
(
exone_e
ncoding
);
conf
.
impl_system
=
SUBool
::
enum_of_name
<
SUBool
::
LIT_IMPL_SYSTEM
>
(
impl_system
,
SUBool
::
kImplSystemNames
);
if
(
SUBool
::
AbsEncoder
::
AbsConfig
::
OneProveRequiresImplSystem
(
...
...
bin/pccompile.cpp
View file @
1119ef8e
...
...
@@ -180,12 +180,10 @@ dump_config(const config_t &conf, unsigned level)
<<
"
\t
goal: "
<<
(
conf
.
goal
==
GOAL
::
PC
?
"PC"
:
"UC"
)
<<
std
::
endl
;
SUBool
::
logs
.
TLog
(
level
)
<<
"
\t
enc_conf:"
<<
std
::
endl
;
conf
.
comp_base_config
.
enc_conf
.
Dump
(
"
\t\t
"
,
level
);
SUBool
::
logs
.
DumpValue
(
"
\t
"
,
level
,
"amo_encoding"
,
SUBool
::
AmoEncoder
::
kEncodingNames
.
at
(
static_cast
<
unsigned
>
(
conf
.
amo_encoding
)));
SUBool
::
logs
.
DumpValue
(
"
\t
"
,
level
,
"exone_encoding"
,
SUBool
::
ExOneEncoder
::
kEncodingNames
.
at
(
static_cast
<
unsigned
>
(
conf
.
exone_encoding
)));
SUBool
::
AmoEncoder
::
kKindAnnotation
.
DumpValue
(
"
\t
"
,
level
,
"amo_encoding"
,
conf
.
amo_encoding
);
SUBool
::
ExOneEncoder
::
kKindAnnotation
.
DumpValue
(
"
\t
"
,
level
,
"exone_encoding"
,
conf
.
exone_encoding
);
SUBool
::
logs
.
TLog
(
level
)
<<
"END"
<<
std
::
endl
;
}
...
...
@@ -513,16 +511,14 @@ parse_arguments(int argc, char *argv[], config_t &conf)
"repr = use the representation, "
"seq = use the sequential encoding."
,
cxxopts
::
value
<
std
::
string
>
(
amo_encoding
)
->
default_value
(
SUBool
::
AmoEncoder
::
kEncodingNames
[
static_cast
<
unsigned
>
(
conf
.
amo_encoding
)]))(
"exactly-one"
,
->
default_value
(
SUBool
::
AmoEncoder
::
kKindAnnotation
.
Name
(
conf
.
amo_encoding
)))(
"exactly-one"
,
"Which encoding to use for the exactly-one constraint. "
"repr = use the representation, "
"split = use the splitting encoding."
,
cxxopts
::
value
<
std
::
string
>
(
exone_encoding
)
->
default_value
(
SUBool
::
ExOneEncoder
::
kEncodingNames
[
static_cast
<
unsigned
>
(
conf
.
exone_encoding
)]));
->
default_value
(
SUBool
::
ExOneEncoder
::
kKindAnnotation
.
Name
(
conf
.
exone_encoding
)));
options
.
parse_positional
({
"input"
,
"output"
,
"positional"
});
auto
result
=
options
.
parse
(
argc
,
argv
);
if
(
result
.
count
(
"help"
))
...
...
@@ -572,10 +568,10 @@ parse_arguments(int argc, char *argv[], config_t &conf)
SUBool
::
enum_of_name
<
SUBool
::
PCLearnComp
::
INITIAL_NEGATIVES
>
(
initial_negatives
,
SUBool
::
PCLearnComp
::
cInitialNegativesNames
);
conf
.
amo_encoding
=
SUBool
::
enum_of_name
<
SUBool
::
AmoEncoder
::
KIND
>
(
amo_encoding
,
SUBool
::
AmoEncoder
::
k
EncodingNames
);
conf
.
exone_encoding
=
SUBool
::
enum_of_name
<
SUBool
::
ExOneEncoder
::
KIND
>
(
exone_encoding
,
SUBool
::
ExOneEncoder
::
k
E
ncoding
Names
);
conf
.
amo_encoding
=
SUBool
::
AmoEncoder
::
k
KindAnnotation
.
Parse
(
amo_encoding
);
conf
.
exone_encoding
=
SUBool
::
ExOneEncoder
::
k
KindAnnotation
.
Parse
(
exone_e
ncoding
);
conf
.
comp_base_config
.
minimize_method
=
SUBool
::
enum_of_name
<
SUBool
::
MINIMIZE_METHOD
>
(
minimize_method
,
SUBool
::
kMinimizeMethodNames
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment