Skip to content

Commit

Permalink
Check that derived variables are binary.
Browse files Browse the repository at this point in the history
  • Loading branch information
tanjaschindler committed Dec 18, 2024
1 parent c60a402 commit cba9cd5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/search/tasks/root_task.cc
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,11 @@ ExplicitVariable TaskParser::read_variable(int index) {
"Domain size should be at least 1, but is "
+ std::to_string(var.domain_size) + ".");
}
if ((var.axiom_layer >= 0) && var.domain_size != 2) {
context.error(
"Derived variables must be binary, but domain size is "
+ to_string(var.domain_size) + ".");
}
var.fact_names.resize(var.domain_size);
for (int i = 0; i < var.domain_size; ++i) {
utils::TraceBlock block(context, "fact " + to_string(i));
Expand Down

0 comments on commit cba9cd5

Please sign in to comment.