camfort-0.802: CamFort - Cambridge Fortran infrastructure

Safe HaskellNone
LanguageHaskell98

Camfort.Specification.Units.InferenceBackend

Contents

Synopsis

pprint :: t -> [Char] Source #

debugInfoForNonZeros :: [Rational] -> State UnitEnv String Source #

Print debug information for non-zero coefficients from the Gaussian matrix

errorMessage :: (?debug :: Bool) => Row -> UnitConstant -> [Rational] -> State UnitEnv String Source #

An attempt at getting some useful user information. Needs position information

swapUnitVarCats :: Int -> Int -> [a] -> [a] Source #

swapUnitVarCats' :: Int -> Int -> [a] -> [a] -> Int -> [a] Source #

reorderVarCols :: State UnitEnv () Source #

reorderVarCols puts any variable columns to the end of the Gaussian matrix (along with the associated information)

reduceRows :: Col -> LinearSystem -> LinearSystem Source #

reduceRows is a core part of the polymorphic unit checking for procedures.

It is essentially an "optimisation" of the Gaussian matrix (not in the sense of performance), that elimiantes rows in the system such that there are as few variables as possible. Within a function, assuming everything is consistent, then this should generate a linear constraint between the parameters and the return as a single row in the matrix. This is then used by the interprocedural constraints to hookup call-sites with definitions (in a parametrically polymorphic way- i.e. lambda abstraction is polymorphic in its units, different to say ML).

solveSystemM :: (?solver :: Solver, ?debug :: Bool) => String -> State UnitEnv Bool Source #

intrinsicsDict :: (?assumeLiterals :: AssumeLiterals) => [(String, String -> State UnitEnv ())] Source #

addProductIntrinsic :: (?assumeLiterals :: AssumeLiterals) => String -> State UnitEnv () Source #

addPowerIntrinsic :: (?assumeLiterals :: AssumeLiterals) => String -> State UnitEnv () Source #

mustEqual :: (?assumeLiterals :: AssumeLiterals) => Bool -> VarCol -> VarCol -> State UnitEnv VarCol Source #

inverse :: [Int] -> [Int] Source #

fixValue :: Eq a => (a -> a) -> a -> a Source #

moveElem :: Int -> Int -> [a] -> [a] Source #

incrElem :: Num a => a -> (Int, Int) -> Matrix a -> Matrix a Source #

moveCol :: Int -> Int -> Matrix a -> Matrix a Source #