Skip to content

Engine: Meta#23

Open
shilangyu wants to merge 29 commits intomainfrom
mw/meta-engine
Open

Engine: Meta#23
shilangyu wants to merge 29 commits intomainfrom
mw/meta-engine

Conversation

@shilangyu
Copy link
Collaborator

Introduces a Meta folder with all of the optimizations that sit on top of other engines.

(* the memory limit the search should try to respect *)
(* expressed in a somewhat arbitrary unit, attemps to be the unit of a pointer size *)
(* if not specified, there is no limit *)
memory_limit : option nat;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Having this option nat as a configuration is very restrictive. It says that the only way we decide between using MemoBT or for instance PikeVM is by checking the peak memory usage. Why is this not a function, from regex and string to a choice of engine?
The correctness of the meta engine should not be depend on the heuristics we use to decide which engine to run

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The idea was that a user provided heuristic in my opinion is not very useful. Indeed, the proof would barely change and its trivially true that it is correct (any choice of engine is correct). But since the Meta engine is much less abstract and actually wants to exploit the details of engines, I thought it would be good to essentially hardcode these decision procedures.

I can make it more abstract, and then write a specialization of it with the nat version for example, would you find that useful?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think that's better to have the heuristics abstracted yes, we should be able to change the heuristics without changing anything in the proofs.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I experimented a bit with this abstraction. I feel like abstracting this is very leaky. For example, say we abstract the choice of choosing an anchored and unanchored engine. Then, this choice has to make a decision just based on the regex and input, without knowing what purpose the engine is being ran for. For instance, we might want to run the anchor engine for different purposes. It also gets a bit hairy with being precise about which regexes these heuristics that pick the engine support.

I can attempt more of this tomorrow, but I personally find it hard to do it in a way that is beneficial and well abstracted :/

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.

2 participants