Term.Maude.Process

tamarin-prover-term-1.2.2: Term manipulation library for the tamarin prover.

Copyright | (c) 2010-2012 Benedikt Schmidt & Simon Meier
License | GPL v3 (see LICENSE)
Maintainer | Benedikt Schmidt <beschmi@gmail.com>
Safe Haskell | None
Language | Haskell98

Term.Maude.Process

Contents

- Handle to a maude process
- Unification using Maude
- Matching using Maude
- Normalization using Maude
- Managing the persistent Maude process

Description

AC-unification of DH terms using Maude as a backend.

Synopsis

- data MaudeHandle = MaudeHandle {
  - mhFilePath :: FilePath
  - mhMaudeSig :: MaudeSig
  - mhProc :: MVar MaudeProcess
  }
- startMaude :: FilePath -> MaudeSig -> IO MaudeHandle
- getMaudeStats :: MaudeHandle -> IO String
- unifyViaMaude :: IsConst c => MaudeHandle -> (c -> LSort) -> [Equal (VTerm c LVar)] -> IO [SubstVFresh c LVar]
- matchViaMaude :: IsConst c => MaudeHandle -> (c -> LSort) -> Match (VTerm c LVar) -> IO [Subst c LVar]
- normViaMaude :: IsConst c => MaudeHandle -> (c -> LSort) -> VTerm c LVar -> IO (VTerm c LVar)
- type WithMaude = Reader MaudeHandle

# Handle to a maude process

data MaudeHandle #

A handle to a Maude process. It requires the Maude path for Signatures to be serializable. If we also add the string for the Maude config file, then it would even be serializable on its own.

Constructors

MaudeHandle |
Fields mhFilePath :: FilePath mhMaudeSig :: MaudeSig mhProc :: MVar MaudeProcess

startMaude :: FilePath -> MaudeSig -> IO MaudeHandle #

`startMaude` starts a new instance of Maude and returns a Handle to it.

getMaudeStats :: MaudeHandle -> IO String #

`getMaudeStats` returns the maude stats formatted as a string.

# Unification using Maude

unifyViaMaude :: IsConst c => MaudeHandle -> (c -> LSort) -> [Equal (VTerm c LVar)] -> IO [SubstVFresh c LVar] #

`unifyViaMaude hnd eqs` computes all AC unifiers of `eqs` using the Maude process `hnd`.

# Matching using Maude

matchViaMaude :: IsConst c => MaudeHandle -> (c -> LSort) -> Match (VTerm c LVar) -> IO [Subst c LVar] #

`matchViaMaude (t, p)` computes a complete set of AC matchers of the term `t` to the pattern `p` via Maude.

# Normalization using Maude

normViaMaude :: IsConst c => MaudeHandle -> (c -> LSort) -> VTerm c LVar -> IO (VTerm c LVar) #

`normViaMaude t` normalizes the term t via Maude.

# Managing the persistent Maude process

type WithMaude = Reader MaudeHandle #

Values that depend on a `MaudeHandle`.