Skip to content

Commit

Permalink
fix(state-variables): lifting to ST from predicates had an erroneous …
Browse files Browse the repository at this point in the history
…case.

Transformation of negative condition was incorrect.
  • Loading branch information
arbimo committed May 1, 2024
1 parent b29a949 commit 84ff4cc
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -654,7 +654,6 @@ fn lift(pb: &mut Problem, group: &SubstitutionGroup) {
Ok(false) => {
// transform [s,t] (loc r l) == false into
// [s,t] loc r == ?x and ?x != l
let forbidden_value = cond.state_var.args.pop().unwrap();
let var_type = return_type(&cond.state_var.fluent);
let var = pb.context.model.new_optional_sym_var(
var_type,
Expand All @@ -663,7 +662,7 @@ fn lift(pb: &mut Problem, group: &SubstitutionGroup) {
);
created_variables.push(var.into());
cond.value = var.into();
ch.constraints.push(Constraint::neq(var, forbidden_value));
ch.constraints.push(Constraint::neq(var, value));
}
Err(_) => unreachable!("State variable wrongly identified as substitutable"),
}
Expand Down

0 comments on commit 84ff4cc

Please sign in to comment.