hasmtlib-2.8.1: A monad for interfacing with external SMT solvers
Safe HaskellSafe-Inferred
LanguageGHC2021

Language.Hasmtlib.Type.Pipe

Contents

Description

This module provides an IO-Pipe to external SMT-Solvers and ships with implementations for MonadSMT, MonadOMT and MonadIncrSMT.

The Pipe is based on a Solver from Tweag's package smtlib-backends and in reality is just an IO-Handle.

Synopsis

Type

data Pipe Source #

A pipe to the solver. If Solver is Queuing then all commands that do not expect an answer are sent to the queue. All commands that expect an answer have the queue to be sent to the solver before sending the command itself. If Solver is not Queuing, all commands are sent to the solver immediately.

Constructors

Pipe 

Fields

Instances

Instances details
Sharing Pipe Source # 
Instance details

Defined in Language.Hasmtlib.Type.Pipe

Associated Types

type SharingMonad Pipe :: (Type -> Type) -> Constraint Source #

(MonadState Pipe m, MonadIO m) => MonadIncrSMT Pipe m Source # 
Instance details

Defined in Language.Hasmtlib.Type.Pipe

Methods

push :: m () Source #

pop :: m () Source #

checkSat :: m Result Source #

getModel :: m Solution Source #

getValue :: forall (t :: SMTSort). KnownSMTSort t => Expr t -> m (Maybe (Decoded (Expr t))) Source #

(MonadSMT Pipe m, MonadIO m) => MonadOMT Pipe m Source # 
Instance details

Defined in Language.Hasmtlib.Type.Pipe

Methods

minimize :: forall (t :: SMTSort). (KnownSMTSort t, Num (Expr t)) => Expr t -> m () Source #

maximize :: forall (t :: SMTSort). (KnownSMTSort t, Num (Expr t)) => Expr t -> m () Source #

assertSoft :: Expr 'BoolSort -> Maybe Double -> Maybe String -> m () Source #

(MonadState Pipe m, MonadIO m) => MonadSMT Pipe m Source # 
Instance details

Defined in Language.Hasmtlib.Type.Pipe

Methods

smtvar' :: forall (t :: SMTSort). KnownSMTSort t => Proxy t -> m (SMTVar t) Source #

var' :: forall (t :: SMTSort). KnownSMTSort t => Proxy t -> m (Expr t) Source #

assert :: Expr 'BoolSort -> m () Source #

setOption :: SMTOption -> m () Source #

setLogic :: String -> m () Source #

type SharingMonad Pipe Source # 
Instance details

Defined in Language.Hasmtlib.Type.Pipe

Lens