Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow specifying the oracle to use in an oracle ranking #406

Merged
merged 6 commits into from Apr 26, 2021

Conversation

kevinmorio
Copy link
Contributor

Oracle rankings in a top-level heuristic specification or in lemma
attributes now allow the specification of independent oracles:

heuristic: o "/path/to/oracle"`

or

lemma example [heuristic=o "/path/to/oracle"]:
  ...

This PR indirectly fixes #372 since the heuristic can now be completely specified in the spthy file.

Oracle rankings in a top-level heuristic specification or in lemma
attributes now allow the specification of independent oracles:

heuristic: o "/path/to/oracle"

or

lemma example [heuristic=o "/path/to/oracle"]:
  ...
@rsasse
Copy link
Member

rsasse commented Apr 2, 2021

Cool stuff! Just to make sure, does this also work for the heuristic "O" (using smart as base) or only for "o" (using consecutive)? It should be possible for both. Looking at the code it seems to do both. Great! Probably best to have a test set up for both cases though.

@kevinmorio
Copy link
Contributor Author

Yes, it works for both the "o" and "O" heuristic. I added a minimal example for this feature. Should this also be included in the regression tests?

We might also consider changing the starting directory for relative paths given in an oracle ranking. Currently, they are relative to the current working directory which means that we have to cd into the directory containing the model file.
Instead, the paths could be relative to the directory of the model file.

@rkunnema
Copy link
Member

rkunnema commented Apr 9, 2021

Hi! We talked about this change and @kevinmorio wants to try to compute the path relative to the curred WD from the path relative to the spthy file and the spthy's location relative to the current WD.

@rsasse
Copy link
Member

rsasse commented Apr 9, 2021

This sounds good in theory, and great if it works in practice across different OSes used. Please check at least on Linux+macos. Not necessarily on Windows, even though that would be good in case we support that again.

Thanks both for your work on this! :-)

@kevinmorio
Copy link
Contributor Author

kevinmorio commented Apr 22, 2021

Oracles in model files are now relative to the directory containing the model file. I verified that it works as intended on Linux and macOS, but I see no reason why it shouldn't also work on Windows, since Haskell's System.FilePath library supports all three. (Since there is no version of Maude for Windows, I cannot test there. WSL would work, but should be similar to Linux.)

As part of this PR, I also revised the precedence handling of heuristics which is now:

  1. Command line
  2. Lemma attribute
  3. Top-level
  4. Default ("s")

This allows specifying heuristics in the model file, but also allows overriding all heuristics using the command line flag.

@deejaydarvin
Copy link

deejaydarvin commented Apr 22, 2021 via email

@rkunnema
Copy link
Member

Looks good to me. Waiting for @kevinmorio to document this, then I'll merge.

kevinmorio added a commit to kevinmorio/manual that referenced this pull request Apr 26, 2021
@rkunnema rkunnema merged commit b4ea499 into tamarin-prover:develop Apr 26, 2021
@kevinmorio kevinmorio deleted the feature-oracle-ranking branch April 26, 2021 14:25
cascremers pushed a commit to cascremers/tamarin-prover that referenced this pull request May 15, 2024
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.

'--oraclename' ignored for heuristic in lemma attribute
4 participants