ADPfusionSet-0.0.0.2: Dynamic programming for Set data structures.

Safe HaskellNone
LanguageHaskell2010

ADP.Fusion.SynVar.Indices.Set1

Contents

Synopsis

Documentation

Orphan instances

IndexHdr s x0 i0 us (BS1 Last O) cs c is (EdgeBoundary C) => AddIndexDense s ((:.) us (BS1 Last O)) ((:.) cs c) ((:.) is (EdgeBoundary C)) Source #

TODO 18.2.2017 added

Methods

addIndexDenseGo :: Monad m => (cs :. c) -> Context (is :. EdgeBoundary C) -> (us :. BS1 Last O) -> (us :. BS1 Last O) -> (is :. EdgeBoundary C) -> (is :. EdgeBoundary C) -> Stream m (SvState s a Z Z) -> Stream m (SvState s a (us :. BS1 Last O) (is :. EdgeBoundary C)) #

IndexHdr s x0 i0 us (BS1 Last I) cs c is (EdgeBoundary C) => AddIndexDense s ((:.) us (BS1 Last I)) ((:.) cs c) ((:.) is (EdgeBoundary C)) Source #

TODO 18.2.2017 added

Methods

addIndexDenseGo :: Monad m => (cs :. c) -> Context (is :. EdgeBoundary C) -> (us :. BS1 Last I) -> (us :. BS1 Last I) -> (is :. EdgeBoundary C) -> (is :. EdgeBoundary C) -> Stream m (SvState s a Z Z) -> Stream m (SvState s a (us :. BS1 Last I) (is :. EdgeBoundary C)) #

IndexHdr s x0 i0 us (BS1 First O) cs c is (EdgeBoundary C) => AddIndexDense s ((:.) us (BS1 First O)) ((:.) cs c) ((:.) is (EdgeBoundary C)) Source #

TODO 17.2.2017 added

Methods

addIndexDenseGo :: Monad m => (cs :. c) -> Context (is :. EdgeBoundary C) -> (us :. BS1 First O) -> (us :. BS1 First O) -> (is :. EdgeBoundary C) -> (is :. EdgeBoundary C) -> Stream m (SvState s a Z Z) -> Stream m (SvState s a (us :. BS1 First O) (is :. EdgeBoundary C)) #

IndexHdr s x0 i0 us (BS1 First I) cs c is (EdgeBoundary C) => AddIndexDense s ((:.) us (BS1 First I)) ((:.) cs c) ((:.) is (EdgeBoundary C)) Source #

TODO 17.2.2017 added

Methods

addIndexDenseGo :: Monad m => (cs :. c) -> Context (is :. EdgeBoundary C) -> (us :. BS1 First I) -> (us :. BS1 First I) -> (is :. EdgeBoundary C) -> (is :. EdgeBoundary C) -> Stream m (SvState s a Z Z) -> Stream m (SvState s a (us :. BS1 First I) (is :. EdgeBoundary C)) #

IndexHdr s x0 i0 us (BS1 Last I) cs c is (EdgeBoundary I) => AddIndexDense s ((:.) us (BS1 Last I)) ((:.) cs c) ((:.) is (EdgeBoundary I)) Source #

Generate all possible bitsets until fullSet is reached. from is our Last, and to may not be set.

Methods

addIndexDenseGo :: Monad m => (cs :. c) -> Context (is :. EdgeBoundary I) -> (us :. BS1 Last I) -> (us :. BS1 Last I) -> (is :. EdgeBoundary I) -> (is :. EdgeBoundary I) -> Stream m (SvState s a Z Z) -> Stream m (SvState s a (us :. BS1 Last I) (is :. EdgeBoundary I)) #

IndexHdr s x0 i0 us (BS1 First I) cs c is (EdgeBoundary I) => AddIndexDense s ((:.) us (BS1 First I)) ((:.) cs c) ((:.) is (EdgeBoundary I)) Source #

Given indices that index _only_ the current edge First -> Last, we want to go over all possible set combinations.

The to element from an edge boundary will serve as the First element in a rule @X -> Last (from :-> to) First

Methods

addIndexDenseGo :: Monad m => (cs :. c) -> Context (is :. EdgeBoundary I) -> (us :. BS1 First I) -> (us :. BS1 First I) -> (is :. EdgeBoundary I) -> (is :. EdgeBoundary I) -> Stream m (SvState s a Z Z) -> Stream m (SvState s a (us :. BS1 First I) (is :. EdgeBoundary I)) #

IndexHdr s x0 i0 us (BS1 k I) cs c is (Boundary k I) => AddIndexDense s ((:.) us (BS1 k I)) ((:.) cs c) ((:.) is (Boundary k I)) Source #

A single Boundary index allows us to get the optimal results ending on each individual boundary.

Methods

addIndexDenseGo :: Monad m => (cs :. c) -> Context (is :. Boundary k I) -> (us :. BS1 k I) -> (us :. BS1 k I) -> (is :. Boundary k I) -> (is :. Boundary k I) -> Stream m (SvState s a Z Z) -> Stream m (SvState s a (us :. BS1 k I) (is :. Boundary k I)) #

IndexHdr s x0 i0 us (BS1 k I) cs c is (Unit I) => AddIndexDense s ((:.) us (BS1 k I)) ((:.) cs c) ((:.) is (Unit I)) Source #

A Unit index expands to the full set with all possible boundaries tried in order.

Methods

addIndexDenseGo :: Monad m => (cs :. c) -> Context (is :. Unit I) -> (us :. BS1 k I) -> (us :. BS1 k I) -> (is :. Unit I) -> (is :. Unit I) -> Stream m (SvState s a Z Z) -> Stream m (SvState s a (us :. BS1 k I) (is :. Unit I)) #

IndexHdr s x0 i0 us (BS1 k I) cs c is (BS1 k O) => AddIndexDense s ((:.) us (BS1 k I)) ((:.) cs c) ((:.) is (BS1 k O)) Source # 

Methods

addIndexDenseGo :: Monad m => (cs :. c) -> Context (is :. BS1 k O) -> (us :. BS1 k I) -> (us :. BS1 k I) -> (is :. BS1 k O) -> (is :. BS1 k O) -> Stream m (SvState s a Z Z) -> Stream m (SvState s a (us :. BS1 k I) (is :. BS1 k O)) #

IndexHdr s x0 i0 us (BS1 k O) cs c is (BS1 k O) => AddIndexDense s ((:.) us (BS1 k O)) ((:.) cs c) ((:.) is (BS1 k O)) Source #

For the inside case, we try all possible boundaries for Y in X -> Y e. For the outside case we now have: Y -> X e where Y is now extended. (yset,ybnd) -> (yset + α,α) for all α that are not in yset.

TODO 17.2.2017 added

Methods

addIndexDenseGo :: Monad m => (cs :. c) -> Context (is :. BS1 k O) -> (us :. BS1 k O) -> (us :. BS1 k O) -> (is :. BS1 k O) -> (is :. BS1 k O) -> Stream m (SvState s a Z Z) -> Stream m (SvState s a (us :. BS1 k O) (is :. BS1 k O)) #

IndexHdr s x0 i0 us (BS1 k I) cs c is (BS1 k I) => AddIndexDense s ((:.) us (BS1 k I)) ((:.) cs c) ((:.) is (BS1 k I)) Source #

Since there is only one boundary, it doesn't matter if k==First or k==Last. As a result, the "name" of the boundary is kept variable.

Given the outer (set,bnd) system, we try all boundaries α for (set-bnd,α) for the smaller set Y in X -> Y e.

TODO After this case we should only allow S, since we write, in essence, left-linear grammars here.

TODO we should try to statically assure that rb==0 holds always in this case. It should because every other symbol moves to IVariable once the number of of reserved bits is >0.

TODO kind-of hacked and should be written in a better way

Methods

addIndexDenseGo :: Monad m => (cs :. c) -> Context (is :. BS1 k I) -> (us :. BS1 k I) -> (us :. BS1 k I) -> (is :. BS1 k I) -> (is :. BS1 k I) -> Stream m (SvState s a Z Z) -> Stream m (SvState s a (us :. BS1 k I) (is :. BS1 k I)) #