DefaultApi.md

imandra_http_api_client.DefaultApi

All URIs are relative to http://localhost:3000

Method HTTP request Description
decompose POST /decompose Region decomposition of a function
eval POST /eval/by-src Evaluate a string of source code
get_history GET /history Get a text version of the Logic History
get_status GET /status Get server status
instance_by_name POST /instance/by-name Search for an instance from a property (boolean function) by name. (The name should exist from a previous call to `/eval`). This is the more 'primitive' call - calls to //by-src are for convenience and use Imandra_util.gensym to assign a name to your `src` block first, and then act by_name, so give this endpoint a try if you're having issues with //by-src.
instance_by_src POST /instance/by-src Obtain an instance from a property (boolean function) from lambda expression source
reset POST /reset Reset Imandra internal state
shutdown POST /shutdown Shutdown the server
verify_by_name POST /verify/by-name Verify a property (boolean function) by name. (The name should exist from a previous call to `/eval`). This is the more 'primitive' call - calls to //by-src are for convenience and use Imandra_util.gensym to assign a name to your `src` block first, and then act by_name, so give this endpoint a try if you're having issues with //by-src.
verify_by_src POST /verify/by-src Verify a property (boolean function) from lambda expression source

decompose

DecomposeResult decompose(decompose_request_src)

Region decomposition of a function

Example

  • Bearer Authentication (bearerAuth):
import time
import os
import imandra_http_api_client
from imandra_http_api_client.models.decompose_request_src import DecomposeRequestSrc
from imandra_http_api_client.models.decompose_result import DecomposeResult
from imandra_http_api_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://localhost:3000
# See configuration.py for a list of all supported configuration parameters.
configuration = imandra_http_api_client.Configuration(
    host = "http://localhost:3000"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization: bearerAuth
configuration = imandra_http_api_client.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with imandra_http_api_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = imandra_http_api_client.DefaultApi(api_client)
    decompose_request_src = imandra_http_api_client.DecomposeRequestSrc() # DecomposeRequestSrc | 

    try:
        # Region decomposition of a function
        api_response = api_instance.decompose(decompose_request_src)
        print("The response of DefaultApi->decompose:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling DefaultApi->decompose: %s\n" % e)

Parameters

Name Type Description Notes
decompose_request_src DecomposeRequestSrc

Return type

DecomposeResult

Authorization

bearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Decompostion suceeded -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

eval

EvalResponse eval(eval_request_src)

Evaluate a string of source code

Example

  • Bearer Authentication (bearerAuth):
import time
import os
import imandra_http_api_client
from imandra_http_api_client.models.eval_request_src import EvalRequestSrc
from imandra_http_api_client.models.eval_response import EvalResponse
from imandra_http_api_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://localhost:3000
# See configuration.py for a list of all supported configuration parameters.
configuration = imandra_http_api_client.Configuration(
    host = "http://localhost:3000"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization: bearerAuth
configuration = imandra_http_api_client.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with imandra_http_api_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = imandra_http_api_client.DefaultApi(api_client)
    eval_request_src = imandra_http_api_client.EvalRequestSrc() # EvalRequestSrc | 

    try:
        # Evaluate a string of source code
        api_response = api_instance.eval(eval_request_src)
        print("The response of DefaultApi->eval:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling DefaultApi->eval: %s\n" % e)

Parameters

Name Type Description Notes
eval_request_src EvalRequestSrc

Return type

EvalResponse

Authorization

bearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Evaluated ok -
422 Error during compilation/evaluation -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_history

str get_history()

Get a text version of the Logic History

Gives an idea of what functions and theorems have been defined.

Example

  • Bearer Authentication (bearerAuth):
import time
import os
import imandra_http_api_client
from imandra_http_api_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://localhost:3000
# See configuration.py for a list of all supported configuration parameters.
configuration = imandra_http_api_client.Configuration(
    host = "http://localhost:3000"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization: bearerAuth
configuration = imandra_http_api_client.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with imandra_http_api_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = imandra_http_api_client.DefaultApi(api_client)

    try:
        # Get a text version of the Logic History
        api_response = api_instance.get_history()
        print("The response of DefaultApi->get_history:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling DefaultApi->get_history: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

str

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: text/plain

HTTP response details

Status code Description Response headers
200 History in markdown -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_status

str get_status()

Get server status

Can be used to check that the server is up and running.

Example

  • Bearer Authentication (bearerAuth):
import time
import os
import imandra_http_api_client
from imandra_http_api_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://localhost:3000
# See configuration.py for a list of all supported configuration parameters.
configuration = imandra_http_api_client.Configuration(
    host = "http://localhost:3000"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization: bearerAuth
configuration = imandra_http_api_client.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with imandra_http_api_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = imandra_http_api_client.DefaultApi(api_client)

    try:
        # Get server status
        api_response = api_instance.get_status()
        print("The response of DefaultApi->get_status:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling DefaultApi->get_status: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

str

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: text/plain

HTTP response details

Status code Description Response headers
200 OK -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

instance_by_name

InstanceResponse instance_by_name(instance_request_name)

Search for an instance from a property (boolean function) by name. (The name should exist from a previous call to /eval). This is the more 'primitive' call - calls to //by-src are for convenience and use Imandra_util.gensym to assign a name to your src block first, and then act by_name, so give this endpoint a try if you're having issues with //by-src.

Example

  • Bearer Authentication (bearerAuth):
import time
import os
import imandra_http_api_client
from imandra_http_api_client.models.instance_request_name import InstanceRequestName
from imandra_http_api_client.models.instance_response import InstanceResponse
from imandra_http_api_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://localhost:3000
# See configuration.py for a list of all supported configuration parameters.
configuration = imandra_http_api_client.Configuration(
    host = "http://localhost:3000"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization: bearerAuth
configuration = imandra_http_api_client.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with imandra_http_api_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = imandra_http_api_client.DefaultApi(api_client)
    instance_request_name = imandra_http_api_client.InstanceRequestName() # InstanceRequestName | 

    try:
        # Search for an instance from a property (boolean function) by name. (The name should exist from a previous call to `/eval`).  This is the more 'primitive' call - calls to /*/by-src are for convenience and use Imandra_util.gensym to assign a name to your `src` block first, and then act by_name, so give this endpoint a try if you're having issues with /*/by-src. 
        api_response = api_instance.instance_by_name(instance_request_name)
        print("The response of DefaultApi->instance_by_name:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling DefaultApi->instance_by_name: %s\n" % e)

Parameters

Name Type Description Notes
instance_request_name InstanceRequestName

Return type

InstanceResponse

Authorization

bearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Evaluated ok -
422 Bad request -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

instance_by_src

InstanceResponse instance_by_src(instance_request_src)

Obtain an instance from a property (boolean function) from lambda expression source

Example

  • Bearer Authentication (bearerAuth):
import time
import os
import imandra_http_api_client
from imandra_http_api_client.models.instance_request_src import InstanceRequestSrc
from imandra_http_api_client.models.instance_response import InstanceResponse
from imandra_http_api_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://localhost:3000
# See configuration.py for a list of all supported configuration parameters.
configuration = imandra_http_api_client.Configuration(
    host = "http://localhost:3000"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization: bearerAuth
configuration = imandra_http_api_client.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with imandra_http_api_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = imandra_http_api_client.DefaultApi(api_client)
    instance_request_src = imandra_http_api_client.InstanceRequestSrc() # InstanceRequestSrc | 

    try:
        # Obtain an instance from a property (boolean function) from lambda expression source
        api_response = api_instance.instance_by_src(instance_request_src)
        print("The response of DefaultApi->instance_by_src:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling DefaultApi->instance_by_src: %s\n" % e)

Parameters

Name Type Description Notes
instance_request_src InstanceRequestSrc

Return type

InstanceResponse

Authorization

bearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Evaluated ok -
422 Error during compilation/evaluation -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

reset

str reset()

Reset Imandra internal state

Equivalent to #reset directive in imandra-repl

Example

  • Bearer Authentication (bearerAuth):
import time
import os
import imandra_http_api_client
from imandra_http_api_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://localhost:3000
# See configuration.py for a list of all supported configuration parameters.
configuration = imandra_http_api_client.Configuration(
    host = "http://localhost:3000"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization: bearerAuth
configuration = imandra_http_api_client.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with imandra_http_api_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = imandra_http_api_client.DefaultApi(api_client)

    try:
        # Reset Imandra internal state
        api_response = api_instance.reset()
        print("The response of DefaultApi->reset:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling DefaultApi->reset: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

str

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: text/plain

HTTP response details

Status code Description Response headers
200 OK -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

shutdown

str shutdown()

Shutdown the server

Example

  • Bearer Authentication (bearerAuth):
import time
import os
import imandra_http_api_client
from imandra_http_api_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://localhost:3000
# See configuration.py for a list of all supported configuration parameters.
configuration = imandra_http_api_client.Configuration(
    host = "http://localhost:3000"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization: bearerAuth
configuration = imandra_http_api_client.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with imandra_http_api_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = imandra_http_api_client.DefaultApi(api_client)

    try:
        # Shutdown the server
        api_response = api_instance.shutdown()
        print("The response of DefaultApi->shutdown:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling DefaultApi->shutdown: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

str

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: text/plain

HTTP response details

Status code Description Response headers
200 OK -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

verify_by_name

VerifyResponse verify_by_name(verify_request_name)

Verify a property (boolean function) by name. (The name should exist from a previous call to /eval). This is the more 'primitive' call - calls to //by-src are for convenience and use Imandra_util.gensym to assign a name to your src block first, and then act by_name, so give this endpoint a try if you're having issues with //by-src.

Example

  • Bearer Authentication (bearerAuth):
import time
import os
import imandra_http_api_client
from imandra_http_api_client.models.verify_request_name import VerifyRequestName
from imandra_http_api_client.models.verify_response import VerifyResponse
from imandra_http_api_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://localhost:3000
# See configuration.py for a list of all supported configuration parameters.
configuration = imandra_http_api_client.Configuration(
    host = "http://localhost:3000"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization: bearerAuth
configuration = imandra_http_api_client.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with imandra_http_api_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = imandra_http_api_client.DefaultApi(api_client)
    verify_request_name = imandra_http_api_client.VerifyRequestName() # VerifyRequestName | 

    try:
        # Verify a property (boolean function) by name. (The name should exist from a previous call to `/eval`).  This is the more 'primitive' call - calls to /*/by-src are for convenience and use Imandra_util.gensym to assign a name to your `src` block first, and then act by_name, so give this endpoint a try if you're having issues with /*/by-src. 
        api_response = api_instance.verify_by_name(verify_request_name)
        print("The response of DefaultApi->verify_by_name:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling DefaultApi->verify_by_name: %s\n" % e)

Parameters

Name Type Description Notes
verify_request_name VerifyRequestName

Return type

VerifyResponse

Authorization

bearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Evaluated ok -
422 Bad request -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

verify_by_src

VerifyResponse verify_by_src(verify_request_src)

Verify a property (boolean function) from lambda expression source

Example

  • Bearer Authentication (bearerAuth):
import time
import os
import imandra_http_api_client
from imandra_http_api_client.models.verify_request_src import VerifyRequestSrc
from imandra_http_api_client.models.verify_response import VerifyResponse
from imandra_http_api_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://localhost:3000
# See configuration.py for a list of all supported configuration parameters.
configuration = imandra_http_api_client.Configuration(
    host = "http://localhost:3000"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization: bearerAuth
configuration = imandra_http_api_client.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with imandra_http_api_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = imandra_http_api_client.DefaultApi(api_client)
    verify_request_src = imandra_http_api_client.VerifyRequestSrc() # VerifyRequestSrc | 

    try:
        # Verify a property (boolean function) from lambda expression source
        api_response = api_instance.verify_by_src(verify_request_src)
        print("The response of DefaultApi->verify_by_src:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling DefaultApi->verify_by_src: %s\n" % e)

Parameters

Name Type Description Notes
verify_request_src VerifyRequestSrc

Return type

VerifyResponse

Authorization

bearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Evaluated ok -
422 Error during compilation/evaluation -

[Back to top] [Back to API list] [Back to Model list] [Back to README]