SEARCH
NEW RPMS
DIRECTORIES
ABOUT
FAQ
VARIOUS
BLOG

 
 

ghc-ChasingBottoms rpm build for : openSUSE Tumbleweed. For other distributions click ghc-ChasingBottoms.

Name : ghc-ChasingBottoms
Version : 1.3.1.5 Vendor : obs://build_opensuse_org/devel:languages:haskell
Release : 2.8 Date : 2019-02-13 04:24:51
Group : Development/Libraries/Haskell Source RPM : ghc-ChasingBottoms-1.3.1.5-2.8.src.rpm
Size : 0.31 MB
Packager : (none)
Summary : For testing partial and infinite values
Description :
Do you ever feel the need to test code involving bottoms (e.g. calls to the
\'error\' function), or code involving infinite values? Then this library could
be useful for you.

It is usually easy to get a grip on bottoms by showing a value and waiting to
see how much gets printed before the first exception is encountered.
However, that quickly gets tiresome and is hard to automate using e.g.
QuickCheck (< http://www.cse.chalmers.se/~rjmh/QuickCheck/>). With this library
you can do the tests as simply as the following examples show.

Testing explicitly for bottoms:

> > isBottom (head []) > True

> > isBottom bottom > True

> > isBottom (_ -> bottom) > False

> > isBottom (bottom, bottom) > False

Comparing finite, partial values:

> > ((bottom, 3) :: (Bool, Int)) ==! (bottom, 2+5-4) > True

> > ((bottom, bottom) :: (Bool, Int)) < ! (bottom, 8) > True

Showing partial and infinite values (\'\\/!\' is join and \'/\\!\' is meet):

> > approxShow 4 $ (True, bottom) /! (bottom, \'b\') > \"Just (True, \'b\')\"

> > approxShow 4 $ (True, bottom) /! (bottom, \'b\') > \"(_|_, _|_)\"

> > approxShow 4 $ ([1..] :: [Int]) > \"[1, 2, 3, _\"

> > approxShow 4 $ (cycle [bottom] :: [Bool]) > \"[_|_, _|_, _|_, _\"

Approximately comparing infinite, partial values:

> > approx 100 [2,4..] ==! approx 100 (filter even [1..] :: [Int]) > True

> > approx 100 [2,4..] /=! approx 100 (filter even [bottom..] :: [Int]) > True

The code above relies on the fact that \'bottom\', just as \'error \"...\"\',
\'undefined\' and pattern match failures, yield exceptions. Sometimes we are
dealing with properly non-terminating computations, such as the following
example, and then it can be nice to be able to apply a time-out:

> > timeOut\' 1 (reverse [1..5]) > Value [5,4,3,2,1]

> > timeOut\' 1 (reverse [1..]) > NonTermination

The time-out functionality can be used to treat \"slow\" computations as bottoms:

\' > let tweak = Tweak { approxDepth = Just 5, timeOutLimit = Just 2 }
> semanticEq tweak (reverse [1..], [1..]) (bottom :: [Int], [1..] :: [Int])
True \'

\' > let tweak = noTweak { timeOutLimit = Just 2 } > semanticJoin
tweak (reverse [1..], True) ([] :: [Int], bottom) Just ([],True) \'

This can of course be dangerous:

\' > let tweak = noTweak { timeOutLimit = Just 0 } > semanticEq tweak
(reverse [1..100000000]) (bottom :: [Integer]) True \'

Timeouts can also be applied to \'IO\' computations:

> > let primes () = unfoldr ((x:xs) -> Just (x, filter ((/= 0) .
(`mod` x)) xs)) [2..] > > timeOutMicro 100 (print $ primes ()) >
[2,NonTermination > > timeOutMicro 10000 (print $ take 10 $ primes ()) >
[2,3,5,7,11,13,17,19,23,29] > Value ()

For the underlying theory and a larger example involving use of QuickCheck, see
the article \"Chasing Bottoms, A Case Study in Program Verification in the
Presence of Partial and Infinite Values\"
(< http://www.cse.chalmers.se/~nad/publications/danielsson-jansson-mpc2004.html>).

The code has been tested using GHC. Most parts can probably be ported to other
Haskell compilers, but this would require some work. The \'TimeOut\' functions
require preemptive scheduling, and most of the rest requires \'Data.Generics\';
\'isBottom\' only requires exceptions, though.

RPM found in directory: /packages/linux-pbone/ftp5.gwdg.de/pub/opensuse/repositories/devel:/languages:/haskell:/lts:/12/openSUSE_Tumbleweed/x86_64

Content of RPM  Changelog  Provides Requires

Hmm ... It's impossible ;-) This RPM doesn't exist on any FTP server

Provides :
ghc-ChasingBottoms
ghc-ChasingBottoms(x86-64)
libHSChasingBottoms-1.3.1.5-HuQam9ZTUIcEMvqMmoaSyo-ghc8.4.4.so()(64bit)

Requires :
libHSQuickCheck-2.11.3-3XHQpBYb83U2mMvNz2AjQX-ghc8.4.4.so()(64bit)
libHSarray-0.5.2.0-ghc8.4.4.so()(64bit)
libHSbase-4.11.1.0-ghc8.4.4.so()(64bit)
libHScontainers-0.5.11.0-ghc8.4.4.so()(64bit)
libHSdeepseq-1.4.3.0-ghc8.4.4.so()(64bit)
libHSghc-boot-th-8.4.4-ghc8.4.4.so()(64bit)
libHSghc-prim-0.5.2.0-ghc8.4.4.so()(64bit)
libHSinteger-gmp-1.0.2.0-ghc8.4.4.so()(64bit)
libHSmtl-2.2.2-ghc8.4.4.so()(64bit)
libHSpretty-1.1.3.6-ghc8.4.4.so()(64bit)
libHSprimitive-0.6.3.0-DaZpcxwJp2TGn8ITSgfI4C-ghc8.4.4.so()(64bit)
libHSrandom-1.1-9LLJAJa4iQFLJiLXBOBXBV-ghc8.4.4.so()(64bit)
libHSsyb-0.7-2jW43lwzJV5e7EQvU8PxV-ghc8.4.4.so()(64bit)
libHStemplate-haskell-2.13.0.0-ghc8.4.4.so()(64bit)
libHStf-random-0.5-BZa4jMFCdGCK8yjkzN18lQ-ghc8.4.4.so()(64bit)
libHStime-1.8.0.2-ghc8.4.4.so()(64bit)
libHStransformers-0.5.5.0-ghc8.4.4.so()(64bit)
libc.so.6()(64bit)
libc.so.6(GLIBC_2.2.5)(64bit)
libgmp.so.10()(64bit)
libm.so.6()(64bit)
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(FileDigests) <= 4.6.0-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(PayloadIsXz) <= 5.2-1


Content of RPM :
/usr/lib64/ghc-8.4.4/ChasingBottoms-1.3.1.5-HuQam9ZTUIcEMvqMmoaSyo
/usr/lib64/ghc-8.4.4/ChasingBottoms-1.3.1.5-HuQam9ZTUIcEMvqMmoaSyo/libHSChasingBottoms-1.3.1.5-HuQam9ZTUIcEMvqMmoaSyo-ghc8.4.4.so
/usr/share/licenses/ghc-ChasingBottoms
/usr/share/licenses/ghc-ChasingBottoms/LICENCE

 
ICM