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

Proofs about our commands #85

Open
anshumanmohan opened this issue May 8, 2023 · 1 comment
Open

Proofs about our commands #85

anshumanmohan opened this issue May 8, 2023 · 1 comment
Assignees
Labels
feature New feature, or a meaningful extension to an existing feature

Comments

@anshumanmohan
Copy link
Contributor

anshumanmohan commented May 8, 2023

What if we could prove that Pollen DSL programs preserve the semantics of variation graphs? That is, some but not all odgi commands are "logical no-ops," in the sense that they may split up segments and rename things and stuff, but the set of nucleotide sequences they represent (i.e., odgi flatten would still produce the same flat sequences). Could we somehow prove that these programs are no-ops, so they're free of "bugs"?

Originally posted by @sampsyo in #84 (review)

I love this idea!

I'd love to be able to state and prove, for example:

forall g, 
valid g -> 
exists g', flip g g' /\ valid g' /\ meaning g == meaning g'

where

  1. flip a b is a relation, in this case a function, that says that b is the flipped version of a. i.e, all the good stuff stated here.
  2. meaning x is some beautiful encapsulation of the semantics of a graph x, rising above all the kludge of segment-splits and names.
@anshumanmohan anshumanmohan changed the title relational.v Proofs about our commands May 10, 2023
@anshumanmohan
Copy link
Contributor Author

anshumanmohan commented May 11, 2023

Bit of progress on this, still in slow_odgi for now.

I have done up paths_logically_le. I take a path-forward approach and assert, in the relevant commands (just chop and inject for now) that the graph we pass is "less than or equal to" the graph we get back. That is, every path that I used to have in the input graph still exists, with the same name and sequence, in the new graph.

This issue talks about logical equality, but I've come up with this logical <= approach because I think there's some value there. We can state == using <= and antisymmetry.

@anshumanmohan anshumanmohan self-assigned this Jun 9, 2023
@anshumanmohan anshumanmohan added the feature New feature, or a meaningful extension to an existing feature label Jun 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature, or a meaningful extension to an existing feature
Projects
None yet
Development

No branches or pull requests

1 participant