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

Safe HaskellNone

Language.Fixpoint.Types

Contents

Description

This module contains the data types, operations and serialization functions for representing Fixpoint's implication (i.e. subtyping) and well-formedness constraints in Haskell. The actual constraint solving is done by the `fixpoint.native` which is written in Ocaml.

Synopsis

Top level serialization

data FInfo a Source

Constructors

FI 

Fields

cm :: HashMap Integer (SubC a)
 
ws :: ![WfC a]
 
bs :: !BindEnv
 
gs :: !FEnv
 
lits :: ![(Symbol, Sort)]
 
kuts :: Kuts
 
quals :: ![Qualifier]
 

Rendering

traceFix :: Fixpoint a => String -> a -> aSource

Embedding to Fixpoint Types

data Sort Source

Constructors

FInt 
FNum

numeric kind for Num tyvars

FObj Symbol

uninterpreted type

FVar !Int

fixpoint type variable

FFunc !Int ![Sort]

type-var arity, in-ts ++ [out-t]

FApp FTycon [Sort]

constructed type

Symbols

Creating Symbols

intSymbol :: Show a => [Char] -> a -> SymbolSource

Expressions and Predicates

data SymConst Source

Uninterpreted constants that are embedded as constant symbol : Str

Constructors

SL !String 

eVar :: Symbolic a => a -> ExprSource

Generalizing Embedding with Typeclasses

class Symbolic a whereSource

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

Values that can be viewed as Symbols

Methods

symbol :: a -> SymbolSource

class Expression a whereSource

Values that can be viewed as Expressions

Methods

expr :: a -> ExprSource

Instances

Expression Int 
Expression Integer 
Expression String 
Expression Expr 
Expression Symbol

The symbol may be an encoding of a SymConst.

class Predicate a whereSource

Values that can be viewed as Predicates

Methods

prop :: a -> PredSource

Constraints and Solutions

data SubC a Source

Instances

Show (SubC a) 
NFData a => NFData (SubC a) 
(Ord a, Fixpoint a) => Fixpoint (FixResult (SubC a)) 
Fixpoint (SubC a) 

data WfC a Source

Instances

NFData a => NFData (WfC a) 
Fixpoint (WfC a) 

type Tag = [Int]Source

addIds :: [SubC a] -> [(Integer, SubC a)]Source

sinfo :: SubC a -> aSource

Environments

data SEnv a Source

Instances

data SESearch a Source

Constructors

Found a 
Alts [Symbol] 

mapSEnv :: (a1 -> a) -> SEnv a1 -> SEnv aSource

insertSEnv :: Symbol -> a -> SEnv a -> SEnv aSource

intersectWithSEnv :: (v1 -> v2 -> a) -> SEnv v1 -> SEnv v2 -> SEnv aSource

filterSEnv :: (a -> Bool) -> SEnv a -> SEnv aSource

insertFEnv :: Symbol -> a -> SEnv a -> SEnv aSource

emptyIBindEnv :: IBindEnvSource

Functions for Indexed Bind Environment

insertBindEnv :: Symbol -> SortedReft -> BindEnv -> (BindId, BindEnv)Source

Functions for Global Binder Environment

Refinements

class (Monoid r, Subable r) => Reftable r whereSource

A Class Predicates for Valid Refinements Types ---------------------

Methods

isTauto :: r -> BoolSource

ppTy :: r -> Doc -> DocSource

top :: rSource

bot :: r -> rSource

should also refactor top so it takes a parameter.

meet :: r -> r -> rSource

toReft :: r -> ReftSource

paramsSource

Arguments

:: r 
-> [Symbol]

parameters for Reft, vv + others

Constructing Refinements

isFalse :: Falseable a => a -> BoolSource

Substitutions

class Subable a whereSource

Methods

syms :: a -> [Symbol]Source

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

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

subst :: Subst -> a -> aSource

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

subst1Except :: Subable a => [Symbol] -> a -> (Symbol, Expr) -> aSource

Visitors

Functions on Result

Cut KVars

newtype Kuts Source

Constructors

KS (HashSet Symbol) 

Instances

Qualifiers