Behaviours: gen_server.
contract_path() = [lasp_vertex()]
id() = binary() | {binary(), type()}
lasp_vertex() = id() | pid()
optimized_map() = dict:dict(process_hash(), {pid(), contract_path(), [#process_metadata{read = function(), transform = function(), write = function()}]})
pid_table() = dict:dict(pid(), process_hash())
process_hash() = non_neg_integer()
process_map() = dict:dict(pid(), {id(), id()})
type() = term()
| add_edges/6 | For all V in Src, create an edge from V to Dst labelled with Pid. |
| add_vertex/1 | |
| add_vertices/1 | |
| export_dot/1 | Write the dot representation of the dag to the given file path. |
| handle_call/3 | |
| in_degree/1 | |
| in_edges/1 | |
| init/1 | Initialize state. |
| is_root/1 | |
| n_edges/0 | |
| n_vertices/0 | |
| out_degree/1 | |
| out_edges/1 | |
| process_map/0 | |
| start_link/0 | |
| to_dot/0 | Return the dot representation as a string. |
| vertices/0 | |
| will_form_cycle/2 | Check if linking the given vertices will form a loop. |
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(V::lasp_vertex()) -> ok
add_vertices(Vs::[lasp_vertex()]) -> ok
export_dot(Path::string()) -> ok | {error, no_data}
Write the dot representation of the dag to the given file path.
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(V) -> any()
in_edges(V) -> any()
init(X1) -> any()
Initialize state.
is_root(V) -> any()
n_edges() -> any()
n_vertices() -> any()
out_degree(V) -> any()
out_edges(V) -> any()
process_map() -> any()
start_link() -> any()
to_dot() -> {ok, string()} | {error, no_data}
Return the dot representation as a string.
vertices() -> any()
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