Module lasp_dependence_dag

Behaviours: gen_server.

Data Types

contract_path()

contract_path() = [lasp_vertex()]

id()

id() = binary() | {binary(), type()}

lasp_vertex()

lasp_vertex() = id() | pid()

optimized_map()

optimized_map() = dict:dict(process_hash(), {pid(), contract_path(), [#process_metadata{read = function(), transform = function(), write = function()}]})

pid_table()

pid_table() = dict:dict(pid(), process_hash())

process_hash()

process_hash() = non_neg_integer()

process_map()

process_map() = dict:dict(pid(), {id(), id()})

type()

type() = term()

Function Index

add_edges/6For all V in Src, create an edge from V to Dst labelled with Pid.
add_vertex/1
add_vertices/1
export_dot/1Write the dot representation of the dag to the given file path.
handle_call/3
in_degree/1
in_edges/1
init/1Initialize state.
is_root/1
n_edges/0
n_vertices/0
out_degree/1
out_edges/1
process_map/0
start_link/0
to_dot/0Return the dot representation as a string.
vertices/0
will_form_cycle/2Check if linking the given vertices will form a loop.

Function Details

add_edges/6

add_edges(Src::[lasp_vertex()], Dst::lasp_vertex(), Pid::pid(), ReadFuns::[{lasp_vertex(), function()}], TransFun::function(), WriteFun::{lasp_vertex(), function()}) -> ok | error

For all V in Src, create an edge from V to Dst labelled with Pid.

Returns error if it couldn't create some of the edges, either because it formed a loop, or because some of the vertices weren't in the graph.

add_vertex/1

add_vertex(V::lasp_vertex()) -> ok

add_vertices/1

add_vertices(Vs::[lasp_vertex()]) -> ok

export_dot/1

export_dot(Path::string()) -> ok | {error, no_data}

Write the dot representation of the dag to the given file path.

handle_call/3

handle_call(X1::term(), From::{pid(), term()}, State::#state{dag = digraph:graph(), process_map = process_map(), optimized_map = optimized_map(), pid_table = pid_table(), contraction_timer = timer:tref()}) -> {reply, term(), #state{dag = digraph:graph(), process_map = process_map(), optimized_map = optimized_map(), pid_table = pid_table(), contraction_timer = timer:tref()}}

in_degree/1

in_degree(V) -> any()

in_edges/1

in_edges(V) -> any()

init/1

init(X1) -> any()

Initialize state.

is_root/1

is_root(V) -> any()

n_edges/0

n_edges() -> any()

n_vertices/0

n_vertices() -> any()

out_degree/1

out_degree(V) -> any()

out_edges/1

out_edges(V) -> any()

process_map/0

process_map() -> any()

start_link/0

start_link() -> any()

to_dot/0

to_dot() -> {ok, string()} | {error, no_data}

Return the dot representation as a string.

vertices/0

vertices() -> any()

will_form_cycle/2

will_form_cycle(Src::[lasp_vertex()], Dst::lasp_vertex()) -> boolean()

Check if linking the given vertices will form a loop.

The user may accidentally form a loop while writing a dataflow computation.

Imagine this example:

A = declare(), B = declare(), map(A, \x.x+1, B) bind_to(A, B

As soon as A is given a value, it will start to grow in size, as its own internal value is incremented forever.


Generated by EDoc