Skip to content

Open sets backend #74

@elefthei

Description

@elefthei

We can take full advantage of the sequential structure of characters, skips and others in Reef and introduce Open sets.

  /// An Open set of ranges is an efficient representation for ranges of characters, integers etc
  /// that might or might not be closed. For example,
  /// { (0,3), (5,6), (8, *) }
  ///
  /// It implements the operations [union, negation, concatenation, unit, annhiliation]
  #[derive(Debug, Clone, Hash, PartialEq, Eq)]
  pub struct OpenRange<C> {
      pub start: C,
      pub end: Option<C>
  }
  
  #[derive(Debug, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]  
  pub struct OpenSet<C>(BTreeSet<OpenRange<C>>);  

Figure out a gadget for those, I think aggregate range proofs are a very good candidate for this. Or maybe argue in this issue why structure doesn't matter and it's all O(logn) in the end.

EDIT: reponening, this is used in section 4.6 of the Zombie paper and indeed shows promise

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions