Remote¶
Using an intrepid-server from python; see Running as a service.
remote ¶
This module runs intrepyd on an intrepid-server, the REST service of intrepyd (https://github.com/formalmethods/intrepid-server): after use_remote(), every Context is a RemoteContext, which has the same methods as a Context, and turns each of them into the equivalent REST call. A script written for intrepyd runs unchanged against the service:
import intrepyd as ip
ip.use_remote('http://127.0.0.1:8000')
ctx = ip.Context() # a context on the service
a = ctx.mk_input('a', ctx.mk_boolean_type())
...
use_local() goes back to local contexts. A RemoteContext can also be made explicitly, with RemoteContext(url), whatever the mode.
The nets of a remote context are Net objects, named after the name the service gives them, which is also the one in ctx.net2name; its types are the names of the types of the REST API ('bool', 'int8', ...). Engines, traces and simulators are objects with the methods of the local ones, and trace values are the same strings.
RemoteContext ¶
A context on an intrepid-server, with the methods of Context
Args: url (str): the service, e.g. 'http://127.0.0.1:8000'; by default the one of use_remote() transport (callable): sends the REST calls instead of HTTP, as transport(method, path, params, body) -> (status, answer)
set_latch_init_next ¶
Sets the initial and next value of a latch
mk_substitute ¶
Replaces the occurrences of oldTerm, that are found in term, with newTerm
mk_portfolio ¶
Creates a portfolio (see intrepyd.portfolio), which the service runs
to_string ¶
Returns the given net as a string, as given from the underlying smt-solver.
RemoteError ¶
Bases: Exception
An error answered by the service
use_remote ¶
Makes every Context created from now on a RemoteContext on the service at address, e.g. 'http://127.0.0.1:8000' or '127.0.0.1:8000'