Add PRAGMA to allow user control of swap search strategy #914
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds a specialized PRAGMA for controlling the value of the
*addresser-rewiring-search-search-type*
special variable. This value defaults to :a* but two other options are available that have been previous unexposed to end-users.The PRAGMA introduced here has the following syntax:
Where
<SEARCHTYPE>
should be a string that names one of the available algorithms:"A*"
,"GREEDY_QUBIT"
, or"GREEDY_PATH"
.This PR is offered as a partial answer to #913 after discovering through experimentation that the offending program + chip spec discussed there compiled more quickly and with lower resource requirements after manually rebinding the
*addresser-rewiring-swap-search-type*
in the REPL.It should be noted that I did not reproduce the exact crash that @MarquessV encountered, probably due to increased heap size given to SBCL on my machine. Compilation with the default search type of
':A*
did, however, take a very long time to finish.