OCaml Client

ImandraX provides OCaml client libraries for programmatic access to the reasoning engine. Multiple HTTP backend implementations are available.

Client variants

The imandrax-api repository provides several OCaml client implementations under src/client/:

PackageBackendDescription
imandrax-client-coreNone (abstract)Core client types and interfaces
imandrax-client-cohttp-lwtCohttp + LwtLwt-based async client
imandrax-client-ezcurlEzcurlSynchronous client using curl

Core library

The imandrax-api core library (src/lib/) provides OCaml types for:

AreaContents
MIRMid-level IR, the intermediate representation of IML programs
CIRCore IR, the representation used by the reasoning engine
TasksTask management types
EvalEvaluation result types
ProofProof representation and checking
ReportsStructured reporting
ArtifactsSerialized result objects with content-addressed storage
CommonShared types and utilities

Protobuf types

All protobuf message types are available as OCaml modules generated from the .proto definitions. The API uses the same Twirp protocol as all other client libraries.

Additional language bindings

The imandrax-api repository also provides:

  • TypeScript bindings (src/ts/)
  • Rust bindings (src/rust/)

These are generated from the same protobuf definitions and provide the same API surface.

Source code

The OCaml client source is in the imandrax-api repository under src/client/ and src/lib/.