Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • sac2c sac2c
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 395
    • Issues 395
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 24
    • Merge requests 24
  • Deployments
    • Deployments
    • Releases
  • Wiki
    • Wiki
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • sac-group
  • sac2csac2c
  • Issues
  • #1046
Closed
Open
Created Nov 13, 2009 by Robert Bernecky@rbeDeveloper

Odd behavior of and()

Bugzilla Link 592
Created on Nov 13, 2009 22:09
Version 1.00beta
OS Linux
Architecture PC

Extended Description

I was looking at match() code, and noted that it uses 
fold. At that point, I began to wonder if foldfix was
working not working, or integrated into fold. 
So, I wrote this here function:
use Array:all;
use StdIO:{print};
int main()
{
 b = genarray([200000000], true);
 z = any (b);
 print(z);
 return(0);
}
 
It generates this WL:
  _pinl_225_res = with {
        ([ 0 ] <= _pinl_223_iv=[_pinl_226__eat_12] < [ 200000000 ])
        {
          _pinl_227__ea_165_res = _accu_( _pinl_223_iv);
          _pinl_233__217__flat_13 = _or_SxS_( _pinl_227__ea_165_res, _flat_1);
        } : _pinl_233__217__flat_13 ;
 } :
      fold( ScalarArith::|, _pinl_222__flat_6);
From what I can tell, that the fold WL does not quick-stop, suggesting
that foldfix is broken, non-existent, or something else. 
However, more interesting is the slight variant on the above, when you change
the "true" to false. Then, it generates this:
 _pinl_225_res = false;
This suggested to me that the typechecker might be detecting
one possible reduction identity case, but not the other.
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking