Skip to content

Commit

Permalink
undo lifetime experiments
Browse files Browse the repository at this point in the history
  • Loading branch information
maartenflippo committed Dec 17, 2024
1 parent d9db162 commit e04d3db
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ use crate::variables::DomainId;
/// Used during conflict analysis to provide the necessary information.
///
/// All fields are made public for the time being for simplicity. In the future that may change.
pub(crate) struct ConflictAnalysisContext<'a, 'reasons> {
pub(crate) struct ConflictAnalysisContext<'a> {
pub(crate) assignments: &'a mut Assignments,
pub(crate) solver_state: &'a mut CSPSolverState,
pub(crate) reason_store: &'reasons mut ReasonStore,
pub(crate) reason_store: &'a mut ReasonStore,
pub(crate) brancher: &'a mut dyn Brancher,
pub(crate) propagators: &'a mut PropagatorStore,
pub(crate) semantic_minimiser: &'a mut SemanticMinimiser,
Expand All @@ -50,13 +50,13 @@ pub(crate) struct ConflictAnalysisContext<'a, 'reasons> {
pub(crate) unit_nogood_step_ids: &'a HashMap<Predicate, StepId>,
}

impl Debug for ConflictAnalysisContext<'_, '_> {
impl Debug for ConflictAnalysisContext<'_> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.debug_struct(std::any::type_name::<Self>()).finish()
}
}

impl<'reasons> ConflictAnalysisContext<'_, 'reasons> {
impl<'a> ConflictAnalysisContext<'a> {
/// Returns the last decision which was made by the solver.
pub(crate) fn find_last_decision(&mut self) -> Option<Predicate> {
self.assignments.find_last_decision()
Expand Down Expand Up @@ -133,11 +133,11 @@ impl<'reasons> ConflictAnalysisContext<'_, 'reasons> {
predicate: Predicate,
assignments: &Assignments,
current_nogood: CurrentNogood<'_>,
reason_store: &'reasons mut ReasonStore,
propagators: &'reasons mut PropagatorStore,
reason_store: &'a mut ReasonStore,
propagators: &'a mut PropagatorStore,
proof_log: &mut ProofLog,
unit_nogood_step_ids: &HashMap<Predicate, StepId>,
) -> &'reasons [Predicate] {
) -> &'a [Predicate] {
// TODO: this function could be put into the reason store

// Note that this function can only be called with propagations, and never decision
Expand Down

0 comments on commit e04d3db

Please sign in to comment.