liquid-fixpoint-0.5.0.1: Predicate Abstraction-based Horn-Clause/Implication Constraint Solver

Safe HaskellNone
LanguageHaskell98

Language.Fixpoint.Types.Refinements

Contents

Description

This module contains the data types for representing terms in the refinement logic; currently split into Expr and Pred but which will be unified.

Synopsis

Representing Terms

data SymConst Source

Expressions ---------------------------------------------------------------

Uninterpreted constants that are embedded as "constant symbol : Str"

Constructors

SL !Text 

Instances

Eq SymConst Source 
Data SymConst Source 
Ord SymConst Source 
Show SymConst Source 
Generic SymConst Source 
Binary SymConst Source 
NFData SymConst Source 
Hashable SymConst Source 
PPrint SymConst Source 
Fixpoint SymConst Source 
Symbolic SymConst Source

String Constants -----------------------------------------

Replace all symbol-representations-of-string-literals with string-literal Used to transform parsed output from fixpoint back into fq.

type Rep SymConst Source 

pattern PTrue :: Expr Source

pattern PTop :: Expr Source

pattern PFalse :: Expr Source

pattern EBot :: Expr Source

newtype KVar Source

Kvars ---------------------------------------------------------------------

Constructors

KV 

Fields

kv :: Symbol
 

newtype Subst Source

Substitutions -------------------------------------------------------------

Constructors

Su (HashMap Symbol Expr) 

Constructing Terms

eVar :: Symbolic a => a -> Expr Source

eProp :: Symbolic a => a -> Expr Source

Generalizing Embedding with Typeclasses

class Expression a where Source

Generalizing Symbol, Expression, Predicate into Classes -----------

Values that can be viewed as Constants

Values that can be viewed as Expressions

Methods

expr :: a -> Expr Source

Instances

Expression Int Source 
Expression Integer Source 
Expression Text Source 
Expression Symbol Source

The symbol may be an encoding of a SymConst.

Expression Expr Source 
Expression Bv Source

Construct an Expr using a raw string, e.g. (Bv S32 "#x02000000")

Expression a => Expression (Located a) Source 

class Predicate a where Source

Values that can be viewed as Predicates

Methods

prop :: a -> Expr Source

class Subable a where Source

Class Predicates for Valid Refinements -----------------------------

Minimal complete definition

syms, substa, substf, subst

Methods

syms :: a -> [Symbol] Source

substa :: (Symbol -> Symbol) -> a -> a Source

substf :: (Symbol -> Expr) -> a -> a Source

subst :: Subst -> a -> a Source

subst1 :: a -> (Symbol, Expr) -> a Source

Instances

class (Monoid r, Subable r) => Reftable r where Source

Minimal complete definition

isTauto, ppTy, bot, toReft, ofReft, params

Methods

isTauto :: r -> Bool Source

ppTy :: r -> Doc -> Doc Source

top :: r -> r Source

bot :: r -> r Source

meet :: r -> r -> r Source

toReft :: r -> Reft Source

ofReft :: Reft -> r Source

params Source

Arguments

:: r 
-> [Symbol]

parameters for Reft, vv + others

Constructors

symbolReft :: Symbolic a => a -> Reft Source

Generally Useful Refinements --------------------------

Predicates

isFunctionSortedReft :: SortedReft -> Bool Source

Refinements ----------------------------------------------

isSingletonReft :: Reft -> Maybe Expr Source

Predicates ----------------------------------------------------------------

isFalse :: Falseable a => a -> Bool Source

Destructing

Transforming