Commit 281b54fb authored by Michael Hanus 's avatar Michael Hanus
Browse files

Minor updates

parent b90a5261
......@@ -29,15 +29,19 @@ A tool to create a simple makefile for a Curry application.
A compiler for Curry into JavaScript programs used in the
generation of web user interfaces (WUIs).
`currydoc`:
A documentation generator for Curry programs.
`currycheck`:
A property test tool for Curry programs.
`currytest`:
A test tool for Curry programs.
`erd2curry`:
A compiler to translate database (ER) models
into Curry programs containing corresponding database operations.
`currypp`:
A preprocessor for Curry programs implementing integrated code,
default rules, deterministic functions, and dynamic contract checking.
`ertool`:
Compilers to translate database (ER) models
into Curry programs providing high-level access to relational databases.
`genint`:
A program for generating module interfaces and source code
......@@ -47,11 +51,20 @@ of some Curry systems).
`importcalls`:
A tool to show all calls to imported functions in a module.
`typeinference`:
This directory contains the implementation of a type
inferencer for FlatCurry programs which annotates
each expression occurring in a FlatCurry program with its
actual type.
`optimize`:
The implementation of optimization tools cor Curry,
in particular, a transformation tool to replace Boolean equalities
by unification constraints.
`runcurry`:
The implementation of the command `runcurry`.
`spicey`:
The implementation of Curry's web framework Spicey.
`verification`:
This directory contains tools to support the verification of
Curry programs, e.g., a translator of Curry programs into Agda.
`xmldata`:
This directory contains a tool to generate conversion functions
......
......@@ -154,7 +154,7 @@ analyseReqVal consinfo (Func (m,f) arity _ _ rule) calledfuncs
,("$#",AFType [([AnyC,AnyC],AnyC)])
,("$##",AFType [([AnyC,AnyC],AnyC)])
,("compare",AFType [([AnyC,AnyC],AnyC)])
]
]
analyseReqValRule :: ProgInfo [QName] -> [(QName,AFType)] -> [Int] -> Expr
-> AFType
......@@ -306,7 +306,7 @@ union [] ys = ys
union xs@(_:_) [] = xs
union (x:xs) (y:ys) | x==y = x : union xs ys
| x<y = x : union xs (y:ys)
| otherwise = y : union (x:xs) ys
| otherwise = y : union (x:xs) ys
-- Intersection on sorted lists:
intersect :: [a] -> [a] -> [a]
......@@ -314,6 +314,6 @@ intersect [] _ = []
intersect (_:_) [] = []
intersect (x:xs) (y:ys) | x==y = x : intersect xs ys
| x<y = intersect xs (y:ys)
| otherwise = intersect (x:xs) ys
| otherwise = intersect (x:xs) ys
------------------------------------------------------------------------------
......@@ -41,7 +41,7 @@ and store it in some file, e.g., \ccode{myerd.term}.
This description can be compiled into a Curry program by the
command\pindex{erd2curry}
\begin{curry}
erd2curry -t myerd.term
erd2curry myerd.term
\end{curry}
%
The directory \code{\cyshome/currytools/erd2curry/}
......
......@@ -80,7 +80,12 @@ writeCDBI (ERD name ents rels) dbPath = do
writeParserFile infofilehandle name ents rels dbPath
hClose infofilehandle
dbexists <- doesFileExist dbPath
unless dbexists $ do
if dbexists
then do
putStrLn $ "Database '" ++ dbPath ++ "' exists and, thus, not modified."
putStrLn $ "Please make sure that this database is conform to the ER model!"
-- TODO: if the database exists, check its consistency with ER model
else do
putStrLn $ "Creating new sqlite3 database: " ++ dbPath
db <- connectToCommand $ "sqlite3 " ++ dbPath
createDatabase ents db
......
......@@ -45,14 +45,18 @@ defaultOptions = Options
}
-- Primitive functions that are not extracted and translated to the verifier.
-- In the future, it might be necessary to parameterize it w.r.t. the
-- target verifier.
isUntranslatedFunc :: QName -> Bool
isUntranslatedFunc qn =
qn `elem` [pre "?", pre "==", pre "+", pre "*", pre "length", pre "map"] ||
fst qn `elem` ["Test.Prop","Test.EasyCheck"]
-- Primitive functions that are not extracted and translated to the verifier.
-- In the future, it might be necessary to parameterize it w.r.t. the
-- target verifier.
defPrimTypes :: [QName]
defPrimTypes = [ pre "[]", pre "Bool", pre "Maybe", ("Nat","Nat")
defPrimTypes = [ pre "[]", pre "Bool", pre "Int", pre "Maybe", ("Nat","Nat")
, ("Test.Prop","Prop"), ("Test.EasyCheck","Prop")]
-- Definition of actual command line options.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment