-- editorconfig-checker-disable
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ViewPatterns #-}

-- | Property tests for the `quotientInteger` and `remainderInteger` builtins
module Evaluation.Builtins.Integer.QuotRemProperties
  ( test_integer_quot_rem_properties
  , integer_quot_rem_property_names
  , generate_integer_quot_rem_properties
  )
where

import Prelude hiding (abs)

import Evaluation.Builtins.Common
import Evaluation.Builtins.Integer.Common
import Evaluation.Builtins.Integer.Conformance

import Evaluation.Builtins.Conformance (CheckMode, OutputFormat, PropertyFilter, PropertyId (..))

import Test.Cardano.Base.QuickCheck qualified as BaseQC
import Test.QuickCheck.Random (QCGen)
import Test.Tasty (TestTree, testGroup)
import Test.Tasty.QuickCheck

numberOfTests :: Int
numberOfTests :: Int
numberOfTests = Int
200

-- `quotientInteger _ 0` always fails.
prop_quot_0_fails :: BigInteger -> Check
prop_quot_0_fails :: BigInteger -> Check
prop_quot_0_fails (BigInteger -> PlcTerm
biginteger -> PlcTerm
a) =
  PlcTerm -> Check
CheckFails (PlcTerm -> Check) -> PlcTerm -> Check
forall a b. (a -> b) -> a -> b
$ PlcTerm -> PlcTerm -> PlcTerm
quotientInteger PlcTerm
a PlcTerm
zero

-- `remainderInteger _ 0` always fails.
prop_rem_0_fails :: BigInteger -> Check
prop_rem_0_fails :: BigInteger -> Check
prop_rem_0_fails (BigInteger -> PlcTerm
biginteger -> PlcTerm
a) =
  PlcTerm -> Check
CheckFails (PlcTerm -> Check) -> PlcTerm -> Check
forall a b. (a -> b) -> a -> b
$ PlcTerm -> PlcTerm -> PlcTerm
remainderInteger PlcTerm
a PlcTerm
zero

-- b /= 0 => a = b * (a `quot` b) + (a `rem` b)
-- This is the crucial property relating `quotientInteger` and `remainderInteger`.
prop_quot_rem_compatible :: BigInteger -> NonZero BigInteger -> Check
prop_quot_rem_compatible :: BigInteger -> NonZero BigInteger -> Check
prop_quot_rem_compatible (BigInteger -> PlcTerm
biginteger -> PlcTerm
a) (NonZero (BigInteger -> PlcTerm
biginteger -> PlcTerm
b)) =
  let t :: PlcTerm
t = PlcTerm -> PlcTerm -> PlcTerm
addInteger (PlcTerm -> PlcTerm -> PlcTerm
multiplyInteger PlcTerm
b (PlcTerm -> PlcTerm -> PlcTerm
quotientInteger PlcTerm
a PlcTerm
b)) (PlcTerm -> PlcTerm -> PlcTerm
remainderInteger PlcTerm
a PlcTerm
b)
   in PlcTerm -> PlcTerm -> Check
CheckEq PlcTerm
t PlcTerm
a

-- (k*b) `quot` b = k and (k*b) `rem` b = 0 for all k
prop_quot_rem_multiple :: BigInteger -> NonZero BigInteger -> Check
prop_quot_rem_multiple :: BigInteger -> NonZero BigInteger -> Check
prop_quot_rem_multiple (BigInteger -> PlcTerm
biginteger -> PlcTerm
k) (NonZero (BigInteger -> PlcTerm
biginteger -> PlcTerm
b)) =
  let t1 :: PlcTerm
t1 = PlcTerm -> PlcTerm -> PlcTerm
quotientInteger (PlcTerm -> PlcTerm -> PlcTerm
multiplyInteger PlcTerm
k PlcTerm
b) PlcTerm
b
      t2 :: PlcTerm
t2 = PlcTerm -> PlcTerm -> PlcTerm
remainderInteger (PlcTerm -> PlcTerm -> PlcTerm
multiplyInteger PlcTerm
k PlcTerm
b) PlcTerm
b
   in Check -> Check -> Check
CheckBoth (PlcTerm -> PlcTerm -> Check
CheckEq PlcTerm
t1 PlcTerm
k) (PlcTerm -> PlcTerm -> Check
CheckEq PlcTerm
t2 PlcTerm
zero)

-- `remainderInteger _ b` is not an additive homomorphism in general (and hence
-- not periodic) because the sign of `remainderInteger a b` is different for
-- positive and negative a.  For example (writing `rem` for short instead of
-- `remainderInteger`) `rem (-1) 5 = -1` and `rem 5 5 = 0` but `rem (-1+5) 5 =
-- 4`.  However, rem (a + a') b = rem ((rem a b) + (rem a' b)) b if a and a'
-- have the same sign, so we test that instead of checking for arbitrary a and
-- a'.

-- For fixed b, `remainderInteger _ b` is an additive homomorphism on non-negative integers
-- (a+a') `rem` b = ((a `rem` b) + (a' `rem` b)) `rem` b
prop_rem_additive_pos
  :: NonNegative BigInteger -> NonNegative BigInteger -> NonZero BigInteger -> Check
prop_rem_additive_pos :: NonNegative BigInteger
-> NonNegative BigInteger -> NonZero BigInteger -> Check
prop_rem_additive_pos (NonNegative (BigInteger -> PlcTerm
biginteger -> PlcTerm
a)) (NonNegative (BigInteger -> PlcTerm
biginteger -> PlcTerm
a')) (NonZero (BigInteger -> PlcTerm
biginteger -> PlcTerm
b)) =
  let t1 :: PlcTerm
t1 = PlcTerm -> PlcTerm -> PlcTerm
remainderInteger (PlcTerm -> PlcTerm -> PlcTerm
addInteger PlcTerm
a PlcTerm
a') PlcTerm
b
      t2 :: PlcTerm
t2 = PlcTerm -> PlcTerm -> PlcTerm
remainderInteger (PlcTerm -> PlcTerm -> PlcTerm
addInteger (PlcTerm -> PlcTerm -> PlcTerm
remainderInteger PlcTerm
a PlcTerm
b) (PlcTerm -> PlcTerm -> PlcTerm
remainderInteger PlcTerm
a' PlcTerm
b)) PlcTerm
b
   in PlcTerm -> PlcTerm -> Check
CheckEq PlcTerm
t1 PlcTerm
t2

-- For fixed b, `remainderInteger _ b` is an additive homomorphism on non-postive integers
-- (a+a') `rem` b = ((a `rem` b) + (a' `rem` b)) `rem` b
prop_rem_additive_neg
  :: NonPositive BigInteger -> NonPositive BigInteger -> NonZero BigInteger -> Check
prop_rem_additive_neg :: NonPositive BigInteger
-> NonPositive BigInteger -> NonZero BigInteger -> Check
prop_rem_additive_neg (NonPositive (BigInteger -> PlcTerm
biginteger -> PlcTerm
a)) (NonPositive (BigInteger -> PlcTerm
biginteger -> PlcTerm
a')) (NonZero (BigInteger -> PlcTerm
biginteger -> PlcTerm
b)) =
  let t1 :: PlcTerm
t1 = PlcTerm -> PlcTerm -> PlcTerm
remainderInteger (PlcTerm -> PlcTerm -> PlcTerm
addInteger PlcTerm
a PlcTerm
a') PlcTerm
b
      t2 :: PlcTerm
t2 = PlcTerm -> PlcTerm -> PlcTerm
remainderInteger (PlcTerm -> PlcTerm -> PlcTerm
addInteger (PlcTerm -> PlcTerm -> PlcTerm
remainderInteger PlcTerm
a PlcTerm
b) (PlcTerm -> PlcTerm -> PlcTerm
remainderInteger PlcTerm
a' PlcTerm
b)) PlcTerm
b
   in PlcTerm -> PlcTerm -> Check
CheckEq PlcTerm
t1 PlcTerm
t2

-- Somewhat unexpectedly, for fixed b, `remainderInteger _ b` is a
-- multiplicative homomorphism: : (a*a') `rem` b = ((a `rem` b) * (a' `rem` b))
-- `rem` b
prop_rem_multiplicative :: BigInteger -> BigInteger -> NonZero BigInteger -> Check
prop_rem_multiplicative :: BigInteger -> BigInteger -> NonZero BigInteger -> Check
prop_rem_multiplicative (BigInteger -> PlcTerm
biginteger -> PlcTerm
a) (BigInteger -> PlcTerm
biginteger -> PlcTerm
a') (NonZero (BigInteger -> PlcTerm
biginteger -> PlcTerm
b)) =
  let t1 :: PlcTerm
t1 = PlcTerm -> PlcTerm -> PlcTerm
remainderInteger (PlcTerm -> PlcTerm -> PlcTerm
multiplyInteger PlcTerm
a PlcTerm
a') PlcTerm
b
      t2 :: PlcTerm
t2 = PlcTerm -> PlcTerm -> PlcTerm
remainderInteger (PlcTerm -> PlcTerm -> PlcTerm
multiplyInteger (PlcTerm -> PlcTerm -> PlcTerm
remainderInteger PlcTerm
a PlcTerm
b) (PlcTerm -> PlcTerm -> PlcTerm
remainderInteger PlcTerm
a' PlcTerm
b)) PlcTerm
b
   in PlcTerm -> PlcTerm -> Check
CheckEq PlcTerm
t1 PlcTerm
t2

-- For a >= 0 and b > 0, 0 <= |a `rem` b| < |b|
-- The sign of the remainder is a bit tricky in this case.  We test that the
-- absolute value of the remainder is in the expected range and leave the sign
-- to later tests.
prop_rem_size :: BigInteger -> NonZero BigInteger -> Check
prop_rem_size :: BigInteger -> NonZero BigInteger -> Check
prop_rem_size (BigInteger -> PlcTerm
biginteger -> PlcTerm
a) (NonZero (BigInteger -> PlcTerm
biginteger -> PlcTerm
b)) =
  let r :: PlcTerm
r = PlcTerm -> PlcTerm
abs (PlcTerm -> PlcTerm -> PlcTerm
remainderInteger PlcTerm
a PlcTerm
b)
      t1 :: PlcTerm
t1 = PlcTerm -> PlcTerm -> PlcTerm
lessThanEqualsInteger PlcTerm
zero PlcTerm
r
      t2 :: PlcTerm
t2 = PlcTerm -> PlcTerm -> PlcTerm
lessThanInteger PlcTerm
r (PlcTerm -> PlcTerm
abs PlcTerm
b)
   in Check -> Check -> Check
CheckBoth (PlcTerm -> Check
CheckTrue PlcTerm
t1) (PlcTerm -> Check
CheckTrue PlcTerm
t2)

-- a >= 0 && b > 0  =>  a `quot` b >= 0  and  a `rem` b >= 0
-- a <= 0 && b > 0  =>  a `quot` b <= 0  and  a `rem` b <= 0
-- a >= 0 && b < 0  =>  a `quot` b <= 0  and  a `rem` b >= 0
-- a <= 0 && b < 0  =>  a `quot` b >= 0  and  a `rem` b <= 0

prop_quot_pos_pos :: NonNegative BigInteger -> Positive BigInteger -> Check
prop_quot_pos_pos :: NonNegative BigInteger -> Positive BigInteger -> Check
prop_quot_pos_pos (NonNegative (BigInteger -> PlcTerm
biginteger -> PlcTerm
a)) (Positive (BigInteger -> PlcTerm
biginteger -> PlcTerm
b)) =
  PlcTerm -> Check
CheckTrue (PlcTerm -> Check) -> PlcTerm -> Check
forall a b. (a -> b) -> a -> b
$ PlcTerm -> PlcTerm
ge0 (PlcTerm -> PlcTerm -> PlcTerm
quotientInteger PlcTerm
a PlcTerm
b)

prop_quot_neg_pos :: NonPositive BigInteger -> Positive BigInteger -> Check
prop_quot_neg_pos :: NonPositive BigInteger -> Positive BigInteger -> Check
prop_quot_neg_pos (NonPositive (BigInteger -> PlcTerm
biginteger -> PlcTerm
a)) (Positive (BigInteger -> PlcTerm
biginteger -> PlcTerm
b)) =
  PlcTerm -> Check
CheckTrue (PlcTerm -> Check) -> PlcTerm -> Check
forall a b. (a -> b) -> a -> b
$ PlcTerm -> PlcTerm
le0 (PlcTerm -> PlcTerm -> PlcTerm
quotientInteger PlcTerm
a PlcTerm
b)

prop_quot_pos_neg :: NonNegative BigInteger -> Negative BigInteger -> Check
prop_quot_pos_neg :: NonNegative BigInteger -> Negative BigInteger -> Check
prop_quot_pos_neg (NonNegative (BigInteger -> PlcTerm
biginteger -> PlcTerm
a)) (Negative (BigInteger -> PlcTerm
biginteger -> PlcTerm
b)) =
  PlcTerm -> Check
CheckTrue (PlcTerm -> Check) -> PlcTerm -> Check
forall a b. (a -> b) -> a -> b
$ PlcTerm -> PlcTerm
le0 (PlcTerm -> PlcTerm -> PlcTerm
quotientInteger PlcTerm
a PlcTerm
b)

prop_quot_neg_neg :: NonPositive BigInteger -> Negative BigInteger -> Check
prop_quot_neg_neg :: NonPositive BigInteger -> Negative BigInteger -> Check
prop_quot_neg_neg (NonPositive (BigInteger -> PlcTerm
biginteger -> PlcTerm
a)) (Negative (BigInteger -> PlcTerm
biginteger -> PlcTerm
b)) =
  PlcTerm -> Check
CheckTrue (PlcTerm -> Check) -> PlcTerm -> Check
forall a b. (a -> b) -> a -> b
$ PlcTerm -> PlcTerm
ge0 (PlcTerm -> PlcTerm -> PlcTerm
quotientInteger PlcTerm
a PlcTerm
b)

prop_rem_pos_pos :: (NonNegative BigInteger) -> (Positive BigInteger) -> Check
prop_rem_pos_pos :: NonNegative BigInteger -> Positive BigInteger -> Check
prop_rem_pos_pos (NonNegative (BigInteger -> PlcTerm
biginteger -> PlcTerm
a)) (Positive (BigInteger -> PlcTerm
biginteger -> PlcTerm
b)) =
  PlcTerm -> Check
CheckTrue (PlcTerm -> Check) -> PlcTerm -> Check
forall a b. (a -> b) -> a -> b
$ PlcTerm -> PlcTerm
ge0 (PlcTerm -> PlcTerm -> PlcTerm
remainderInteger PlcTerm
a PlcTerm
b)

prop_rem_neg_pos :: (NonPositive BigInteger) -> (Positive BigInteger) -> Check
prop_rem_neg_pos :: NonPositive BigInteger -> Positive BigInteger -> Check
prop_rem_neg_pos (NonPositive (BigInteger -> PlcTerm
biginteger -> PlcTerm
a)) (Positive (BigInteger -> PlcTerm
biginteger -> PlcTerm
b)) =
  PlcTerm -> Check
CheckTrue (PlcTerm -> Check) -> PlcTerm -> Check
forall a b. (a -> b) -> a -> b
$ PlcTerm -> PlcTerm
le0 (PlcTerm -> PlcTerm -> PlcTerm
remainderInteger PlcTerm
a PlcTerm
b)

prop_rem_pos_neg :: (NonNegative BigInteger) -> (Negative BigInteger) -> Check
prop_rem_pos_neg :: NonNegative BigInteger -> Negative BigInteger -> Check
prop_rem_pos_neg (NonNegative (BigInteger -> PlcTerm
biginteger -> PlcTerm
a)) (Negative (BigInteger -> PlcTerm
biginteger -> PlcTerm
b)) =
  PlcTerm -> Check
CheckTrue (PlcTerm -> Check) -> PlcTerm -> Check
forall a b. (a -> b) -> a -> b
$ PlcTerm -> PlcTerm
ge0 (PlcTerm -> PlcTerm -> PlcTerm
remainderInteger PlcTerm
a PlcTerm
b)

prop_rem_neg_neg :: (NonPositive BigInteger) -> (Negative BigInteger) -> Check
prop_rem_neg_neg :: NonPositive BigInteger -> Negative BigInteger -> Check
prop_rem_neg_neg (NonPositive (BigInteger -> PlcTerm
biginteger -> PlcTerm
a)) (Negative (BigInteger -> PlcTerm
biginteger -> PlcTerm
b)) =
  PlcTerm -> Check
CheckTrue (PlcTerm -> Check) -> PlcTerm -> Check
forall a b. (a -> b) -> a -> b
$ PlcTerm -> PlcTerm
le0 (PlcTerm -> PlcTerm -> PlcTerm
remainderInteger PlcTerm
a PlcTerm
b)

-- | Run the properties without writing files, retaining the usual test count.
test_integer_quot_rem_properties :: TestTree
test_integer_quot_rem_properties :: TestTree
test_integer_quot_rem_properties =
  TestName -> [TestTree] -> TestTree
testGroup TestName
"Property tests for quotientInteger and remainderInteger" ([TestTree] -> TestTree) -> [TestTree] -> TestTree
forall a b. (a -> b) -> a -> b
$
    (Property -> Property) -> [PropertySpec (Gen Check)] -> [TestTree]
testPropertySpecs (Int -> Property -> Property
forall prop. Testable prop => Int -> prop -> Property
BaseQC.withNumTests Int
numberOfTests) [PropertySpec (Gen Check)]
integerQuotRemProperties

-- | Properties shared by the test suite and the conformance test generator.
integerQuotRemProperties :: [PropertySpec (Gen Check)]
integerQuotRemProperties :: [PropertySpec (Gen Check)]
integerQuotRemProperties =
  [ TestName
-> TestName -> (BigInteger -> Check) -> PropertySpec (Gen Check)
forall prop.
GenerateCases prop =>
TestName -> TestName -> prop -> PropertySpec (Gen Check)
propertySpec TestName
"quot_0_fails" TestName
"quotientInteger _ 0 always fails" BigInteger -> Check
prop_quot_0_fails
  , TestName
-> TestName -> (BigInteger -> Check) -> PropertySpec (Gen Check)
forall prop.
GenerateCases prop =>
TestName -> TestName -> prop -> PropertySpec (Gen Check)
propertySpec TestName
"rem_0_fails" TestName
"remainderInteger _ 0 always fails" BigInteger -> Check
prop_rem_0_fails
  , TestName
-> TestName
-> (BigInteger -> NonZero BigInteger -> Check)
-> PropertySpec (Gen Check)
forall prop.
GenerateCases prop =>
TestName -> TestName -> prop -> PropertySpec (Gen Check)
propertySpec
      TestName
"quot_rem_compatible"
      TestName
"quotientInteger and remainderInteger are compatible"
      BigInteger -> NonZero BigInteger -> Check
prop_quot_rem_compatible
  , TestName
-> TestName
-> (BigInteger -> NonZero BigInteger -> Check)
-> PropertySpec (Gen Check)
forall prop.
GenerateCases prop =>
TestName -> TestName -> prop -> PropertySpec (Gen Check)
propertySpec
      TestName
"quot_rem_multiple"
      TestName
"quotientInteger and remainderInteger behave sensibly on multiples of the divisor"
      BigInteger -> NonZero BigInteger -> Check
prop_quot_rem_multiple
  , TestName
-> TestName
-> (NonNegative BigInteger
    -> NonNegative BigInteger -> NonZero BigInteger -> Check)
-> PropertySpec (Gen Check)
forall prop.
GenerateCases prop =>
TestName -> TestName -> prop -> PropertySpec (Gen Check)
propertySpec
      TestName
"rem_additive_pos"
      TestName
"remainderInteger _ b is additive on non-negative inputs"
      NonNegative BigInteger
-> NonNegative BigInteger -> NonZero BigInteger -> Check
prop_rem_additive_pos
  , TestName
-> TestName
-> (NonPositive BigInteger
    -> NonPositive BigInteger -> NonZero BigInteger -> Check)
-> PropertySpec (Gen Check)
forall prop.
GenerateCases prop =>
TestName -> TestName -> prop -> PropertySpec (Gen Check)
propertySpec
      TestName
"rem_additive_neg"
      TestName
"remainderInteger _ b is additive on non-positive inputs"
      NonPositive BigInteger
-> NonPositive BigInteger -> NonZero BigInteger -> Check
prop_rem_additive_neg
  , TestName
-> TestName
-> (BigInteger -> BigInteger -> NonZero BigInteger -> Check)
-> PropertySpec (Gen Check)
forall prop.
GenerateCases prop =>
TestName -> TestName -> prop -> PropertySpec (Gen Check)
propertySpec
      TestName
"rem_multiplicative"
      TestName
"remainderInteger is a multiplicative homomorphism"
      BigInteger -> BigInteger -> NonZero BigInteger -> Check
prop_rem_multiplicative
  , TestName
-> TestName
-> (BigInteger -> NonZero BigInteger -> Check)
-> PropertySpec (Gen Check)
forall prop.
GenerateCases prop =>
TestName -> TestName -> prop -> PropertySpec (Gen Check)
propertySpec TestName
"rem_size" TestName
"remainderInteger size correct" BigInteger -> NonZero BigInteger -> Check
prop_rem_size
  , TestName
-> TestName
-> (NonNegative BigInteger -> Positive BigInteger -> Check)
-> PropertySpec (Gen Check)
forall prop.
GenerateCases prop =>
TestName -> TestName -> prop -> PropertySpec (Gen Check)
propertySpec TestName
"quot_pos_pos" TestName
"quotientInteger (>= 0) (> 0) >= 0" NonNegative BigInteger -> Positive BigInteger -> Check
prop_quot_pos_pos
  , TestName
-> TestName
-> (NonPositive BigInteger -> Positive BigInteger -> Check)
-> PropertySpec (Gen Check)
forall prop.
GenerateCases prop =>
TestName -> TestName -> prop -> PropertySpec (Gen Check)
propertySpec TestName
"quot_neg_pos" TestName
"quotientInteger (<= 0) (> 0) <= 0" NonPositive BigInteger -> Positive BigInteger -> Check
prop_quot_neg_pos
  , TestName
-> TestName
-> (NonNegative BigInteger -> Negative BigInteger -> Check)
-> PropertySpec (Gen Check)
forall prop.
GenerateCases prop =>
TestName -> TestName -> prop -> PropertySpec (Gen Check)
propertySpec TestName
"quot_pos_neg" TestName
"quotientInteger (>= 0) (< 0) <= 0" NonNegative BigInteger -> Negative BigInteger -> Check
prop_quot_pos_neg
  , TestName
-> TestName
-> (NonPositive BigInteger -> Negative BigInteger -> Check)
-> PropertySpec (Gen Check)
forall prop.
GenerateCases prop =>
TestName -> TestName -> prop -> PropertySpec (Gen Check)
propertySpec TestName
"quot_neg_neg" TestName
"quotientInteger (<= 0) (< 0) >= 0" NonPositive BigInteger -> Negative BigInteger -> Check
prop_quot_neg_neg
  , TestName
-> TestName
-> (NonNegative BigInteger -> Positive BigInteger -> Check)
-> PropertySpec (Gen Check)
forall prop.
GenerateCases prop =>
TestName -> TestName -> prop -> PropertySpec (Gen Check)
propertySpec TestName
"rem_pos_pos" TestName
"remainderInteger (>= 0) (> 0) >= 0" NonNegative BigInteger -> Positive BigInteger -> Check
prop_rem_pos_pos
  , TestName
-> TestName
-> (NonPositive BigInteger -> Positive BigInteger -> Check)
-> PropertySpec (Gen Check)
forall prop.
GenerateCases prop =>
TestName -> TestName -> prop -> PropertySpec (Gen Check)
propertySpec TestName
"rem_neg_pos" TestName
"remainderInteger (<= 0) (> 0) <= 0" NonPositive BigInteger -> Positive BigInteger -> Check
prop_rem_neg_pos
  , TestName
-> TestName
-> (NonNegative BigInteger -> Negative BigInteger -> Check)
-> PropertySpec (Gen Check)
forall prop.
GenerateCases prop =>
TestName -> TestName -> prop -> PropertySpec (Gen Check)
propertySpec TestName
"rem_pos_neg" TestName
"remainderInteger (>= 0) (< 0) >= 0" NonNegative BigInteger -> Negative BigInteger -> Check
prop_rem_pos_neg
  , TestName
-> TestName
-> (NonPositive BigInteger -> Negative BigInteger -> Check)
-> PropertySpec (Gen Check)
forall prop.
GenerateCases prop =>
TestName -> TestName -> prop -> PropertySpec (Gen Check)
propertySpec TestName
"rem_neg_neg" TestName
"remainderInteger (<= 0) (< 0) <= 0" NonPositive BigInteger -> Negative BigInteger -> Check
prop_rem_neg_neg
  ]

generate_integer_quot_rem_properties
  :: OutputFormat -> CheckMode -> PropertyFilter -> FilePath -> Int -> QCGen -> IO [PropertyReport]
generate_integer_quot_rem_properties :: OutputFormat
-> CheckMode
-> PropertyFilter
-> TestName
-> Int
-> QCGen
-> IO [PropertyReport]
generate_integer_quot_rem_properties OutputFormat
format CheckMode
mode PropertyFilter
include TestName
outputDir Int
numFiles QCGen
seed =
  OutputFormat
-> CheckMode
-> PropertyFilter
-> TestName
-> Int
-> QCGen
-> [TestName]
-> [PropertySpec (Gen Check)]
-> IO [PropertyReport]
generatePropertySpecs
    OutputFormat
format
    CheckMode
mode
    PropertyFilter
include
    TestName
outputDir
    Int
numFiles
    QCGen
seed
    [TestName]
conformanceSuiteDirectory
    [PropertySpec (Gen Check)]
integerQuotRemProperties

-- | Qualified property names, without sampling inputs or evaluating checks.
integer_quot_rem_property_names :: [PropertyId]
integer_quot_rem_property_names :: [PropertyId]
integer_quot_rem_property_names =
  [TestName] -> [PropertySpec (Gen Check)] -> [PropertyId]
forall gen. [TestName] -> [PropertySpec gen] -> [PropertyId]
propertySpecPropertyIds [TestName]
conformanceSuiteDirectory [PropertySpec (Gen Check)]
integerQuotRemProperties

conformanceSuiteDirectory :: [String]
conformanceSuiteDirectory :: [TestName]
conformanceSuiteDirectory = [TestName
"integer", TestName
"QuotRemProperties"]