Skip to content

Adapt to the latest rethfl.#7

Open
KenSakayori wants to merge 6 commits intomasterfrom
rethfl
Open

Adapt to the latest rethfl.#7
KenSakayori wants to merge 6 commits intomasterfrom
rethfl

Conversation

@KenSakayori
Copy link
Member

@KenSakayori KenSakayori commented Aug 13, 2025

It was hard to run muhfl outside the artifact image because muhfl relied on a variant of rethfl that was also packed in the artifact. This PR allows us to use the latest ReTHFL as the backend solver.

At least, I was able to execute the following command without any problem.

rethfl_path=/bin/rethfl \
  ./_build/install/default/bin/muhfl \
    --only-remove-disjunctions --no-temp-files --timeout=300 benchmark/inputs/termination/fibonacci.in

Note that I had to use --only-remove-disjunctions because I don't have PCSat installed, and I'm not sure if the current rethfl works fine with PCSat.

I haven't checked whether there is any regression compared to the artifact. This is hard to test. Anyway, even if there is the fact that the tool is working outside the image is a milestone, and hence, I'm going to merge this.

I haven't changed the README nor the Docker file. I don't know if I'll add those changes to this PR or do them later.

This PR builds on top of #6.

The deleted options are the ones that are not supported by the current rethfl.
Moreover, it doesn't seem to be a good design to support these options.
Now
- stop_if_tractable
- stop_if_intractable
are removed.
Instead there's a boolean flag named
rethfl_remove_disjunction
This extra information was reported by a modified version of rethfl and
we do not need that anymore
Current rethfly does not have the option --tractable-check-only, so we
should not invoke rethfl for this.
Moreover, this functionallity is already provided by the hfl library
The other cases always shows debug context, so to be consistent we
should show it in this case as well
@KenSakayori
Copy link
Member Author

rebased on top of master

)
] else [])
@ (if solve_options.remove_disjunctions || solve_options.only_remove_disjunctions then [
(* try both remove_disjunction and ECHC (i.e. pc sat)*)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo


module type BackendSolver = sig
val run : options -> debug_context -> Hfl.Type.simple_ty Hflz.hes -> bool -> bool -> bool -> bool -> (Status.t * extra_status option) Deferred.t
val run : options -> debug_context -> Hfl.Type.simple_ty Hflz.hes -> bool -> bool -> bool -> Status.t Deferred.t
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be better to add all these options to options

Comment on lines 929 to 931
match ex with
| Some ExStatusIntractable -> (s, {d with solved_by = "pcsat"})
| _ -> (s, d)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should check tractability and if it's intractable, then we should invoke pcsat

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant