image/svg+xml
pengine_create([])
create(1234, true)
pengine_ask(1234, member(X, [a, b]), [template(X)])
success(1234, [a], true)
pengine_next(1234)
success(1234, [b], false)
pengine_ask(1234, pengine_output(hello))
output(1234, hello)
pengine_pull_response(1234)
success(1234, [pengine_output(hello)], false)
pengine_ask(1234, pengine_input(X), [template(X)])
prompt(1234, '|:')
Client
Server
$ swipl?- member(X, [a, b]).X = a ;X = b.?- write(hello).hellotrue.?- read(X).|: hello.X = hello.?- halt.$
Shell
pengine_respond(1234, hello)
success(1234, [hello], false))
pengine_destroy(1234)
destroy(1234)