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

Add an interface for binnable interval trees #821

Merged
merged 3 commits into from
Apr 10, 2018

Conversation

DIJamner
Copy link
Contributor

Add an interface and Make_binable functor for binable interval trees. This allows interval trees to be serialized and used as universal values (e.g. in term attributes).

Copy link
Member

@ivg ivg left a comment

Choose a reason for hiding this comment

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

looks great 👍

But can you fix comments by removing references to the Value module as one has nothing to do with the new functionality.

Though I understand, that you need this because you want to wrap intervals as values. However, the usage of the new interface is not limited with this use case.


type +'a t = 'a node option [@@deriving sexp, compare, bin_io]

let height = Base.height
Copy link
Member

Choose a reason for hiding this comment

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

it's ok to just include the Base module, though I'm fine with an explicit option.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I forgot that I could restrict the include to get around overlapping the written-out types. I've done that now since I agree that including Make is the cleanest way, given that they are in the same file.

lib/bap/bap.mli Outdated

An extension of the Interval signature that supports the
necessary extensions to be serializable as a
{{!Value}universal value}.
Copy link
Member

Choose a reason for hiding this comment

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

Well, in fact it has nothing to do with Values, so the comment is rather confusing. Can you fix it to "An extension of the Interval signature with the Binable interface"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That makes sense. I've updated the comments to be clearer.

lib/bap/bap.mli Outdated

(** [Make_binable(Interval)] create an abstract interval tree data type
that uses abstract [Interval] and can be serialized as a
{{!Value}universal value}.
Copy link
Member

Choose a reason for hiding this comment

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

the same, no values are involved.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed as well.

@ivg ivg merged commit 472d86a into BinaryAnalysisPlatform:master Apr 10, 2018
@ivg
Copy link
Member

ivg commented Apr 10, 2018

thanks!

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