ExMaude.Backend.Port (ExMaude v0.2.0)

View Source

Port-based backend for ExMaude.

This backend communicates with Maude via an Erlang Port, using a PTY wrapper to ensure Maude outputs prompts for response detection.

Features

  • Full process isolation - Maude crashes don't affect the BEAM
  • Works with any Maude installation
  • No native code compilation required

Trade-offs

  • Higher latency due to PTY wrapper and text parsing
  • Regex-based error detection
  • Larger memory footprint per worker

Configuration

config :ex_maude,
  backend: :port,
  use_pty: true  # Set to false if PTY allocation fails

Summary

Types

t()

Internal state for the Port backend GenServer.

Functions

Returns a specification to start this module under a supervisor.

Types

t()

@type t() :: %ExMaude.Backend.Port{
  buffer: String.t() | nil,
  from: GenServer.from() | nil,
  maude_path: String.t() | nil,
  port: port() | nil,
  timeout_ref: reference() | nil
}

Internal state for the Port backend GenServer.

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.