File types-0.1.7-doc.patch of Package types
diff -Ndurp types-0.1.7/src/dot_map.erl types-0.1.7-doc/src/dot_map.erl
--- types-0.1.7/src/dot_map.erl 2017-11-20 17:00:56.000000000 +0200
+++ types-0.1.7-doc/src/dot_map.erl 2017-12-12 11:37:16.000000000 +0200
@@ -67,7 +67,7 @@ fetch_keys(DotMap) ->
orddict:fetch_keys(DotMap).
%% @doc Stores a new {Key, DotStore} pair in the DotMap.
-%% If `Key` already in the DotMap, then its value is replaced.
+%% If `Key' already in the DotMap, then its value is replaced.
-spec store(term(), dot_store:dot_store(), dot_map()) -> dot_map().
store(Key, DotStore, DotMap) ->
orddict:store(Key, DotStore, DotMap).
diff -Ndurp types-0.1.7/src/dot_store.erl types-0.1.7-doc/src/dot_store.erl
--- types-0.1.7/src/dot_store.erl 2017-11-20 17:00:56.000000000 +0200
+++ types-0.1.7-doc/src/dot_store.erl 2017-12-12 11:39:34.000000000 +0200
@@ -52,8 +52,8 @@
-type dot_store() :: dot_set() | dot_fun() | dot_map().
-%% @doc Create an empty DotStore.
+%% Create an empty DotStore.
-callback new() -> dot_store().
-%% @doc Check if a DotStore is empty.
+%% Check if a DotStore is empty.
-callback is_empty(dot_store()) -> boolean().
diff -Ndurp types-0.1.7/src/pure_dwflag.erl types-0.1.7-doc/src/pure_dwflag.erl
--- types-0.1.7/src/pure_dwflag.erl 2017-11-20 17:00:56.000000000 +0200
+++ types-0.1.7-doc/src/pure_dwflag.erl 2017-12-12 11:40:29.000000000 +0200
@@ -49,7 +49,7 @@
-type pure_dwflag_op() :: enable | disable.
%% @doc Create a new, empty `pure_dwflag()'
-%% @doc Disable-wins flags start at True state
+%% Disable-wins flags start at True state
-spec new() -> pure_dwflag().
new() ->
{?TYPE, {orddict:new(), true}}.
diff -Ndurp types-0.1.7/src/pure_polog.erl types-0.1.7-doc/src/pure_polog.erl
--- types-0.1.7/src/pure_polog.erl 2017-11-20 17:00:56.000000000 +0200
+++ types-0.1.7-doc/src/pure_polog.erl 2017-12-12 11:41:23.000000000 +0200
@@ -28,17 +28,17 @@
-export([remove_redundant/2]).
-%% @doc Check redundant operations.
+%% Check redundant operations.
-callback redundant({pure_type:id(), type:operation()}, {pure_type:id(), type:operation()}) ->
atom().
-%% @doc Remove redundant operations from the crystal.
+%% Remove redundant operations from the crystal.
-callback remove_redundant_crystal({pure_type:id(), type:operation()}, type:crdt()) -> {boolean(), type:crdt()}.
-%% @doc Remove redundant operations from the POLog.
+%% Remove redundant operations from the POLog.
-callback remove_redundant_polog({pure_type:id(), type:operation()}, type:crdt()) -> {boolean(), type:crdt()}.
-%% @doc Check stable operations and move them from the POLog to the crystal
+%% Check stable operations and move them from the POLog to the crystal
-callback check_stability(pure_type:id(), type:crdt()) -> type:crdt().
%% @doc Remove redundant operations.
diff -Ndurp types-0.1.7/src/state_awset.erl types-0.1.7-doc/src/state_awset.erl
--- types-0.1.7/src/state_awset.erl 2017-11-20 17:00:56.000000000 +0200
+++ types-0.1.7-doc/src/state_awset.erl 2017-12-12 11:43:48.000000000 +0200
@@ -55,7 +55,7 @@
{filter, function()}.
%% @doc Create a new, empty `state_awset()'
-%% DotMap<Elem, DotSet>
+%% DotMap<Elem, DotSet%gt;
-spec new() -> state_awset().
new() ->
{?TYPE, state_causal_type:new(dot_map)}.
@@ -82,7 +82,7 @@ mutate(Op, Actor, {?TYPE, _AWSet}=CRDT)
-spec delta_mutate(state_awset_op(), type:id(), state_awset()) ->
{ok, state_awset()}.
-%% @doc Adds a single element to `state_awset()'.
+%% Adds a single element to `state_awset()'.
delta_mutate({add, Elem}, Actor, {?TYPE, {DotStore, CausalContext}}) ->
NextDot = causal_context:next_dot(Actor, CausalContext),
@@ -97,7 +97,7 @@ delta_mutate({add, Elem}, Actor, {?TYPE,
Delta = {DeltaDotStore, DeltaCausalContext1},
{ok, {?TYPE, Delta}};
-%% @doc Adds a list of elements to `state_awset()'.
+%% Adds a list of elements to `state_awset()'.
delta_mutate({add_all, Elems}, Actor, {?TYPE, _}=AWSet) ->
{_, {?TYPE, DeltaGroup}} = lists:foldl(
fun(Elem, {AWSet0, DeltaGroup0}) ->
@@ -112,7 +112,7 @@ delta_mutate({add_all, Elems}, Actor, {?
{ok, {?TYPE, DeltaGroup}};
-%% @doc Removes a single element in `state_awset()'.
+%% Removes a single element in `state_awset()'.
delta_mutate({rmv, Elem}, _Actor, {?TYPE, {DotStore, _CausalContext}}) ->
CurrentDotSet = dot_map:fetch(Elem, DotStore, dot_set:new()),
DeltaDotStore = dot_map:new(),
@@ -121,7 +121,7 @@ delta_mutate({rmv, Elem}, _Actor, {?TYPE
Delta = {DeltaDotStore, DeltaCausalContext},
{ok, {?TYPE, Delta}};
-%% @doc Removes a list of elements in `state_awset()'.
+%% Removes a list of elements in `state_awset()'.
delta_mutate({rmv_all, Elems}, Actor, {?TYPE, _}=AWSet) ->
{_, {?TYPE, DeltaGroup}} = lists:foldl(
fun(Elem, {AWSet0, DeltaGroup0}) ->
@@ -137,9 +137,9 @@ delta_mutate({rmv_all, Elems}, Actor, {?
),
{ok, {?TYPE, DeltaGroup}};
-%% @doc The first argument is:
-%% - {filter, Pred}
-%% This mutator removes all elements `e' s.t. `not Pred(e)'.
+%% The first argument is:
+%% - {filter, Pred}
+%% This mutator removes all elements `e' s.t. `not Pred(e)'.
delta_mutate({filter, Pred}, Actor, {?TYPE, _}=CRDT) ->
NotPred = fun(E) -> not Pred(E) end,
Elems = sets:filter(NotPred, query(CRDT)),
diff -Ndurp types-0.1.7/src/state_awset_ps.erl types-0.1.7-doc/src/state_awset_ps.erl
--- types-0.1.7/src/state_awset_ps.erl 2017-11-20 17:00:56.000000000 +0200
+++ types-0.1.7-doc/src/state_awset_ps.erl 2017-12-12 11:45:46.000000000 +0200
@@ -63,29 +63,29 @@
-type ps_object_id() :: binary().
-type ps_replica_id() :: term().
-type ps_event_id() :: {ps_object_id(), ps_replica_id()}.
-%% @doc A Event represents a single update for the addition of the set.
+%% A Event represents a single update for the addition of the set.
-type ps_event() :: {ps_event_id(), pos_integer()}.
-%% @doc Generally a Dot contains a single Event, but it could have multiple Events
+%% Generally a Dot contains a single Event, but it could have multiple Events
%% after set-related binary operations (such as intersection()/product()).
%% This type can also be used to represent a set of Events.
-type ps_dot() :: ordsets:ordset(ps_event()).
-%% @doc A set of Dots.
+%% A set of Dots.
-type ps_provenance() :: ordsets:ordset(ps_dot()).
-%% @doc A DataStore for 'Element -> Provenance' pairs.
+%% A DataStore for 'Element -> Provenance' pairs.
-type ps_data_store_elem() :: orddict:orddict(element(), ps_provenance()).
-%% @doc A DataStore for 'Event -> a set of Elements (which contains the Event
+%% A DataStore for 'Event -> a set of Elements (which contains the Event
%% in the Provenance)' pairs.
%% This is for making merge()/is_inflation() faster.
-type ps_data_store_event() :: orddict:orddict(ps_event(),
ordsets:ordset(element())).
-%% @doc DataStore section.
+%% DataStore section.
-type ps_data_store() :: {ps_data_store_elem(), ps_data_store_event()}.
-%% @doc FilteredOutEvents section.
+%% FilteredOutEvents section.
%% When elements are filtered-out by operations, every events in the provenance
%% will be moved to this section (filtered-out elements of the filter() or
%% uncommon elements of the intersection()).
-type ps_filtered_out_events() :: ps_dot().
-%% @doc AllEvents section.
+%% AllEvents section.
%% This section stores the causal context of the set.
-type ps_all_events() :: ps_dot() %% for delta state
| {vclock, [ps_event()]}. %% for full state
diff -Ndurp types-0.1.7/src/state_bcounter.erl types-0.1.7-doc/src/state_bcounter.erl
--- types-0.1.7/src/state_bcounter.erl 2017-11-20 17:00:56.000000000 +0200
+++ types-0.1.7-doc/src/state_bcounter.erl 2017-12-12 11:47:21.000000000 +0200
@@ -191,9 +191,9 @@ is_inflation({?TYPE, {PNCounter1, GMap1}
%% In pairs we have strict inflations if we have component wise
%% inflations and at least one strict inflation in the composition.
%%
-%% @reference Carlos Baquero, Paulo Sérgio Almeida, Alcino Cunha and Carla Ferreira
-%% Composition of State-based CRDTs (2015)
-%% [http://haslab.uminho.pt/cbm/files/crdtcompositionreport.pdf]
+%% Carlos Baquero, Paulo Sérgio Almeida, Alcino Cunha and Carla Ferreira
+%% Composition of State-based CRDTs (2015)
+%% [http://haslab.uminho.pt/cbm/files/crdtcompositionreport.pdf]
%%
-spec is_strict_inflation(state_bcounter(), state_bcounter()) -> boolean().
is_strict_inflation({?TYPE, {PNCounter1, GMap1}}, {?TYPE, {PNCounter2, GMap2}}) ->
diff -Ndurp types-0.1.7/src/state_dwflag.erl types-0.1.7-doc/src/state_dwflag.erl
--- types-0.1.7/src/state_dwflag.erl 2017-11-20 17:00:56.000000000 +0200
+++ types-0.1.7-doc/src/state_dwflag.erl 2017-12-12 11:47:40.000000000 +0200
@@ -79,7 +79,7 @@ mutate(Op, Actor, {?TYPE, _Flag}=CRDT) -
-spec delta_mutate(state_dwflag_op(), type:id(), state_dwflag()) ->
{ok, state_dwflag()}.
-%% @doc Enables `state_dwflag()'.
+%% Enables `state_dwflag()'.
delta_mutate(enable, _Actor, {?TYPE, {DotStore, _CausalContext}}) ->
DeltaDotStore = dot_set:new(),
DeltaCausalContext = causal_context:from_dot_set(DotStore),
@@ -87,7 +87,7 @@ delta_mutate(enable, _Actor, {?TYPE, {Do
Delta = {DeltaDotStore, DeltaCausalContext},
{ok, {?TYPE, Delta}};
-%% @doc Disables `state_dwflag()'.
+%% Disables `state_dwflag()'.
delta_mutate(disable, Actor, {?TYPE, {DotStore, CausalContext}}) ->
NextDot = causal_context:next_dot(Actor, CausalContext),
diff -Ndurp types-0.1.7/src/state_ewflag.erl types-0.1.7-doc/src/state_ewflag.erl
--- types-0.1.7/src/state_ewflag.erl 2017-11-20 17:00:56.000000000 +0200
+++ types-0.1.7-doc/src/state_ewflag.erl 2017-12-12 11:47:53.000000000 +0200
@@ -75,7 +75,7 @@ mutate(Op, Actor, {?TYPE, _Flag}=CRDT) -
-spec delta_mutate(state_ewflag_op(), type:id(), state_ewflag()) ->
{ok, state_ewflag()}.
-%% @doc Enables `state_ewflag()'.
+%% Enables `state_ewflag()'.
delta_mutate(enable, Actor, {?TYPE, {DotStore, CausalContext}}) ->
NextDot = causal_context:next_dot(Actor, CausalContext),
@@ -87,7 +87,7 @@ delta_mutate(enable, Actor, {?TYPE, {Dot
Delta = {DeltaDotStore, DeltaCausalContext},
{ok, {?TYPE, Delta}};
-%% @doc Disables `state_ewflag()'.
+%% Disables `state_ewflag()'.
delta_mutate(disable, _Actor, {?TYPE, {DotStore, _CausalContext}}) ->
DeltaDotStore = dot_set:new(),
DeltaCausalContext = causal_context:from_dot_set(DotStore),
diff -Ndurp types-0.1.7/src/state_gmap.erl types-0.1.7-doc/src/state_gmap.erl
--- types-0.1.7/src/state_gmap.erl 2017-11-20 17:00:56.000000000 +0200
+++ types-0.1.7-doc/src/state_gmap.erl 2017-12-12 11:48:11.000000000 +0200
@@ -75,7 +75,7 @@ mutate(Op, Actor, {?TYPE, _}=CRDT) ->
%% @doc Delta-mutate a `state_gmap()'.
%% The first argument can only be a triple where the first
-%% component `apply`, the second is a key, and the third is the
+%% component `apply', the second is a key, and the third is the
%% operation to be performed on the correspondent value of that
%% key.
-spec delta_mutate(state_gmap_op(), type:id(), state_gmap()) ->
diff -Ndurp types-0.1.7/src/state_mvmap.erl types-0.1.7-doc/src/state_mvmap.erl
--- types-0.1.7/src/state_mvmap.erl 2017-11-20 17:00:56.000000000 +0200
+++ types-0.1.7-doc/src/state_mvmap.erl 2017-12-12 11:48:45.000000000 +0200
@@ -17,9 +17,9 @@
%%
%% -------------------------------------------------------------------
-%% @doc Multi-Value Map CRDT.
-%% MVMap = AWMap<MVRegister<V>>
-%% = DotMap<K, DotFun<V>>
+%% Multi-Value Map CRDT.
+%% MVMap = AWMap<MVRegister<V>>
+%% = DotMap<K, DotFun<V>>
-module(state_mvmap).
-author("Vitor Enes Duarte <vitorenesduarte@gmail.com>").
diff -Ndurp types-0.1.7/src/state_mvregister.erl types-0.1.7-doc/src/state_mvregister.erl
--- types-0.1.7/src/state_mvregister.erl 2017-11-20 17:00:56.000000000 +0200
+++ types-0.1.7-doc/src/state_mvregister.erl 2017-12-12 11:49:14.000000000 +0200
@@ -81,7 +81,7 @@ mutate(Op, Actor, {?TYPE, _Register}=CRD
-spec delta_mutate(state_mvregister_op(), type:id(),
state_mvregister()) -> {ok, state_mvregister()}.
-%% @doc Sets `state_mvregister()' value.
+%% Sets `state_mvregister()' value.
delta_mutate({set, _Timestamp, Value}, Actor,
{?TYPE, {DotStore, CausalContext}}) ->
NextDot = causal_context:next_dot(Actor, CausalContext),
diff -Ndurp types-0.1.7/src/state_pair.erl types-0.1.7-doc/src/state_pair.erl
--- types-0.1.7/src/state_pair.erl 2017-11-20 17:00:56.000000000 +0200
+++ types-0.1.7-doc/src/state_pair.erl 2017-12-12 11:49:50.000000000 +0200
@@ -143,9 +143,9 @@ is_inflation({?TYPE, {{FstType, _}=Fst1,
%% In pairs we have strict inflations if we have component wise
%% inflations and at least one strict inflation in the composition.
%%
-%% @reference Carlos Baquero, Paulo Sérgio Almeida, Alcino Cunha and Carla Ferreira
-%% Composition of State-based CRDTs (2015)
-%% [http://haslab.uminho.pt/cbm/files/crdtcompositionreport.pdf]
+%% Carlos Baquero, Paulo Sérgio Almeida, Alcino Cunha and Carla Ferreira
+%% Composition of State-based CRDTs (2015)
+%% [http://haslab.uminho.pt/cbm/files/crdtcompositionreport.pdf]
%%
-spec is_strict_inflation(state_pair(), state_pair()) -> boolean().
is_strict_inflation({?TYPE, {{FstType, _}=Fst1, {SndType, _}=Snd1}},