Commit 245f221a authored by Michael Hanus 's avatar Michael Hanus

Updates w.r.t. new packages

parent 0a5d290a
......@@ -16,8 +16,12 @@
"html" : ">= 2.0.0",
"printf" : ">= 0.0.1",
"regexp" : ">= 1.1.0",
"setfunctions" : ">= 0.0.1",
"wl-pprint" : ">= 0.0.1",
"xml" : ">= 2.0.0"
"xml" : ">= 2.0.0",
"contracts" : ">= 0.0.1",
"easycheck" : ">= 0.0.1"
},
"compilerCompatibility": {
"pakcs": ">= 2.0.0",
......@@ -49,11 +53,6 @@
"FixInt", "FloatString", "Guards", "ListFuns", "Lookup",
"Nim", "ParOr", "Queens", "Rev2", "WorldCup",
"ParOrDet", "BubbleSortDet", "DutchFlagDet" ]
},
{ "src-dir": "src/ContractWrapper/Examples",
"options": "--nospec --nodet --deftype=Int",
"modules": [ "BubbleSort", "BubbleSortFormat", "Coin",
"FibInfinite", "Quicksort" ]
}
],
"documentation": {
......
{
"name": "currypp",
"version": "2.0.0",
"author": "Michael Hanus <mh@informatik.uni-kiel.de>",
"synopsis": "The standard preprocessor of Curry",
"category": [ "Programming", "Analysis" ],
"dependencies": {
"base" : ">= 1.0.0, < 2.0.0",
"abstract-curry": ">= 2.0.0",
"cass-analysis" : ">= 2.0.0",
"cass" : ">= 2.0.0",
"cdbi" : ">= 2.0.0",
"currycheck" : ">= 2.0.0",
"currypath" : ">= 0.0.1",
"fl-parser" : ">= 1.0.0",
"html" : ">= 2.0.0",
"printf" : ">= 0.0.1",
"regexp" : ">= 1.1.0",
"setfunctions" : ">= 0.0.1",
"wl-pprint" : ">= 0.0.1",
"xml" : ">= 2.0.0",
"contracts" : ">= 0.0.1",
"easycheck" : ">= 0.0.1"
},
"compilerCompatibility": {
"pakcs": ">= 2.0.0",
"kics2": ">= 2.0.0"
},
"sourceDirs": [ "src", "src/IntegratedCode",
"src/IntegratedCode/Parser",
"src/IntegratedCode/Parser/ML",
"src/IntegratedCode/Parser/SQL",
"src/DefaultRules",
"src/ContractWrapper"
],
"exportedModules": [ "Main" ],
"executable": {
"name": "currypp",
"main": "Main"
},
"testsuite": [
{ "src-dir": "src/IntegratedCode/Examples",
"modules": [ "testFormat", "testHtml", "testRegExps" ]
},
{ "src-dir": "src/IntegratedCode/ExamplesSQL",
"options": "-v",
"script" : "test.sh"
},
{ "src-dir": "src/DefaultRules/Examples",
"options": "-m40",
"modules": [ "BreakWhere", "BubbleSort", "ColorMap", "DutchFlag",
"FixInt", "FloatString", "Guards", "ListFuns", "Lookup",
"Nim", "ParOr", "Queens", "Rev2", "WorldCup",
"ParOrDet", "BubbleSortDet", "DutchFlagDet" ]
},
{ "src-dir": "src/ContractWrapper/Examples",
"options": "--nospec --nodet --deftype=Int",
"modules": [ "BubbleSort", "BubbleSortFormat", "Coin",
"FibInfinite", "Quicksort" ]
}
],
"documentation": {
"src-dir": "docs",
"main": "main.tex"
},
"source": {
"git": "https://git.ps.informatik.uni-kiel.de/curry-packages/currypp.git",
"tag": "$version"
}
}
{-# OPTIONS_CYMAKE -F --pgmF=currypp --optF=contracts #-}
-- straight selection sort with specification
import SetFunctions
import Control.SetFunctions
perm [] = []
perm (x:xs) = insert (perm xs)
......
......@@ -219,7 +219,7 @@ transformProgram opts funposs allfdecls detinfo specdecls predecls postdecls
-- compute postconditions actually used for contract checking:
contractpcs = postdecls++newpostconds
in CurryProg mname
(nub ("Test.Contract":"SetFunctions":imps))
(nub ("Test.Contract":"Control.SetFunctions":imps))
dfltdecl clsdecls instdecls tdecls
(map deleteCmtIfEmpty
(concatMap
......@@ -414,9 +414,9 @@ withSuffix (m,f) s = (m, f ++ s)
cMod :: String -> QName
cMod f = ("Test.Contract",f)
-- An operation of the module SetFunctions:
-- An operation of the module Control.SetFunctions:
sfMod :: String -> QName
sfMod f = ("SetFunctions",f)
sfMod f = ("Control.SetFunctions",f)
-- Set function for a function name with given arity and arguments:
setFun :: Int -> QName -> [CExpr] -> CExpr
......
{-# OPTIONS_CYMAKE -F --pgmF=currypp --optF=defaultrules #-}
import Test.EasyCheck
import Test.Prop
-- The following task should be solved:
-- Break a Curry main expression into an expression and a where...free clause.
......
{-# OPTIONS_CYMAKE -F --pgmF=currypp --optF=defaultrules #-}
import Test.EasyCheck
import SetFunctions
import Test.Prop
import Control.SetFunctions
-- Bubble sort formulation with default rule
......
{-# OPTIONS_CYMAKE -F --pgmF=currypp --optF=defaultrules #-}
import Test.EasyCheck
import Test.Prop
-- Bubble sort formulation with default rule as deterministic function
......
{-# OPTIONS_CYMAKE -F --pgmF=currypp --optF=defaultrules #-}
{-# OPTIONS_CYMAKE -Wnone #-}
import Test.EasyCheck
import Test.Prop
-- The implementation of coloring a map using a default rule
-- (by Sergio Antoy).
......
{-# OPTIONS_CYMAKE -F --pgmF=currypp --optF=defaultrules #-}
import Test.EasyCheck
import Test.Prop
-- Dijsktra's Dutch National Flag problem with functional patterns
......
{-# OPTIONS_CYMAKE -F --pgmF=currypp --optF=defaultrules #-}
import Test.EasyCheck
import Test.Prop
-- Dijsktra's Dutch National Flag problem with functional patterns,
-- default rule declared as a deterministic function:
......
{-# OPTIONS_CYMAKE -F --pgmF=currypp --optF=defaultrules #-}
import Test.EasyCheck
import Test.Prop
-- Operation to delete suffixes of the fornm ".0"
fix_int (s++".0") = s
......
{-# OPTIONS_CYMAKE -F --pgmF=currypp --optF=defaultrules #-}
import Test.EasyCheck
import Test.Prop
-- Example: predicate to check for float strings
......
{-# OPTIONS_CYMAKE -F --pgmF=currypp --optF=defaultrules #-}
{-# OPTIONS_CYMAKE -Wnone #-}
import Test.EasyCheck
import Test.Prop
-- Examples for multiple rules with guards:
......
{-# OPTIONS_CYMAKE -F --pgmF=currypp --optF=defaultrules #-}
{-# OPTIONS_CYMAKE -Wnone #-}
import Test.EasyCheck
import Test.Prop
-- Warning: these redefinitions work fine with KiCS2, but with PAKCS
-- they do not work on infinite lists due to restrictions on set functions.
......
{-# OPTIONS_CYMAKE -F --pgmF=currypp --optF=defaultrules #-}
import Test.EasyCheck
import Test.Prop
-- Lookup with default rules:
nlookup key (_ ++ [(key,value)] ++ _) = Just value
......
{-# OPTIONS_CYMAKE -F --pgmF=currypp --optF=defaultrules #-}
{-# OPTIONS_CYMAKE -Wnone #-}
import Test.EasyCheck
import Test.Prop
-- A simple implementation of a two-person game (here: Nim) with default rules
--
......
{-# OPTIONS_CYMAKE -F --pgmF=currypp --optF=defaultrules #-}
{-# OPTIONS_CYMAKE -Wnone #-}
import Test.EasyCheck
import Test.Prop
-- Parallel or with default rules:
por True _ = True
......
{-# OPTIONS_CYMAKE -F --pgmF=currypp --optF=defaultrules #-}
import Test.EasyCheck
import Test.Prop
-- Parallel or declared as a deterministic function:
por :: Bool -> Bool -> DET Bool
......
{-# OPTIONS_CYMAKE -F --pgmF=currypp --optF=defaultrules #-}
{-# OPTIONS_CYMAKE -Wnone #-}
import Test.EasyCheck
import Test.Prop
-------------------------------------------------------------------------
-- Definition of n-queens with default rules:
......
{-# OPTIONS_CYMAKE -F --pgmF=currypp --optF=defaultrules #-}
{-# OPTIONS_CYMAKE -Wnone #-}
import Test.EasyCheck
import Test.Prop
-- Reverse a list if it has exactly two elements:
rev2 :: [a] -> [a]
......
{-# OPTIONS_CYMAKE -F --pgmF=currypp --optF=defaultrules #-}
{-# OPTIONS_CYMAKE -Wnone #-}
import Test.EasyCheck
import Test.Prop
-- Example: parse World Cup soccer scores (e.g., "_:_", "3:2")
......
......@@ -342,7 +342,7 @@ preUntyped :: CTypeExpr
preUntyped = CTCons (pre "untyped")
setFunMod :: String
setFunMod = "SetFunctions"
setFunMod = "Control.SetFunctions"
--- Extracts all elements with a single occurrence in a given list.
extractSingles :: Eq a => [a] -> [a]
......
......@@ -10,7 +10,7 @@
------------------------------------------------------------------------------
import qualified Data.Format -- required in the pre-processed program
import Test.EasyCheck
import Test.Prop
-- Format a string and an integer:
ex1 :: String -> Int -> String
......
......@@ -6,7 +6,7 @@
------------------------------------------------------------------------------
import HTML.Base
import Test.EasyCheck
import Test.Prop
htmlTest1 :: String -> [HtmlExp]
htmlTest1 name = ``html
......
......@@ -8,7 +8,7 @@
------------------------------------------------------------------------------
import RegExp -- from package `regexp` (required in the pre-processed program)
import Test.EasyCheck
import Test.Prop
test_abc = (match ``regex abc'' "abc") -=- True
......
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