Liking cljdoc? Tell your friends :D

ablauf.job

An abstract program runtime for ASTs produced by ablauf.job.ast. This exposes two functions for the outside world: make and restart

You are expected to create a program to be ran with the functions available in the ablauf.job.ast namespace. This program is then initialized with the rough equivalent of an instruction pointer and a context.

This namespace makes no guess as to how program instructions are actually performed, instead, for each position of the program, it yields the instructions to carry out. There might be more than one if parallelism is used.

The logical flow is thus:

  • call restart on a program with an empty result list
  • carry out resulting actions
  • call restart on the result of the actions

For an actual full fledged program runner, a runner using manifold as the underlying dispatching engine is provided in ablauf.job.manifold.

An abstract program runtime for ASTs produced by `ablauf.job.ast`.
This exposes two functions for the outside world: `make`
and `restart`

You are expected to create a *program* to be ran with the functions
available in the `ablauf.job.ast` namespace. This program is then
initialized with the rough equivalent of an instruction pointer and
a context.

This namespace makes no guess as to how program instructions are
actually performed, instead, for each position of the program,
it yields the instructions to carry out. There might be more than
one if parallelism is used.

The logical flow is thus:

- call restart on a program with an empty result list
- carry out resulting actions
- call restart on the result of the actions

For an actual full fledged program runner, a runner using
**manifold** as the underlying dispatching engine is provided
in `ablauf.job.manifold`.
raw docstring

ast-zipclj

(ast-zip ast)

Given a well-formed AST (as per ablauf.job.ast), yield a zipper

Given a well-formed AST (as per `ablauf.job.ast`), yield a zipper
sourceraw docstring

augmentclj

(augment context {:ast/keys [augment] :exec/keys [result output] :as node})

When an AST node contains an augment key, process it to augment the resulting context. Augments have a source: a function of the output, a keyword or vector, of keyword pointing to a path in the output. Augments also have a destination a key or key vector of the position in which to augment the context.

When an AST node contains an `augment` key, process it to
augment the resulting context. Augments have a source:
a function of the output, a keyword or vector, of keyword
pointing to a path in the output. Augments also have a destination
a key or key vector of the position in which to augment the context.
sourceraw docstring

augmentable?clj

(augmentable? {:ast/keys [augment] :as node})

Predicate to test for an augmentable node

Predicate to test for an augmentable node
sourceraw docstring

done?clj

(done? job)

Predicate to test for completion of a (sub)job

Predicate to test for completion of a (sub)job
sourceraw docstring

failed?clj

(failed? job)

Predicate to test for failure of a (sub)job

Predicate to test for failure of a (sub)job
sourceraw docstring

index-astclj

(index-ast pos)

Uniquely identifies job nodes, for later merging

Uniquely identifies job nodes, for later merging
sourceraw docstring

makeclj

Creates a job, suitable for restart from a valid AST as produced by functions in ablauf.job.ast

Creates a job, suitable for `restart` from a valid AST as
produced by functions in `ablauf.job.ast`
sourceraw docstring

make-with-contextclj

(make-with-context ast context)

Creates a job, attaching an initial context map, as for make, this creates a tuple suitable for restart

Creates a job, attaching an initial context map, as for `make`,
this creates a tuple suitable for `restart`
sourceraw docstring

merge-dispatchsclj

(merge-dispatchs job nodes)
source

merge-resultsclj

(merge-results job context nodes)

Updates a job given a list of node updates. Node updates either come from an action dispatch return, or from newly found dispatchs

Updates a job given a list of node updates. Node updates
either come from an action dispatch return, or from newly
found dispatchs
sourceraw docstring

pending?clj

(pending? job)

Predicate to test for pending completion of a (sub)job

Predicate to test for pending completion of a (sub)job
sourceraw docstring

restartclj

(restart [job context] results)

Given a job, and node updates for it, figure out the next course of action to take.

Yields an updated job and potential side-effects. The result has the following structure:

[job dispatchs]

This allows using the return of restart as an accumulator for reductions or similar functions.

Given a job, and node updates for it, figure
out the next course of action to take.

Yields an updated job and potential side-effects.
The result has the following structure:

    [job dispatchs]

This allows using the return of `restart` as an accumulator
for `reductions` or similar functions.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close