Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
currycheck
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
curry-packages
currycheck
Commits
2603ebfb
Commit
2603ebfb
authored
Jan 02, 2019
by
Michael Hanus
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changes w.r.t. new module Test.Prop.Types
parent
b50c4a44
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
5 deletions
+9
-5
src/CurryCheck.curry
src/CurryCheck.curry
+1
-1
src/PropertyUsage.curry
src/PropertyUsage.curry
+8
-4
No files found.
src/CurryCheck.curry
View file @
2603ebfb
...
@@ -607,7 +607,7 @@ funDeclsWith pred = filter (pred . snd . funcName)
...
@@ -607,7 +607,7 @@ funDeclsWith pred = filter (pred . snd . funcName)
propResultType :: CTypeExpr -> CTypeExpr
propResultType :: CTypeExpr -> CTypeExpr
propResultType te = case te of
propResultType te = case te of
CFuncType from to -> CFuncType from (propResultType to)
CFuncType from to -> CFuncType from (propResultType to)
_ -> baseType (
easyCheck
Module,"Prop")
_ -> baseType (
propTypes
Module,"Prop")
-- Transforms a function declaration into a post condition test if
-- Transforms a function declaration into a post condition test if
-- there is a post condition for this function (i.e., a relation named
-- there is a post condition for this function (i.e., a relation named
...
...
src/PropertyUsage.curry
View file @
2603ebfb
...
@@ -3,12 +3,12 @@
...
@@ -3,12 +3,12 @@
--- a Curry program.
--- a Curry program.
---
---
--- @author Michael Hanus
--- @author Michael Hanus
--- @version
December 2017
--- @version
January 2019
------------------------------------------------------------------------
------------------------------------------------------------------------
module PropertyUsage
module PropertyUsage
( isProperty, isPropType, isPropIOType, isEquivProperty
( isProperty, isPropType, isPropIOType, isEquivProperty
, propModule, easyCheckModule, easyCheckExecModule
, propModule,
propTypesModule,
easyCheckModule, easyCheckExecModule
) where
) where
import AbstractCurry.Types
import AbstractCurry.Types
...
@@ -25,13 +25,13 @@ isProperty = isPropertyType . typeOfQualType . funcType
...
@@ -25,13 +25,13 @@ isProperty = isPropertyType . typeOfQualType . funcType
--- Is the type expression the type Test.EasyCheck.Prop?
--- Is the type expression the type Test.EasyCheck.Prop?
isPropType :: CTypeExpr -> Bool
isPropType :: CTypeExpr -> Bool
isPropType texp = case texp of
isPropType texp = case texp of
CTCons (mn,tc) -> tc == "Prop" &&
isCheckModule mn
CTCons (mn,tc) -> tc == "Prop" &&
mn == propTypesModule
_ -> False
_ -> False
--- Is the type expression the type Test.EasyCheck.PropIO?
--- Is the type expression the type Test.EasyCheck.PropIO?
isPropIOType :: CTypeExpr -> Bool
isPropIOType :: CTypeExpr -> Bool
isPropIOType texp = case texp of
isPropIOType texp = case texp of
CTCons (mn,tc) -> tc == "PropIO" &&
isCheckModule mn
CTCons (mn,tc) -> tc == "PropIO" &&
mn == propTypesModule
_ -> False
_ -> False
--- Check whether a function definition is an equivalence property, i.e.,
--- Check whether a function definition is an equivalence property, i.e.,
...
@@ -54,6 +54,10 @@ isCheckModule mn = mn == propModule || mn == easyCheckModule
...
@@ -54,6 +54,10 @@ isCheckModule mn = mn == propModule || mn == easyCheckModule
propModule :: String
propModule :: String
propModule = "Test.Prop"
propModule = "Test.Prop"
--- Name of the Test.Prop.Types module (containing property type definitions).
propTypesModule :: String
propTypesModule = "Test.Prop.Types"
--- Name of the EasyCheck module.
--- Name of the EasyCheck module.
easyCheckModule :: String
easyCheckModule :: String
easyCheckModule = "Test.EasyCheck"
easyCheckModule = "Test.EasyCheck"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment