pitia_adapter behaviour (pitia v0.1.0)

View Source

Summary

Types

state/0

-type state() :: #{binary() => term()}.

Callbacks

call/3

-callback call(term(), binary(), [term()]) -> term().

observe/1

-callback observe(term()) -> state().

postcondition/5

(optional)
-callback postcondition(state(), binary(), [term()], term(), state()) -> boolean().
Optional only for sequential execution; parallel checking requires a pure contract.

start/1

-callback start(map()) -> {ok, term()}.

stop/1

-callback stop(term()) -> term().

Functions

call(Adapter, Handle, Name, Args)

observe(Adapter, Handle)

postcondition(Adapter, Before, Name, Args, Result, After)

start(Adapter, Context)

stop(Adapter, Handle)