This PR reorganizes the implementations of in-place merge sort:
It renames Pulse.Lib.ArraySwap into Pulse.Lib.Swap.Array (cf. FStarLang/steel#12)
It introduces Pulse.Lib.Swap.Slice to swap the contents of two adjacent regions within a slice
It renames Pulse.Lib.Array.MergeSort into Pulse.Lib.Sort.Merge.Array (cf. #245 )
It introduces Pulse.Lib.Sort.Merge.Slice to sort the contents of a slice using in-place merge sort. (Like the array implementation, it is optimized for memory consumption rather than speed.)
This PR also marks the element type argument of Pulse.Lib.ArrayPtr.ptr and Pulse.Lib.Slice.slice strictly positive. This is needed to use slices in recursive type definitions.
This PR reorganizes the implementations of in-place merge sort:
Pulse.Lib.ArraySwap
intoPulse.Lib.Swap.Array
(cf. FStarLang/steel#12)Pulse.Lib.Swap.Slice
to swap the contents of two adjacent regions within a slicePulse.Lib.Array.MergeSort
intoPulse.Lib.Sort.Merge.Array
(cf. #245 )Pulse.Lib.Sort.Merge.Slice
to sort the contents of a slice using in-place merge sort. (Like the array implementation, it is optimized for memory consumption rather than speed.)