-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add In_channel.input_all in Compat * Use Dolmen in the Javascript Worker This PR removes the dependency of the Javascript worker to the legacy frontend in order to remove it completely. In order to avoid code duplication as it was done with the legacy frontend, we reuse the `Solving_loop` module in the worker. This requires some modifications: - Add a new argument to the main function of `Solving_loop` to give different kind of sources instead of reading the file at the path `Options.get_file ()`. The worker used a raw string as input. I reused the type `Dolmen_loop.State.source`. - Add a new argument to the main function of `Solving_loop` to pass the selector hook to the constructor of the environment of the SAT solver. This hook is not used by the worker to select instantiations but just to record them. I have no strong opinion to preserve this feature but I try to keep all the feature of the Javascript worker. - Remove the unused `sat_env` argument of the constructor `init_env` in `Frontend`. This removal is mostly motivated by the fact the semantic of `init_env = Some env` + `selector_inst = Some f` is not clear at all. - Monomophize the `status` type in `Frontend`. This status is only used for printting purposes but we kept the SAT environment in some of its constructors. Unfortunately, the type of the SAT can change at the very beginning of the main function of `Solving_loop`, which means it is not easy to add a new argument for the `hook_status`. This hook is required to print the result of AE in the worker. * Fix input format in the JS example * Simplify mk_files in `Solving_loop` We do not need `In_channel.input_all` too ;)
- Loading branch information
Showing
10 changed files
with
131 additions
and
254 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.