Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix PIR term shrinking #5981

Closed
Tracked by #5982
zliu41 opened this issue May 15, 2024 · 1 comment
Closed
Tracked by #5982

Fix PIR term shrinking #5981

zliu41 opened this issue May 15, 2024 · 1 comment
Labels

Comments

@zliu41
Copy link
Member

zliu41 commented May 15, 2024

  1. Shrinking is sometimes slow because a large number of shrinks are generated. See this comment.
  2. There was a test failure on prop_shrinkTermSound :
unpacking sources
unpacking source archive /nix/store/lkm426ykvh3q7y0iqx9lp1zj6pgvpcsb-plutus-root-plutus-core-test-plutus-ir-test-root
source root is plutus-root-plutus-core-test-plutus-ir-test-root
patching sources
building
plutus-ir
  prettyprinting
    basic:                                              OK
    maybe:                                              OK
  prettyprintingReadable
    basic:                                              OK
    maybe:                                              OK
    letInLet:                                           OK
    letDep:                                             OK
    listMatch:                                          OK
    idleAll:                                            OK
    some:                                               OK
    even3:                                              OK
    stupidZero:                                         OK
    mutuallyRecursiveValues:                            OK
    errorBinding:                                       OK
    some:                                               OK
    stupidZero:                                         OK
    recursiveTypeBind:                                  OK
  parsing
    parser round-trip:                                  OK (0.48s)
        ✓ propRoundTrip passed 100 tests.
    parser ignores whitespace:                          OK (2.21s)
        ✓ propIgnores whitespace passed 100 tests.
    parser ignores comments:                            OK (27.73s)
        ✓ propIgnores comments passed 100 tests.
  lets
    letInLet:                                           OK
    letDep:                                             OK
  datatypes
    maybe:                                              OK
    listMatch:                                          OK
    idleAll:                                            OK
    some:                                               OK
    listMatchEval:                                      OK
    dataEscape:                                         OK
  recursion
    factorial:                                          OK
    even3:                                              OK (0.02s)
    even3Eval:                                          OK (0.03s)
    stupidZero:                                         OK
    mutuallyRecursiveValues:                            OK (0.02s)
    errorBinding:                                       OK
  serialization
    serializeBasic:                                     OK
    serializeMaybePirTerm:                              OK
    serializeEvenOdd:                                   OK
    serializeListMatch:                                 OK
  errors
    mutuallyRecursiveTypes:                             OK
    recursiveTypeBind:                                  OK
  names
    renamer does not destroy scoping:                   OK (0.16s)
        ✓ test_scopingGood passed 100 tests.
    scoping bad
      wrong renaming destroys scoping:                  OK
      no renaming does not result in global uniqueness: OK
      renaming with no marking destroys scoping:        OK
  transform
    thunkRecursions
      listFold:                                         OK
      monoMap:                                          OK
      errorBinding:                                     OK
    nonStrict
      nonStrict1:                                       OK
    letFloat
      letInLet:                                         OK
      listMatch:                                        OK
      maybe:                                            OK
      ifError:                                          OK
      mutuallyRecursiveTypes:                           OK
      mutuallyRecursiveValues:                          OK
      nonrec1:                                          OK
      nonrec2:                                          OK
      nonrec3:                                          OK
      nonrec4:                                          OK
      nonrec6:                                          OK
      nonrec7:                                          OK
      nonrec8:                                          OK
      nonrec9:                                          OK
      rec1:                                             OK
      rec2:                                             OK
      rec3:                                             OK
      rec4:                                             OK
      nonrecToRec:                                      OK
      nonrecToNonrec:                                   OK
      oldLength:                                        OK
      strictValue:                                      OK
      strictNonValue:                                   OK
      strictNonValue2:                                  OK
      strictNonValue3:                                  OK
      strictValueNonValue:                              OK
      strictValueValue:                                 OK
      even3Eval:                                        OK
      strictNonValueDeep:                               OK
      oldFloatBug:                                      OK
      outRhs:                                           OK
      outLam:                                           OK
      inLam:                                            OK
      rhsSqueezeVsNest:                                 OK
    recSplit
      truenonrec:                                       OK
      mutuallyRecursiveTypes:                           OK
      mutuallyRecursiveValues:                          OK
      selfrecursive:                                    OK
      small:                                            OK
      big:                                              OK
    inline
      var:                                              OK
      builtin:                                          OK
      constant:                                         OK
      transitive:                                       OK
      tyvar:                                            OK
      single:                                           OK
      immediateVar:                                     OK
      immediateApp:                                     OK
    beta
      lamapp:                                           OK
      lamapp2:                                          OK
      absapp:                                           OK
      multiapp:                                         OK
      multilet:                                         OK
    unwrapCancel
      unwrapWrap:                                       OK
      wrapUnwrap:                                       OK
    deadCode
      typeLet:                                          OK
      termLet:                                          OK
      strictLet:                                        OK
      nonstrictLet:                                     OK
      datatypeLiveType:                                 OK
      datatypeLiveConstr:                               OK
      datatypeLiveDestr:                                OK
      datatypeDead:                                     OK
      singleBinding:                                    OK
      builtinBinding:                                   OK
      etaBuiltinBinding:                                OK
      nestedBindings:                                   OK
      nestedBindingsIndirect:                           OK
      recBindingSimple:                                 OK
      recBindingComplex:                                OK
      pruneDatatype:                                    OK
    retainedSize
      typeLet:                                          OK
      termLet:                                          OK
      strictLet:                                        OK
      nonstrictLet:                                     OK
      datatypeLiveType:                                 OK
      datatypeLiveConstr:                               OK
      datatypeLiveDestr:                                OK
      datatypeDead:                                     OK
      singleBinding:                                    OK
      builtinBinding:                                   OK
      etaBuiltinBinding:                                OK
      etaBuiltinBindingUsed:                            OK
      nestedBindings:                                   OK
      nestedBindingsIndirect:                           OK
      recBindingSimple:                                 OK
      recBindingComplex:                                OK
    rename
      allShadowedDataNonRec:                            OK
      allShadowedDataRec:                               OK
      paramShadowedDataNonRec:                          OK
      paramShadowedDataRec:                             OK
  types
    letInLet:                                           OK
    listMatch:                                          OK
    maybe:                                              OK
    ifError:                                            OK
    mutuallyRecursiveTypes:                             OK
    mutuallyRecursiveValues:                            OK
    nonrec1:                                            OK
    nonrec2:                                            OK
    nonrec3:                                            OK
    nonrec4:                                            OK
    nonrec6:                                            OK
    nonrec7:                                            OK
    nonrec8:                                            OK
    rec1:                                               OK
    rec2:                                               OK
    rec3:                                               OK
    rec4:                                               OK
    nonrecToRec:                                        OK
    nonrecToNonrec:                                     OK
    oldLength:                                          OK
    strictValue:                                        OK
    strictNonValue:                                     OK
    strictNonValue2:                                    OK
    strictNonValue3:                                    OK
    strictValueNonValue:                                OK
    strictValueValue:                                   OK
    strictNonValueDeep:                                 OK
    even3Eval:                                          OK
    sameNameDifferentEnv:                               OK
    typeLet:                                            OK
    typeLetRec:                                         OK
  type-errors
    wrongDataConstrReturnType:                          OK
    nonSelfRecursive:                                   OK
    typeLet:                                            OK
  generators
    prop_genData:                                       OK (8.23s)
      +++ OK, passed 3000 tests.
    prop_genKindCorrect:                                OK (4.93s)
      +++ OK, passed 100000 tests.
    prop_shrinkTypeSound:                               OK (12.88s)
      +++ OK, passed 30000 tests.
    prop_substType:                                     OK (2.55s)
      +++ OK, passed 10000 tests.
    prop_unify:                                         OK (5.37s)
      +++ OK, passed 10000 tests; 63676 discarded.
      
      sizes (10000 in total):
      84.72% 1
      11.30% 0
       2.91% 2
       0.98% 3
       0.09% 4
    prop_genTypeCorrect:                                OK (13.63s)
      +++ OK, passed 10000 tests.
    prop_genWellTypedFullyApplied:                      OK (4.87s)
      +++ OK, passed 1000 tests.
    prop_findInstantiation:                             OK (1.52s)
      +++ OK, passed 10000 tests.
    prop_inhabited:                                     OK (6.21s)
      +++ OK, passed 3000 tests.
    prop_stats_numShrink:                               OK (3.81s)
      +++ OK, passed 40 tests.
      
      distribution | duplicates (40 in total):
      62%          | 0%
      22%          | 5%
      10%          | 10%
       2%          | 15%
       2%          | 20%
    prop_noTermShrinkLoops:                             OK (6.83s)
      +++ OK, passed 40 tests.
    prop_shrinkTermSound:                               FAIL
      *** Failed! Falsified (after 3 tests and 3 shrinks):
      ty,tm = ( integer -> d4_4
      , let data d4_4 | m2_2 where
              
        in error {integer -> d4_4} )
      [ E019: Error during PIR typechecking:
      Free type variable at  () :  d4
      , E019: Error during PIR typechecking:
      Free type variable at  () :  d4
      , E019: Error during PIR typechecking:
      Free type variable at  () :  d4 ]
      Use --quickcheck-replay=257544 to reproduce.
      Use -p '/prop_shrinkTermSound/' to rerun this test only.

1 out of 184 tests failed (102.05s)

Extricated from https://input-output.atlassian.net/browse/PLT-1333

@github-actions github-actions bot added the status: needs triage GH issues that requires triage label May 15, 2024
@zliu41 zliu41 removed the status: needs triage GH issues that requires triage label May 15, 2024
@zliu41 zliu41 mentioned this issue May 15, 2024
6 tasks
@effectfully
Copy link
Contributor

There was a test failure on prop_shrinkTermSound:

I can no longer reproduce it.

Closing in favor of #6084 6531.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants