First off, thanks for taking the time to consider contributing. If you have found a bug, please report all the necessary information to reproduce it and describe the issue in detail.
To integrate a new encoding there are a few requirements:
- Create a new file in
encoders
and inherit fromEncoder
inbase.py
. - Overwrite the
__iter__
and__len__
methods to respectively go through the actions and give the maximum bound of the encoded formula - The basic search method in
planner/SMT.py
(theSMTSearch
class) needs the encoder to have theencode(t)
method, actx
attribute to be able to assert the bound and theextract_plan
method. - in
shared/valid_configs.py
you can add the new configuration for the encoding. - in
pypmtcli.py
you can add support for it in the CLI interface. This should at some point be automated from the configurations though ...
Sometimes a new encoding will require a specialised search procedure. Other search strategies might be interesting to explore and beneficial in certain scenarios. To easily integrate a new search method:
- Create a new file in
planner/
and inherit from theplanner/base.py
. - Implement the
search
method, which returns a plan. - In
shared/valid_configs.py
you can add match it with which encodings are valid.