

<!DOCTYPE html>
<!-- Server: sfs-forge-4 -->


    

















<html lang="en" class="no-js">
<head>
    <meta content="text/html; charset=UTF-8" http-equiv="content-type"/>
    <title>
  XSB / Src  (SVN)-old /
  [r3173]
  /trunk/XSB/docs/userman/rbltin.tex
</title>
    

<meta name="viewport" content="width=1100">


<link rel="icon" sizes="180x180" href="https://a.fsdn.com/con/img/sandiego/logo-180x180.png" type="image/png">
<link rel="icon" sizes="any" href="https://a.fsdn.com/con/img/sandiego/svg/originals/sf-icon-orange-no_sf.svg" type="image/svg+xml">
<link rel="apple-touch-icon" sizes="180x180" href="https://a.fsdn.com/con/img/sandiego/logo-180x180.png">
<link rel="mask-icon" href="https://a.fsdn.com/con/img/sandiego/svg/originals/sf-icon-orange-no_sf.svg" color="#FF6600">


<script src="https://a.fsdn.com/allura/nf/1752257864/_ew_/theme/sftheme/js/sftheme/cmp2.js"></script>






    
    
    
    
    
    
    
    
    <link rel="stylesheet" href="https://a.fsdn.com/con/css/lato.css?">


<script>
if (!window.SF) { window.SF = {}; }
SF.sandiego = false;
SF.sandiego_chrome = true;
SF.cdn = "https://a.fsdn.com/con";
SF.fpid = 'fe8a3368-0397-4949-a368-04d70836971b';
SF.billboard_route = '/software/product/$slug/';
</script>
    
        <!-- ew:head_css -->

    
        <link rel="stylesheet"
                type="text/css"
                href="https://a.fsdn.com/allura/nf/1752257864/_ew_/_slim/css?href=allura%2Fcss%2Fforge%2Fhilite.css%3Ballura%2Fcss%2Fforge%2Ftooltipster.css"
                >
    
        <link rel="stylesheet"
                type="text/css"
                href="https://a.fsdn.com/allura/nf/1752257864/_ew_/allura/css/font-awesome.min.css"
                >
    
        <link rel="stylesheet"
                type="text/css"
                href="https://a.fsdn.com/allura/nf/1752257864/_ew_/theme/sftheme/css/forge.css"
                >
    
        
<!-- /ew:head_css -->

    
    
        <!-- ew:head_js -->

    
        <script type="text/javascript" src="https://a.fsdn.com/allura/nf/1752257864/_ew_/_slim/js?href=allura%2Fjs%2Fjquery-3.6.0.min.js%3Ballura%2Fjs%2Fjquery.cookie-1.4.1.js%3Btheme%2Fsftheme%2Fjs%2Fsftheme%2Fshared_head.js%3Btheme%2Fsftheme%2Fjs%2Fsftheme%2Ftypescript%2Fcompliance.js"></script>
    
        
<!-- /ew:head_js -->

    

    
        <style type="text/css">
            /* make URL &amp; Project custom fields in support tickets not get hidden as much */
.project-forge.mountpoint-site-support .view_holder .grid-4:nth-child(5),
.project-forge.mountpoint-site-support .view_holder .grid-4:nth-child(6) {
  overflow: visible;
  font-size: 22px;
  width: 340px;
  line-height: 1;
  margin-bottom: 5px;
}
.project-forge.mountpoint-site-support .view_holder .grid-4:nth-child(5) label, .project-forge.mountpoint-site-support .view_holder .grid-4:nth-child(6) label {
  font-size: 14px;
}
        </style>
    
    
    <link rel="alternate" type="application/rss+xml" title="RSS" href="/p/xsb/src/feed.rss"/>
    <link rel="alternate" type="application/atom+xml" title="Atom" href="/p/xsb/src/feed.atom"/>
    <style type="text/css">
        #access_urls .btn-set {
            
            min-width: 14em;
        }
    </style>

    <style>.XwqDuOFwprwsISVtCwYUDOwwrCvFvCgMKWQ {
        display: none
    }</style>

    
    
    
        <link rel="canonical" href="https://sourceforge.net/p/xsb/src/3173/tree/trunk/XSB/docs/userman/rbltin.tex" />
    


    

<script>
    var data = {hem: null };
    bizx.uids.gatherAndClean(data);
</script>



<script>
    function initPiwik(){
      var _paq = window._paq = window._paq || [];
      _paq.push(['trackPageView', document.title, {
            dimension1: 'xsb',
            dimension2: 'svn'
      }]);
      _paq.push(['enableLinkTracking']);
      
          _paq.push(['enableHeartBeatTimer']);
      
      (function() {
        var u="//analytics.slashdotmedia.com/";
        _paq.push(['setTrackerUrl', u+'sf.php']);
        _paq.push(['setSiteId', 39]);
        
        var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
        g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'sf.js'; s.parentNode.insertBefore(g,s);
      })();
    }
    bizx.cmp.ifConsent({ purposes: ['storage', 'measurement'], vendors: 'sdm'}, initPiwik);
</script>






<!-- Hubspot tracking -->






 <script>
    $(function() {
        bizx.cmp.ifConsent({ purposes: 'all' , vendors: 'narrative'}, function() {
            var current_time = (new Date()).getTime();
            let imageUrl = "https://io.narrative.io/?companyId=2440&id=first_party%3Afe8a3368-0397-4949-a368-04d70836971b&id=site_name%3Asourceforge.net&id=url%3A%2Fp%2Fxsb%2Fsrc%2F3173%2Ftree%2Ftrunk%2FXSB%2Fdocs%2Fuserman%2Frbltin.tex&id=pagetitle%3A%24PAGE_TITLE&id=vertical%3AOpen+Source+Software&id=product%3AXSB";
            imageUrl = imageUrl.replace(encodeURIComponent("$PAGE_TITLE"), document.title);  

            imageUrl = URL.parse(imageUrl);
            let hem = bizx.uids.getHem();
            if (hem) {
                imageUrl.searchParams.append('id', 'hem:' + hem);
            }
            imageUrl.searchParams.append('rand', current_time);

            var image = new Image();
            image.src = imageUrl.toString();
            image.style.display = "none";
            image.style.height = 0;
            image.style.width = 0;
            document.body.appendChild(image);
        });
    });
</script>



</head>

<body class="
body_class sandiego_chrome  legacy_chrome  l-allow-natural-width 
" id="forge">

    
        <!-- ew:body_top_js -->

    
        
<!-- /ew:body_top_js -->

    





<div class="off-canvas position-right" id="offCanvas" data-off-canvas>
    <!-- Menu -->
    <ul class="header-nav-menulist">
        <li class="highlight search">
            
            
                
            
            
    <form method="get" action="/directory/" class="m-search-form">
    
        <input type="text" placeholder="Search for software or solutions" autocomplete="off" name="q" >
        
        <label >
            <input type="submit" class="bt" value="">
            


<svg  data-name="search" viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M1216 832q0-185-131.5-316.5t-316.5-131.5-316.5 131.5-131.5 316.5 131.5 316.5 316.5 131.5 316.5-131.5 131.5-316.5zm512 832q0 52-38 90t-90 38q-54 0-90-38l-343-342q-179 124-399 124-143 0-273.5-55.5t-225-150-150-225-55.5-273.5 55.5-273.5 150-225 225-150 273.5-55.5 273.5 55.5 225 150 150 225 55.5 273.5q0 220-124 399l343 343q37 37 37 90z"/></svg>
        </label>
    </form>
        </li>
        
        <li class="highlight"><a href="/auth/">Join/Login</a></li>
        
        <li><a href="/software/">Business Software</a></li>
        <li><a href="/directory/">Open Source Software</a></li>
        <li><a  href="/software/vendors/" title="For Vendors">For Vendors</a></li>
        <li><a href="/blog/" title="Blog">Blog</a></li>
        <li><a href="/about">About</a></li>
        <li><a id="header-nav-more" data-toggle="header-nav-more header-nav-more-content" data-toggler=".toggled">More</a></li>
        <li>
            <ul id="header-nav-more-content" class="toggled" data-toggler=".toggled">
                
    

    
    
        <li><a href="/articles/">Articles</a></li>
    
    

    
 
                
                <li><a href="/create">Create</a></li>
                
                <li><a href="https://sourceforge.net/articles/category/sourceforge-podcast/">SourceForge Podcast</a></li>
                
                    <li><a href="https://sourceforge.net/p/forge/documentation/Docs%20Home/">Site Documentation</a></li>
                
                <li><a href="/user/newsletters">Subscribe to our Newsletter</a></li>
                <li><a href="/support">Support Request</a></li>
            </ul>
        </li>
    </ul>
</div>
<div class="off-canvas-content" data-off-canvas-content>

    




<script>
    SF.linkout_icon = '<svg  data-name="sf-linkout-icon" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" viewBox="0 0 300 300" style="enable-background:new 0 0 300 300;" xml:space="preserve"><polygon class="st0" points="243.2,243.2 56.8,243.2 56.8,56.8 123,56.8 123,9 9,9 9,291 291,291 291,179.4 243.2,179 "/><polygon class="st0" points="128.5,213 155,186.5 176,165.5 206.7,196.3 235.5,132.5 248.9,102.6 290.6,9.8 291,9 290.6,9.2 197.4,51.1 169.1,63.8 103.7,93.3 137,126.5 115.9,147.5 89.5,174 "/></svg>';
</script>


<div class="l-header-nav  sandiego">

    <section class="sandiego l-header-nav-top show-for-large">
        <div class="row">
            <a href="/" title="Home" class="sf-logo">
                
    
    <img src="https://a.fsdn.com/con/images/sandiego/sf-logo-full.svg"  alt="SourceForge logo" class="sf-logo-full"/>
            </a>
            <nav class="links">
                
                    <a href="/user/newsletters" title="Subscribe to our newsletter"><span class="newsletter-icon">


<svg  data-name="mmSF_11mail" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" viewBox="0 0 42 42" enable-background="new 0 0 42 42" xml:space="preserve"><path fill="#FFFFFF" d="M0,6v30h42V6H0z M24.2,21.2c-0.8,0.8-2.3,2-3.2,2c-0.9,0-2.4-1.2-3.2-2L5.8,9.7h30.3L24.2,21.2z M13.7,21l-9.9,9.4V11.6L13.7,21z M15.7,23L15.7,23c0.5,0.5,2.9,2.9,5.3,2.9c2.4,0,4.8-2.4,5.2-2.8l0.1-0.1l9.8,9.4H5.8L15.7,23z M28.3,21l9.9-9.5v18.9L28.3,21z"/></svg></span></a>
                
                <a href="/software/vendors/" title="For Vendors">For Vendors</a>
                
                
                    <a href="/support" title="Help">Help</a>
                    <a href="/create/" title="Create">Create</a>
                

                
                <a href="/user/registration" title="Join" >Join</a>
                <a href="/auth/" title="Login">Login</a>
                
            </nav>
        </div>
    </section>

    <section class="sandiego l-header-nav-top hide-for-large">
        <div class="row">
            <a href="/" title="Home" class="sf-logo">
                
    
    <img src="https://a.fsdn.com/con/images/sandiego/sf-logo-full.svg"  alt="SourceForge logo" class="sf-logo-full"/>
            </a>
            <div class="title-bar-right">
                <button type="button" aria-label="Toggle Main Menu" class="menu-icon" data-toggle="offCanvas"></button>
            </div>
        </div>
    </section>
    <section class="sandiego l-header-nav-bottom">
        <nav class="row">
            <a href="/" title="Home" class="sf-logo">
                
    
    <img src="https://a.fsdn.com/con/images/sandiego/sf-logo-full.svg"  alt="SourceForge logo" class="sf-logo-full"/>
            </a>
            <div class="links">
                
    
        <div class="nav-dropdown">
            <a href="/software/">Business Software</a>
            
        </div>
        <div class="nav-dropdown">
            <a href="/directory/" title="Browse">Open Source Software</a>
            
        </div>
        <div class="nav-dropdown">
            <a href="https://sourceforge.net/articles/category/sourceforge-podcast/">SourceForge Podcast</a>
        </div>
        <div class="nav-dropdown">
            <a>Resources</a>
            <ul class="nav-dropdown-menu">
                  <li><a href="/articles/">Articles</a></li>
                  
                  <li><a href="/software/case-studies/">Case Studies</a></li>
                  
                  <li><a href="/blog/">Blog</a></li>
            </ul>
        </div>
    

                <div class="dev-menu-when-stuck">
                    Menu
                    <ul class="dev-menu-dropdown header-nav-menulist">
                        <li><a href="/support">Help</a></li>
                        <li><a href="/create">Create</a></li>
                        <li><a href="/user/registration/" title="Join" >Join</a></li>
                        <li><a href="/auth/" title="Login">Login</a></li>
                    </ul>
                </div>
                <div class="search-toggle-when-stuck">
                    <a class="search-toggle">
                        


<svg  data-name="search" viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M1216 832q0-185-131.5-316.5t-316.5-131.5-316.5 131.5-131.5 316.5 131.5 316.5 316.5 131.5 316.5-131.5 131.5-316.5zm512 832q0 52-38 90t-90 38q-54 0-90-38l-343-342q-179 124-399 124-143 0-273.5-55.5t-225-150-150-225-55.5-273.5 55.5-273.5 150-225 225-150 273.5-55.5 273.5 55.5 225 150 150 225 55.5 273.5q0 220-124 399l343 343q37 37 37 90z"/></svg>
                    </a>
                </div>
            </div>

            <div class="search">
                
                
    
    
        <div class="main-nav-link">
            
            
            <a href="https://www.avast.com/lp-free-av?full_trSrc=mmm_srf_dlp_008_406_a&amp;utm_medium=referral&amp;utm_source=sourceforge&amp;utm_campaign=srf_dlp_008_406_a:site_banner" rel="nofollow" target="_blank" id="main-nav-badge-link" data-label="avastjuly">
                <img src="https://a.fsdn.com/con/assets/maxnav/sourceforge/ai-protection-32-75dd98b2.png"  srcset="https://a.fsdn.com/con/assets/maxnav/sourceforge/ai-protection-75de80f6.png 2x"  alt="" id="main-nav-image"/>
            </a>
        </div>
    


                
                    
                
                
                
                
    <form method="get" action="/directory/" class="m-search-form">
    
    <div class="typeahead__container">
      <div class="typeahead__field">
        <div class="typeahead__query">
        
        <input type="text" placeholder="Search for software or solutions" autocomplete="off" name="q" >
        
        </div>
        
        <label >
            <input type="submit" class="bt" value="">
            


<svg  data-name="search" viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M1216 832q0-185-131.5-316.5t-316.5-131.5-316.5 131.5-131.5 316.5 131.5 316.5 316.5 131.5 316.5-131.5 131.5-316.5zm512 832q0 52-38 90t-90 38q-54 0-90-38l-343-342q-179 124-399 124-143 0-273.5-55.5t-225-150-150-225-55.5-273.5 55.5-273.5 150-225 225-150 273.5-55.5 273.5 55.5 225 150 150 225 55.5 273.5q0 220-124 399l343 343q37 37 37 90z"/></svg>
        </label>
      </div>
    </div>
    
    </form>
                
            </div>
        </nav>
        
    </section>
    
</div>
    
    
    <div class="notification-on-project-page">
    
        
    
    
    
    </div>
    
    


    <section id="page-body" class=" neighborhood-Projects project-xsb mountpoint-src 

">
        <div id="nav_menu_holder">
            
                
                    
    <div class="sandiego"> 
            
            
            
            
<section class="project-masthead"> 
    
    

    
<div class="backdrop" style="box-sizing: content-box; padding-bottom: 24px"></div>

    <div class="content">
    
        
    <nav id="breadcrumbs" class="breadcrumbs rtl">
        <ul itemscope itemtype="http://schema.org/BreadcrumbList">
            <li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem">
                <a itemprop="item" href="/"><span itemprop="name">Home</span></a>
                <meta itemprop="position" content="1"/>
            </li>
            <li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem">
                <a itemprop="item" href="/directory/"><span itemprop="name">Browse</span></a>
                <meta itemprop="position" content="2"/>
            </li>
            
            
                
                
            
            
                
            
            
                <li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem">
                    <a itemprop="item" href="/p/xsb/"><span itemprop="name">XSB</span></a>
                <meta itemprop="position" content="3"/>
                </li>
            
                <li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem">
                    <span itemprop="name">Src  (SVN)-old</span>
                <meta itemprop="position" content="4"/>
                </li>
            
        </ul>
    </nav>
    
    
    
        
                
                
<div class="overview">
    


<div class="project-icon   " >
    
    
    <img itemprop="image" alt="XSB" title="XSB" 
    
    
    src="https://a.fsdn.com/allura/p/xsb/icon?1368563712"
    /></div>


    
    <div class="title "> 

        <meta itemprop="name" content="XSB"/>
        <h1  >XSB Src  (SVN)-old
        </h1>
        
            
            
          
        
            
            
            <div class="as-h3 brought-by">
                
                Brought to you by:
                
                    <a href="/u/carlandersen/profile/">carlandersen</a>,
                    
                
                    <a href="/u/dwarren/profile/">dwarren</a>,
                    
                
                    <a href="/u/evansbj/profile/">evansbj</a>,
                    
                
                    <a href="/u/kifer/profile/">kifer</a>,
                    
                
                    
                        and <a href="/p/xsb/_members/">3 others</a>
                    
                
            </div>
            
        

        

        
    </div>


    

</div>

                
                
    
  
            
            
        
    </div>
</section>

        </div>
    

                
            
        </div>
        <div id="top_nav" class="">
            
                
<div id="top_nav_admin">
<ul class="dropdown">
  
  
    <li class="">
        <a href="/projects/xsb/" class="tool-summary-32" >
            Summary
        </a>
        
        
    </li>
  
    <li class="">
        <a href="/projects/xsb/files/" class="tool-files-sf-32" >
            Files
        </a>
        
        
    </li>
  
    <li class="">
        <a href="/projects/xsb/reviews/" class="tool-reviews-32" >
            Reviews
        </a>
        
        
    </li>
  
    <li class="">
        <a href="/projects/xsb/support" class="tool-support-32" >
            Support
        </a>
        
        
    </li>
  
    <li class="">
        <a href="/p/xsb/mailman/" class="tool-mailman-32" >
            Mail Lists
        </a>
        
        
    </li>
  
    <li class="">
        <a href="/p/xsb/_list/tickets" class="tool-tickets-32" >
            Tickets ▾
        </a>
        
        
            <ul>
                
                    <li class=""><a href="/p/xsb/bugs/" >Bugs</a></li>
                
                    <li class=""><a href="/p/xsb/feature-requests/" >Feature Requests</a></li>
                
                    <li class=""><a href="/p/xsb/support-requests/" >Support Requests</a></li>
                
                    <li class=""><a href="/p/xsb/patches/" >Patches</a></li>
                
            </ul>
        
    </li>
  
    <li class="">
        <a href="/p/xsb/news/" class="tool-blog-32" >
            News
        </a>
        
        
    </li>
  
    <li class="">
        <a href="/p/xsb/code/" class="tool-git-32" >
            Sources (GIT)
        </a>
        
        
    </li>
  
    <li class="selected">
        <a href="/p/xsb/src/" class="tool-svn-32" >
            Src  (SVN)-old
        </a>
        
        
    </li>
  
  
</ul>
</div>


            
        </div>
        <div id="content_base">
            

    
                
                    
<a id="sidebar-activate" href="#">
    <span class="btn-label">Menu</span>
    <span class="btn-arrow-down">▾</span>
    <span class="btn-arrow-up">▴</span>
</a>

                        


<div id="sidebar">
  
    <div class="placeholder-no-searchbox">&nbsp;</div>
  
    
    
      
      
        
    
      <ul class="sidebarmenu">
      
    
  <li>
      
        <a class="icon" href="/p/xsb/src/commit_browser" rel="nofollow" title="Browse Commits"><i class="fa fa-list"></i>
      
      <span>Browse Commits</span>
      </a>
  </li>
  
      
        
    
  <li>
      
        <a href="/p/xsb/src/"  rel="nofollow" >
      
      <span>Browse Files</span>
      </a>
  </li>
  
      
    
    
      </ul>
      
    
    
</div>



<script>
$('#sidebar-admin-header').on('click', function(e){
    $("#sidebar-admin-menu").toggleClass("hidden");
    $(this).toggleClass("expanded");
    e.preventDefault();
});
</script>

                    

                    
                
                
                    
                
                <div class="grid-20 pad">
                    <h2 class="dark title">
                        <span>
<a href="/p/xsb/src/3173/" rel="nofollow">[r3173]</a>:

  
      <a href="./../../../../" rel="nofollow"><b class="fa fa-folder-open-o" title="Root directory"></b></a> /
  
  
    <a href="./../../../" rel="nofollow">trunk</a> /
  
    <a href="./../../" rel="nofollow">XSB</a> /
  
    <a href="./../" rel="nofollow">docs</a> /
  
    <a href="./" rel="nofollow">userman</a> /
  
 rbltin.tex
</span>
                        <!-- actions -->
                        <small>
                            

    
    <a class="icon" href="#" id="maximize-content" title="Maximize"><i class="fa fa-expand"></i>&nbsp;Maximize</a>
    <a class="icon" href="#" id="restore-content" title="Restore"><i class="fa fa-compress"></i>&nbsp;Restore</a>
<a class="icon" href="/p/xsb/src/3173/log/?path=/trunk/XSB/docs/userman/rbltin.tex" rel="nofollow" title="History"><i class="fa fa-calendar"></i>&nbsp;History</a>

                        </small>
                        <!-- /actions -->
                    </h2>
                    
                    <div>
                        
  

                        
  
    <p><a rel="nofollow" href="?format=raw">Download this file</a></p>
    <div class="clip grid-19 codebrowser">
      <h3>
        915 lines (784 with data), 42.4 kB
      </h3>
      
        <div class="codehilite"><table class="codehilitetable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">  1</span>
<span class="normal">  2</span>
<span class="normal">  3</span>
<span class="normal">  4</span>
<span class="normal">  5</span>
<span class="normal">  6</span>
<span class="normal">  7</span>
<span class="normal">  8</span>
<span class="normal">  9</span>
<span class="normal"> 10</span>
<span class="normal"> 11</span>
<span class="normal"> 12</span>
<span class="normal"> 13</span>
<span class="normal"> 14</span>
<span class="normal"> 15</span>
<span class="normal"> 16</span>
<span class="normal"> 17</span>
<span class="normal"> 18</span>
<span class="normal"> 19</span>
<span class="normal"> 20</span>
<span class="normal"> 21</span>
<span class="normal"> 22</span>
<span class="normal"> 23</span>
<span class="normal"> 24</span>
<span class="normal"> 25</span>
<span class="normal"> 26</span>
<span class="normal"> 27</span>
<span class="normal"> 28</span>
<span class="normal"> 29</span>
<span class="normal"> 30</span>
<span class="normal"> 31</span>
<span class="normal"> 32</span>
<span class="normal"> 33</span>
<span class="normal"> 34</span>
<span class="normal"> 35</span>
<span class="normal"> 36</span>
<span class="normal"> 37</span>
<span class="normal"> 38</span>
<span class="normal"> 39</span>
<span class="normal"> 40</span>
<span class="normal"> 41</span>
<span class="normal"> 42</span>
<span class="normal"> 43</span>
<span class="normal"> 44</span>
<span class="normal"> 45</span>
<span class="normal"> 46</span>
<span class="normal"> 47</span>
<span class="normal"> 48</span>
<span class="normal"> 49</span>
<span class="normal"> 50</span>
<span class="normal"> 51</span>
<span class="normal"> 52</span>
<span class="normal"> 53</span>
<span class="normal"> 54</span>
<span class="normal"> 55</span>
<span class="normal"> 56</span>
<span class="normal"> 57</span>
<span class="normal"> 58</span>
<span class="normal"> 59</span>
<span class="normal"> 60</span>
<span class="normal"> 61</span>
<span class="normal"> 62</span>
<span class="normal"> 63</span>
<span class="normal"> 64</span>
<span class="normal"> 65</span>
<span class="normal"> 66</span>
<span class="normal"> 67</span>
<span class="normal"> 68</span>
<span class="normal"> 69</span>
<span class="normal"> 70</span>
<span class="normal"> 71</span>
<span class="normal"> 72</span>
<span class="normal"> 73</span>
<span class="normal"> 74</span>
<span class="normal"> 75</span>
<span class="normal"> 76</span>
<span class="normal"> 77</span>
<span class="normal"> 78</span>
<span class="normal"> 79</span>
<span class="normal"> 80</span>
<span class="normal"> 81</span>
<span class="normal"> 82</span>
<span class="normal"> 83</span>
<span class="normal"> 84</span>
<span class="normal"> 85</span>
<span class="normal"> 86</span>
<span class="normal"> 87</span>
<span class="normal"> 88</span>
<span class="normal"> 89</span>
<span class="normal"> 90</span>
<span class="normal"> 91</span>
<span class="normal"> 92</span>
<span class="normal"> 93</span>
<span class="normal"> 94</span>
<span class="normal"> 95</span>
<span class="normal"> 96</span>
<span class="normal"> 97</span>
<span class="normal"> 98</span>
<span class="normal"> 99</span>
<span class="normal">100</span>
<span class="normal">101</span>
<span class="normal">102</span>
<span class="normal">103</span>
<span class="normal">104</span>
<span class="normal">105</span>
<span class="normal">106</span>
<span class="normal">107</span>
<span class="normal">108</span>
<span class="normal">109</span>
<span class="normal">110</span>
<span class="normal">111</span>
<span class="normal">112</span>
<span class="normal">113</span>
<span class="normal">114</span>
<span class="normal">115</span>
<span class="normal">116</span>
<span class="normal">117</span>
<span class="normal">118</span>
<span class="normal">119</span>
<span class="normal">120</span>
<span class="normal">121</span>
<span class="normal">122</span>
<span class="normal">123</span>
<span class="normal">124</span>
<span class="normal">125</span>
<span class="normal">126</span>
<span class="normal">127</span>
<span class="normal">128</span>
<span class="normal">129</span>
<span class="normal">130</span>
<span class="normal">131</span>
<span class="normal">132</span>
<span class="normal">133</span>
<span class="normal">134</span>
<span class="normal">135</span>
<span class="normal">136</span>
<span class="normal">137</span>
<span class="normal">138</span>
<span class="normal">139</span>
<span class="normal">140</span>
<span class="normal">141</span>
<span class="normal">142</span>
<span class="normal">143</span>
<span class="normal">144</span>
<span class="normal">145</span>
<span class="normal">146</span>
<span class="normal">147</span>
<span class="normal">148</span>
<span class="normal">149</span>
<span class="normal">150</span>
<span class="normal">151</span>
<span class="normal">152</span>
<span class="normal">153</span>
<span class="normal">154</span>
<span class="normal">155</span>
<span class="normal">156</span>
<span class="normal">157</span>
<span class="normal">158</span>
<span class="normal">159</span>
<span class="normal">160</span>
<span class="normal">161</span>
<span class="normal">162</span>
<span class="normal">163</span>
<span class="normal">164</span>
<span class="normal">165</span>
<span class="normal">166</span>
<span class="normal">167</span>
<span class="normal">168</span>
<span class="normal">169</span>
<span class="normal">170</span>
<span class="normal">171</span>
<span class="normal">172</span>
<span class="normal">173</span>
<span class="normal">174</span>
<span class="normal">175</span>
<span class="normal">176</span>
<span class="normal">177</span>
<span class="normal">178</span>
<span class="normal">179</span>
<span class="normal">180</span>
<span class="normal">181</span>
<span class="normal">182</span>
<span class="normal">183</span>
<span class="normal">184</span>
<span class="normal">185</span>
<span class="normal">186</span>
<span class="normal">187</span>
<span class="normal">188</span>
<span class="normal">189</span>
<span class="normal">190</span>
<span class="normal">191</span>
<span class="normal">192</span>
<span class="normal">193</span>
<span class="normal">194</span>
<span class="normal">195</span>
<span class="normal">196</span>
<span class="normal">197</span>
<span class="normal">198</span>
<span class="normal">199</span>
<span class="normal">200</span>
<span class="normal">201</span>
<span class="normal">202</span>
<span class="normal">203</span>
<span class="normal">204</span>
<span class="normal">205</span>
<span class="normal">206</span>
<span class="normal">207</span>
<span class="normal">208</span>
<span class="normal">209</span>
<span class="normal">210</span>
<span class="normal">211</span>
<span class="normal">212</span>
<span class="normal">213</span>
<span class="normal">214</span>
<span class="normal">215</span>
<span class="normal">216</span>
<span class="normal">217</span>
<span class="normal">218</span>
<span class="normal">219</span>
<span class="normal">220</span>
<span class="normal">221</span>
<span class="normal">222</span>
<span class="normal">223</span>
<span class="normal">224</span>
<span class="normal">225</span>
<span class="normal">226</span>
<span class="normal">227</span>
<span class="normal">228</span>
<span class="normal">229</span>
<span class="normal">230</span>
<span class="normal">231</span>
<span class="normal">232</span>
<span class="normal">233</span>
<span class="normal">234</span>
<span class="normal">235</span>
<span class="normal">236</span>
<span class="normal">237</span>
<span class="normal">238</span>
<span class="normal">239</span>
<span class="normal">240</span>
<span class="normal">241</span>
<span class="normal">242</span>
<span class="normal">243</span>
<span class="normal">244</span>
<span class="normal">245</span>
<span class="normal">246</span>
<span class="normal">247</span>
<span class="normal">248</span>
<span class="normal">249</span>
<span class="normal">250</span>
<span class="normal">251</span>
<span class="normal">252</span>
<span class="normal">253</span>
<span class="normal">254</span>
<span class="normal">255</span>
<span class="normal">256</span>
<span class="normal">257</span>
<span class="normal">258</span>
<span class="normal">259</span>
<span class="normal">260</span>
<span class="normal">261</span>
<span class="normal">262</span>
<span class="normal">263</span>
<span class="normal">264</span>
<span class="normal">265</span>
<span class="normal">266</span>
<span class="normal">267</span>
<span class="normal">268</span>
<span class="normal">269</span>
<span class="normal">270</span>
<span class="normal">271</span>
<span class="normal">272</span>
<span class="normal">273</span>
<span class="normal">274</span>
<span class="normal">275</span>
<span class="normal">276</span>
<span class="normal">277</span>
<span class="normal">278</span>
<span class="normal">279</span>
<span class="normal">280</span>
<span class="normal">281</span>
<span class="normal">282</span>
<span class="normal">283</span>
<span class="normal">284</span>
<span class="normal">285</span>
<span class="normal">286</span>
<span class="normal">287</span>
<span class="normal">288</span>
<span class="normal">289</span>
<span class="normal">290</span>
<span class="normal">291</span>
<span class="normal">292</span>
<span class="normal">293</span>
<span class="normal">294</span>
<span class="normal">295</span>
<span class="normal">296</span>
<span class="normal">297</span>
<span class="normal">298</span>
<span class="normal">299</span>
<span class="normal">300</span>
<span class="normal">301</span>
<span class="normal">302</span>
<span class="normal">303</span>
<span class="normal">304</span>
<span class="normal">305</span>
<span class="normal">306</span>
<span class="normal">307</span>
<span class="normal">308</span>
<span class="normal">309</span>
<span class="normal">310</span>
<span class="normal">311</span>
<span class="normal">312</span>
<span class="normal">313</span>
<span class="normal">314</span>
<span class="normal">315</span>
<span class="normal">316</span>
<span class="normal">317</span>
<span class="normal">318</span>
<span class="normal">319</span>
<span class="normal">320</span>
<span class="normal">321</span>
<span class="normal">322</span>
<span class="normal">323</span>
<span class="normal">324</span>
<span class="normal">325</span>
<span class="normal">326</span>
<span class="normal">327</span>
<span class="normal">328</span>
<span class="normal">329</span>
<span class="normal">330</span>
<span class="normal">331</span>
<span class="normal">332</span>
<span class="normal">333</span>
<span class="normal">334</span>
<span class="normal">335</span>
<span class="normal">336</span>
<span class="normal">337</span>
<span class="normal">338</span>
<span class="normal">339</span>
<span class="normal">340</span>
<span class="normal">341</span>
<span class="normal">342</span>
<span class="normal">343</span>
<span class="normal">344</span>
<span class="normal">345</span>
<span class="normal">346</span>
<span class="normal">347</span>
<span class="normal">348</span>
<span class="normal">349</span>
<span class="normal">350</span>
<span class="normal">351</span>
<span class="normal">352</span>
<span class="normal">353</span>
<span class="normal">354</span>
<span class="normal">355</span>
<span class="normal">356</span>
<span class="normal">357</span>
<span class="normal">358</span>
<span class="normal">359</span>
<span class="normal">360</span>
<span class="normal">361</span>
<span class="normal">362</span>
<span class="normal">363</span>
<span class="normal">364</span>
<span class="normal">365</span>
<span class="normal">366</span>
<span class="normal">367</span>
<span class="normal">368</span>
<span class="normal">369</span>
<span class="normal">370</span>
<span class="normal">371</span>
<span class="normal">372</span>
<span class="normal">373</span>
<span class="normal">374</span>
<span class="normal">375</span>
<span class="normal">376</span>
<span class="normal">377</span>
<span class="normal">378</span>
<span class="normal">379</span>
<span class="normal">380</span>
<span class="normal">381</span>
<span class="normal">382</span>
<span class="normal">383</span>
<span class="normal">384</span>
<span class="normal">385</span>
<span class="normal">386</span>
<span class="normal">387</span>
<span class="normal">388</span>
<span class="normal">389</span>
<span class="normal">390</span>
<span class="normal">391</span>
<span class="normal">392</span>
<span class="normal">393</span>
<span class="normal">394</span>
<span class="normal">395</span>
<span class="normal">396</span>
<span class="normal">397</span>
<span class="normal">398</span>
<span class="normal">399</span>
<span class="normal">400</span>
<span class="normal">401</span>
<span class="normal">402</span>
<span class="normal">403</span>
<span class="normal">404</span>
<span class="normal">405</span>
<span class="normal">406</span>
<span class="normal">407</span>
<span class="normal">408</span>
<span class="normal">409</span>
<span class="normal">410</span>
<span class="normal">411</span>
<span class="normal">412</span>
<span class="normal">413</span>
<span class="normal">414</span>
<span class="normal">415</span>
<span class="normal">416</span>
<span class="normal">417</span>
<span class="normal">418</span>
<span class="normal">419</span>
<span class="normal">420</span>
<span class="normal">421</span>
<span class="normal">422</span>
<span class="normal">423</span>
<span class="normal">424</span>
<span class="normal">425</span>
<span class="normal">426</span>
<span class="normal">427</span>
<span class="normal">428</span>
<span class="normal">429</span>
<span class="normal">430</span>
<span class="normal">431</span>
<span class="normal">432</span>
<span class="normal">433</span>
<span class="normal">434</span>
<span class="normal">435</span>
<span class="normal">436</span>
<span class="normal">437</span>
<span class="normal">438</span>
<span class="normal">439</span>
<span class="normal">440</span>
<span class="normal">441</span>
<span class="normal">442</span>
<span class="normal">443</span>
<span class="normal">444</span>
<span class="normal">445</span>
<span class="normal">446</span>
<span class="normal">447</span>
<span class="normal">448</span>
<span class="normal">449</span>
<span class="normal">450</span>
<span class="normal">451</span>
<span class="normal">452</span>
<span class="normal">453</span>
<span class="normal">454</span>
<span class="normal">455</span>
<span class="normal">456</span>
<span class="normal">457</span>
<span class="normal">458</span>
<span class="normal">459</span>
<span class="normal">460</span>
<span class="normal">461</span>
<span class="normal">462</span>
<span class="normal">463</span>
<span class="normal">464</span>
<span class="normal">465</span>
<span class="normal">466</span>
<span class="normal">467</span>
<span class="normal">468</span>
<span class="normal">469</span>
<span class="normal">470</span>
<span class="normal">471</span>
<span class="normal">472</span>
<span class="normal">473</span>
<span class="normal">474</span>
<span class="normal">475</span>
<span class="normal">476</span>
<span class="normal">477</span>
<span class="normal">478</span>
<span class="normal">479</span>
<span class="normal">480</span>
<span class="normal">481</span>
<span class="normal">482</span>
<span class="normal">483</span>
<span class="normal">484</span>
<span class="normal">485</span>
<span class="normal">486</span>
<span class="normal">487</span>
<span class="normal">488</span>
<span class="normal">489</span>
<span class="normal">490</span>
<span class="normal">491</span>
<span class="normal">492</span>
<span class="normal">493</span>
<span class="normal">494</span>
<span class="normal">495</span>
<span class="normal">496</span>
<span class="normal">497</span>
<span class="normal">498</span>
<span class="normal">499</span>
<span class="normal">500</span>
<span class="normal">501</span>
<span class="normal">502</span>
<span class="normal">503</span>
<span class="normal">504</span>
<span class="normal">505</span>
<span class="normal">506</span>
<span class="normal">507</span>
<span class="normal">508</span>
<span class="normal">509</span>
<span class="normal">510</span>
<span class="normal">511</span>
<span class="normal">512</span>
<span class="normal">513</span>
<span class="normal">514</span>
<span class="normal">515</span>
<span class="normal">516</span>
<span class="normal">517</span>
<span class="normal">518</span>
<span class="normal">519</span>
<span class="normal">520</span>
<span class="normal">521</span>
<span class="normal">522</span>
<span class="normal">523</span>
<span class="normal">524</span>
<span class="normal">525</span>
<span class="normal">526</span>
<span class="normal">527</span>
<span class="normal">528</span>
<span class="normal">529</span>
<span class="normal">530</span>
<span class="normal">531</span>
<span class="normal">532</span>
<span class="normal">533</span>
<span class="normal">534</span>
<span class="normal">535</span>
<span class="normal">536</span>
<span class="normal">537</span>
<span class="normal">538</span>
<span class="normal">539</span>
<span class="normal">540</span>
<span class="normal">541</span>
<span class="normal">542</span>
<span class="normal">543</span>
<span class="normal">544</span>
<span class="normal">545</span>
<span class="normal">546</span>
<span class="normal">547</span>
<span class="normal">548</span>
<span class="normal">549</span>
<span class="normal">550</span>
<span class="normal">551</span>
<span class="normal">552</span>
<span class="normal">553</span>
<span class="normal">554</span>
<span class="normal">555</span>
<span class="normal">556</span>
<span class="normal">557</span>
<span class="normal">558</span>
<span class="normal">559</span>
<span class="normal">560</span>
<span class="normal">561</span>
<span class="normal">562</span>
<span class="normal">563</span>
<span class="normal">564</span>
<span class="normal">565</span>
<span class="normal">566</span>
<span class="normal">567</span>
<span class="normal">568</span>
<span class="normal">569</span>
<span class="normal">570</span>
<span class="normal">571</span>
<span class="normal">572</span>
<span class="normal">573</span>
<span class="normal">574</span>
<span class="normal">575</span>
<span class="normal">576</span>
<span class="normal">577</span>
<span class="normal">578</span>
<span class="normal">579</span>
<span class="normal">580</span>
<span class="normal">581</span>
<span class="normal">582</span>
<span class="normal">583</span>
<span class="normal">584</span>
<span class="normal">585</span>
<span class="normal">586</span>
<span class="normal">587</span>
<span class="normal">588</span>
<span class="normal">589</span>
<span class="normal">590</span>
<span class="normal">591</span>
<span class="normal">592</span>
<span class="normal">593</span>
<span class="normal">594</span>
<span class="normal">595</span>
<span class="normal">596</span>
<span class="normal">597</span>
<span class="normal">598</span>
<span class="normal">599</span>
<span class="normal">600</span>
<span class="normal">601</span>
<span class="normal">602</span>
<span class="normal">603</span>
<span class="normal">604</span>
<span class="normal">605</span>
<span class="normal">606</span>
<span class="normal">607</span>
<span class="normal">608</span>
<span class="normal">609</span>
<span class="normal">610</span>
<span class="normal">611</span>
<span class="normal">612</span>
<span class="normal">613</span>
<span class="normal">614</span>
<span class="normal">615</span>
<span class="normal">616</span>
<span class="normal">617</span>
<span class="normal">618</span>
<span class="normal">619</span>
<span class="normal">620</span>
<span class="normal">621</span>
<span class="normal">622</span>
<span class="normal">623</span>
<span class="normal">624</span>
<span class="normal">625</span>
<span class="normal">626</span>
<span class="normal">627</span>
<span class="normal">628</span>
<span class="normal">629</span>
<span class="normal">630</span>
<span class="normal">631</span>
<span class="normal">632</span>
<span class="normal">633</span>
<span class="normal">634</span>
<span class="normal">635</span>
<span class="normal">636</span>
<span class="normal">637</span>
<span class="normal">638</span>
<span class="normal">639</span>
<span class="normal">640</span>
<span class="normal">641</span>
<span class="normal">642</span>
<span class="normal">643</span>
<span class="normal">644</span>
<span class="normal">645</span>
<span class="normal">646</span>
<span class="normal">647</span>
<span class="normal">648</span>
<span class="normal">649</span>
<span class="normal">650</span>
<span class="normal">651</span>
<span class="normal">652</span>
<span class="normal">653</span>
<span class="normal">654</span>
<span class="normal">655</span>
<span class="normal">656</span>
<span class="normal">657</span>
<span class="normal">658</span>
<span class="normal">659</span>
<span class="normal">660</span>
<span class="normal">661</span>
<span class="normal">662</span>
<span class="normal">663</span>
<span class="normal">664</span>
<span class="normal">665</span>
<span class="normal">666</span>
<span class="normal">667</span>
<span class="normal">668</span>
<span class="normal">669</span>
<span class="normal">670</span>
<span class="normal">671</span>
<span class="normal">672</span>
<span class="normal">673</span>
<span class="normal">674</span>
<span class="normal">675</span>
<span class="normal">676</span>
<span class="normal">677</span>
<span class="normal">678</span>
<span class="normal">679</span>
<span class="normal">680</span>
<span class="normal">681</span>
<span class="normal">682</span>
<span class="normal">683</span>
<span class="normal">684</span>
<span class="normal">685</span>
<span class="normal">686</span>
<span class="normal">687</span>
<span class="normal">688</span>
<span class="normal">689</span>
<span class="normal">690</span>
<span class="normal">691</span>
<span class="normal">692</span>
<span class="normal">693</span>
<span class="normal">694</span>
<span class="normal">695</span>
<span class="normal">696</span>
<span class="normal">697</span>
<span class="normal">698</span>
<span class="normal">699</span>
<span class="normal">700</span>
<span class="normal">701</span>
<span class="normal">702</span>
<span class="normal">703</span>
<span class="normal">704</span>
<span class="normal">705</span>
<span class="normal">706</span>
<span class="normal">707</span>
<span class="normal">708</span>
<span class="normal">709</span>
<span class="normal">710</span>
<span class="normal">711</span>
<span class="normal">712</span>
<span class="normal">713</span>
<span class="normal">714</span>
<span class="normal">715</span>
<span class="normal">716</span>
<span class="normal">717</span>
<span class="normal">718</span>
<span class="normal">719</span>
<span class="normal">720</span>
<span class="normal">721</span>
<span class="normal">722</span>
<span class="normal">723</span>
<span class="normal">724</span>
<span class="normal">725</span>
<span class="normal">726</span>
<span class="normal">727</span>
<span class="normal">728</span>
<span class="normal">729</span>
<span class="normal">730</span>
<span class="normal">731</span>
<span class="normal">732</span>
<span class="normal">733</span>
<span class="normal">734</span>
<span class="normal">735</span>
<span class="normal">736</span>
<span class="normal">737</span>
<span class="normal">738</span>
<span class="normal">739</span>
<span class="normal">740</span>
<span class="normal">741</span>
<span class="normal">742</span>
<span class="normal">743</span>
<span class="normal">744</span>
<span class="normal">745</span>
<span class="normal">746</span>
<span class="normal">747</span>
<span class="normal">748</span>
<span class="normal">749</span>
<span class="normal">750</span>
<span class="normal">751</span>
<span class="normal">752</span>
<span class="normal">753</span>
<span class="normal">754</span>
<span class="normal">755</span>
<span class="normal">756</span>
<span class="normal">757</span>
<span class="normal">758</span>
<span class="normal">759</span>
<span class="normal">760</span>
<span class="normal">761</span>
<span class="normal">762</span>
<span class="normal">763</span>
<span class="normal">764</span>
<span class="normal">765</span>
<span class="normal">766</span>
<span class="normal">767</span>
<span class="normal">768</span>
<span class="normal">769</span>
<span class="normal">770</span>
<span class="normal">771</span>
<span class="normal">772</span>
<span class="normal">773</span>
<span class="normal">774</span>
<span class="normal">775</span>
<span class="normal">776</span>
<span class="normal">777</span>
<span class="normal">778</span>
<span class="normal">779</span>
<span class="normal">780</span>
<span class="normal">781</span>
<span class="normal">782</span>
<span class="normal">783</span>
<span class="normal">784</span>
<span class="normal">785</span>
<span class="normal">786</span>
<span class="normal">787</span>
<span class="normal">788</span>
<span class="normal">789</span>
<span class="normal">790</span>
<span class="normal">791</span>
<span class="normal">792</span>
<span class="normal">793</span>
<span class="normal">794</span>
<span class="normal">795</span>
<span class="normal">796</span>
<span class="normal">797</span>
<span class="normal">798</span>
<span class="normal">799</span>
<span class="normal">800</span>
<span class="normal">801</span>
<span class="normal">802</span>
<span class="normal">803</span>
<span class="normal">804</span>
<span class="normal">805</span>
<span class="normal">806</span>
<span class="normal">807</span>
<span class="normal">808</span>
<span class="normal">809</span>
<span class="normal">810</span>
<span class="normal">811</span>
<span class="normal">812</span>
<span class="normal">813</span>
<span class="normal">814</span>
<span class="normal">815</span>
<span class="normal">816</span>
<span class="normal">817</span>
<span class="normal">818</span>
<span class="normal">819</span>
<span class="normal">820</span>
<span class="normal">821</span>
<span class="normal">822</span>
<span class="normal">823</span>
<span class="normal">824</span>
<span class="normal">825</span>
<span class="normal">826</span>
<span class="normal">827</span>
<span class="normal">828</span>
<span class="normal">829</span>
<span class="normal">830</span>
<span class="normal">831</span>
<span class="normal">832</span>
<span class="normal">833</span>
<span class="normal">834</span>
<span class="normal">835</span>
<span class="normal">836</span>
<span class="normal">837</span>
<span class="normal">838</span>
<span class="normal">839</span>
<span class="normal">840</span>
<span class="normal">841</span>
<span class="normal">842</span>
<span class="normal">843</span>
<span class="normal">844</span>
<span class="normal">845</span>
<span class="normal">846</span>
<span class="normal">847</span>
<span class="normal">848</span>
<span class="normal">849</span>
<span class="normal">850</span>
<span class="normal">851</span>
<span class="normal">852</span>
<span class="normal">853</span>
<span class="normal">854</span>
<span class="normal">855</span>
<span class="normal">856</span>
<span class="normal">857</span>
<span class="normal">858</span>
<span class="normal">859</span>
<span class="normal">860</span>
<span class="normal">861</span>
<span class="normal">862</span>
<span class="normal">863</span>
<span class="normal">864</span>
<span class="normal">865</span>
<span class="normal">866</span>
<span class="normal">867</span>
<span class="normal">868</span>
<span class="normal">869</span>
<span class="normal">870</span>
<span class="normal">871</span>
<span class="normal">872</span>
<span class="normal">873</span>
<span class="normal">874</span>
<span class="normal">875</span>
<span class="normal">876</span>
<span class="normal">877</span>
<span class="normal">878</span>
<span class="normal">879</span>
<span class="normal">880</span>
<span class="normal">881</span>
<span class="normal">882</span>
<span class="normal">883</span>
<span class="normal">884</span>
<span class="normal">885</span>
<span class="normal">886</span>
<span class="normal">887</span>
<span class="normal">888</span>
<span class="normal">889</span>
<span class="normal">890</span>
<span class="normal">891</span>
<span class="normal">892</span>
<span class="normal">893</span>
<span class="normal">894</span>
<span class="normal">895</span>
<span class="normal">896</span>
<span class="normal">897</span>
<span class="normal">898</span>
<span class="normal">899</span>
<span class="normal">900</span>
<span class="normal">901</span>
<span class="normal">902</span>
<span class="normal">903</span>
<span class="normal">904</span>
<span class="normal">905</span>
<span class="normal">906</span>
<span class="normal">907</span>
<span class="normal">908</span>
<span class="normal">909</span>
<span class="normal">910</span>
<span class="normal">911</span>
<span class="normal">912</span>
<span class="normal">913</span>
<span class="normal">914</span></pre></div></td><td class="code"><div><pre><div id="l1" class="code_block"><span class="c">%=====================================================================</span>
</div><div id="l2" class="code_block">
</div><div id="l3" class="code_block"><span class="k">\section</span><span class="nb">{</span>Modification of the Database<span class="nb">}</span> <span class="k">\label</span><span class="nb">{</span>sec:assert<span class="nb">}</span>
</div><div id="l4" class="code_block">
</div><div id="l5" class="code_block">XSB provides an array of features for modifying the dynamic database.
</div><div id="l6" class="code_block">Using <span class="nb">{</span><span class="k">\tt</span> assert/1<span class="nb">}</span>, clauses can be asserted using first-argument
</div><div id="l7" class="code_block">indexing in a manner that is now standard to Prolog implementations.
</div><div id="l8" class="code_block">While this is the default behavior for XSB, other behavior can be
</div><div id="l9" class="code_block">specified using the (executable) directives <span class="nb">{</span><span class="k">\tt</span> index/3<span class="nb">}</span> and <span class="nb">{</span><span class="k">\tt</span>
</div><div id="l10" class="code_block">index/2<span class="nb">}</span>.  For instance, dynamic clauses can be declared to have
</div><div id="l11" class="code_block">multiple or joint indexes, while this indexing can be either
</div><div id="l12" class="code_block">hash-based as is typical in Prolog systems or based on <span class="nb">{</span><span class="k">\em</span> tries<span class="nb">}</span>.
</div><div id="l13" class="code_block">No matter what kind of indexing is used, space is dynamically
</div><div id="l14" class="code_block">allocated when a new clause is asserted and, unless specified
</div><div id="l15" class="code_block">otherwise, released when it is retracted.  Furthermore, the size of
</div><div id="l16" class="code_block">any index table expands dynamically as clauses are asserted.
</div><div id="l17" class="code_block">
</div><div id="l18" class="code_block">Consider first dynamic predicates that use traditional hash-based
</div><div id="l19" class="code_block">indexing.  XSB asserts WAM code for such clauses, leading to execution
</div><div id="l20" class="code_block">times similar to compiled code for unit and binary clauses.
</div><div id="l21" class="code_block">Furthermore, tabling can be used with a dynamic predicate by
</div><div id="l22" class="code_block">explicitly declaring a predicate to be both dynamic and tabled.  For
</div><div id="l23" class="code_block">clauses that are asserted as WAM code, the <span class="nb">{</span><span class="k">\em</span> ``immediate
</div><div id="l24" class="code_block">semantics&#39;&#39;<span class="nb">}</span> of dynamic predicates is used, not the so-called <span class="nb">{</span><span class="k">\em</span>
</div><div id="l25" class="code_block">``logical semantics&#39;&#39;<span class="nb">}</span> of assert/retract <span class="k">\cite</span><span class="nb">{</span>LiOk87<span class="nb">}</span>. This means
</div><div id="l26" class="code_block">that significant care must be taken when modifying the definition of a
</div><div id="l27" class="code_block">predicate which is currently being executed. Notice that this makes
</div><div id="l28" class="code_block">some operations difficult. For example, one might try to retract from
</div><div id="l29" class="code_block">dynamically asserted predicates, <span class="nb">{</span><span class="k">\tt</span> p/1<span class="nb">}</span> and <span class="nb">{</span><span class="k">\tt</span> q/1<span class="nb">}</span>, exactly
</div><div id="l30" class="code_block">their intersection, by issuing the following query:
</div><div id="l31" class="code_block"><span class="k">\begin</span><span class="nb">{</span>center<span class="nb">}</span> 
</div><div id="l32" class="code_block"><span class="nb">{</span><span class="k">\tt</span> :- p(X), q(X), retract(p(X)), retract(q(X)), fail.<span class="nb">}</span>
</div><div id="l33" class="code_block"><span class="k">\end</span><span class="nb">{</span>center<span class="nb">}</span>
</div><div id="l34" class="code_block">Neither <span class="nb">{</span><span class="k">\tt</span> retract/1<span class="nb">}</span> nor <span class="nb">{</span><span class="k">\tt</span> retractall/1<span class="nb">}</span> support this behavior,
</div><div id="l35" class="code_block">due to their techniques for space reclamation.  One alternative is to
</div><div id="l36" class="code_block">use <span class="nb">{</span><span class="k">\tt</span> findall/3<span class="nb">}</span> to collect the intersection first, before retracting.
</div><div id="l37" class="code_block">Another is to use the predicates <span class="nb">{</span><span class="k">\tt</span> retract<span class="k">\_nr</span>/1<span class="nb">}</span> and <span class="nb">{</span><span class="k">\tt</span>
</div><div id="l38" class="code_block">reclaim<span class="k">\_space</span>/1<span class="nb">}</span>, described below.  
</div><div id="l39" class="code_block">
</div><div id="l40" class="code_block">Asserting clauses as WAM code might be considerably slow for some
</div><div id="l41" class="code_block">applications.  To remedy this, XSB provides an alternative to <span class="nb">{</span><span class="k">\tt</span>
</div><div id="l42" class="code_block">assert/1<span class="nb">}</span> which implements assert&#39;s functionality using the trie-based
</div><div id="l43" class="code_block">tabling data structures <span class="k">\cite</span><span class="nb">{</span>RRSSW98<span class="nb">}</span>.  Though trie-based dynamic
</div><div id="l44" class="code_block">code can be created (and usually executed) significantly faster than
</div><div id="l45" class="code_block">using <span class="nb">{</span><span class="k">\tt</span> assert/1<span class="nb">}</span>, users of the following predicates should be
</div><div id="l46" class="code_block">aware that trie-based assert can be used only for unit clauses where a
</div><div id="l47" class="code_block">relation is viewed as a set, and where the order of the facts is not
</div><div id="l48" class="code_block">important.
</div><div id="l49" class="code_block">
</div><div id="l50" class="code_block">XSB does not at this time fully support dynamic predicates defined
</div><div id="l51" class="code_block">within compiled code.  The only way to generate dynamic code is by
</div><div id="l52" class="code_block">explicitly asserting it, or by using the standard predicate <span class="nb">{</span><span class="k">\tt</span>
</div><div id="l53" class="code_block">load<span class="k">\_dyn</span>/1<span class="nb">}</span> to read clauses from a file and assert them (see
</div><div id="l54" class="code_block">the section <span class="nb">{</span><span class="k">\it</span> Asserting Dynamic Code<span class="nb">}</span> in Volume 2).  There is a
</div><div id="l55" class="code_block"><span class="nb">{</span><span class="k">\tt</span> dynamic/1<span class="nb">}</span> predicate (see 
</div><div id="l56" class="code_block">page~<span class="k">\pageref</span><span class="nb">{</span>dynamic/1<span class="nb">}</span>) that declares a predicate within the system
</div><div id="l57" class="code_block">so that if the predicate is called when no clauses are presently
</div><div id="l58" class="code_block">defining it, the call will quietly fail instead of issuing an <span class="nb">{</span><span class="k">\sf</span>
</div><div id="l59" class="code_block">``Undefined predicate&#39;&#39;<span class="nb">}</span> error message.
</div><div id="l60" class="code_block">
</div><div id="l61" class="code_block"><span class="k">\begin</span><span class="nb">{</span>description<span class="nb">}</span>
</div><div id="l62" class="code_block">
</div><div id="l63" class="code_block"><span class="k">\ouritem</span><span class="nb">{</span>assert(+Clause)<span class="nb">}</span><span class="k">\index</span><span class="nb">{{</span><span class="k">\tt</span> assert/1<span class="nb">}}</span>
</div><div id="l64" class="code_block">adds a dynamic clause, <span class="nb">{</span><span class="k">\tt</span> Clause<span class="nb">}</span>, to the database. <span class="nb">{</span><span class="k">\tt</span> Clause<span class="nb">}</span>
</div><div id="l65" class="code_block">must be of one of the forms: <span class="nb">{</span><span class="k">\tt</span> Head<span class="nb">}</span> or <span class="nb">{</span><span class="k">\tt</span> Head :- Body<span class="nb">}</span>. Note
</div><div id="l66" class="code_block">that because of the precedence of <span class="nb">{</span><span class="k">\tt</span> :-/2<span class="nb">}</span>, using the second form
</div><div id="l67" class="code_block">requires an extra set of parentheses: <span class="nb">{</span><span class="k">\tt</span> assert((Head :- Body))<span class="nb">}</span>.
</div><div id="l68" class="code_block">Default: first-argument indexing.
</div><div id="l69" class="code_block">
</div><div id="l70" class="code_block"><span class="k">\ouritem</span><span class="nb">{</span>asserta(+Clause)<span class="nb">}</span><span class="k">\index</span><span class="nb">{{</span><span class="k">\tt</span> asserta/1<span class="nb">}}</span>
</div><div id="l71" class="code_block">If the index specification for the preicate is not <span class="nb">{</span><span class="k">\tt</span> tries<span class="nb">}</span>, this
</div><div id="l72" class="code_block">predicate adds a dynamic clause, <span class="nb">{</span><span class="k">\tt</span> Clause<span class="nb">}</span>, to the database <span class="nb">{</span><span class="k">\em</span>
</div><div id="l73" class="code_block">before<span class="nb">}</span> any other clauses for the same predicate currently in the
</div><div id="l74" class="code_block">database.  If the index specification for the predicate is <span class="nb">{</span><span class="k">\tt</span> trie<span class="nb">}</span>,
</div><div id="l75" class="code_block">the clause is asserted arbitrarily within the trie, and a warning
</div><div id="l76" class="code_block">message sent to <span class="nb">{</span><span class="k">\tt</span> stderr<span class="nb">}</span>.
</div><div id="l77" class="code_block">
</div><div id="l78" class="code_block">
</div><div id="l79" class="code_block"><span class="k">\ouritem</span><span class="nb">{</span>assertz(+Clause)<span class="nb">}</span><span class="k">\index</span><span class="nb">{{</span><span class="k">\tt</span> assertz/1<span class="nb">}}</span>
</div><div id="l80" class="code_block">If the index specification for the predicate is not <span class="nb">{</span><span class="k">\tt</span> tries<span class="nb">}</span>, this
</div><div id="l81" class="code_block">predicate adds a dynamic clause, <span class="nb">{</span><span class="k">\tt</span> Clause<span class="nb">}</span>, to the database <span class="nb">{</span><span class="k">\em</span>
</div><div id="l82" class="code_block">after<span class="nb">}</span> any other clauses for the same predicate currently in the
</div><div id="l83" class="code_block">database.  If the index specification for the predicate is <span class="nb">{</span><span class="k">\tt</span> trie<span class="nb">}</span>,
</div><div id="l84" class="code_block">the clause is asserted arbitrarily within the trie, and a warning
</div><div id="l85" class="code_block">message sent to <span class="nb">{</span><span class="k">\tt</span> stderr<span class="nb">}</span>.
</div><div id="l86" class="code_block">
</div><div id="l87" class="code_block"><span class="k">\ouritem</span><span class="nb">{</span>retract(+Clause)<span class="nb">}</span><span class="k">\index</span><span class="nb">{{</span><span class="k">\tt</span> retract/1<span class="nb">}}</span>
</div><div id="l88" class="code_block">removes through backtracking all clauses in the database that match with
</div><div id="l89" class="code_block"><span class="nb">{</span><span class="k">\tt</span> Clause<span class="nb">}</span>.  <span class="nb">{</span><span class="k">\tt</span> Clause<span class="nb">}</span> must be of one of the forms:  <span class="nb">{</span><span class="k">\tt</span> Head<span class="nb">}</span> or
</div><div id="l90" class="code_block"><span class="nb">{</span><span class="k">\tt</span> Head :- Body<span class="nb">}</span>.  Note, that because of the precedence of <span class="nb">{</span><span class="k">\tt</span> :-/2<span class="nb">}</span>,
</div><div id="l91" class="code_block">using the second form requires an extra set of parentheses:
</div><div id="l92" class="code_block"><span class="nb">{</span><span class="k">\tt</span> retract((Head :- Body))<span class="nb">}</span>.  Space is reclaimed when a 
</div><div id="l93" class="code_block">clause is retracted.
</div><div id="l94" class="code_block">
</div><div id="l95" class="code_block"><span class="k">\ouritem</span><span class="nb">{</span>retractall(+Head)<span class="nb">}</span><span class="k">\index</span><span class="nb">{{</span><span class="k">\tt</span> retractall/1<span class="nb">}}</span>
</div><div id="l96" class="code_block">removes every clause in the database whose head matches with <span class="nb">{</span><span class="k">\tt</span> Head<span class="nb">}</span>.
</div><div id="l97" class="code_block">The predicate whose clauses have been retracted retains the <span class="nb">{</span><span class="k">\tt</span> dynamic<span class="nb">}</span>
</div><div id="l98" class="code_block">property (contrast this behavior with that of predicates 
</div><div id="l99" class="code_block"><span class="nb">{</span><span class="k">\tt</span> abolish/[1,2]<span class="nb">}</span> below).
</div><div id="l100" class="code_block">Predicate <span class="nb">{</span><span class="k">\tt</span> retractall/1<span class="nb">}</span> is determinate and always succeeds.
</div><div id="l101" class="code_block">The term <span class="nb">{</span><span class="k">\tt</span> Head<span class="nb">}</span> is not further instantiated by this call.
</div><div id="l102" class="code_block">
</div><div id="l103" class="code_block"><span class="k">\ouritem</span><span class="nb">{</span>abolish(+PredSpec)<span class="nb">}</span><span class="k">\index</span><span class="nb">{{</span><span class="k">\tt</span> abolish/1<span class="nb">}}</span>
</div><div id="l104" class="code_block">Removes the definition of the specified predicate.  <span class="nb">{</span><span class="k">\tt</span> PredSpec<span class="nb">}</span>
</div><div id="l105" class="code_block">is of the form <span class="nb">{</span><span class="k">\tt</span> Pred/Arity<span class="nb">}</span>.  Everything about the abolished
</div><div id="l106" class="code_block">predicate is completely forgotten by the system (including the
</div><div id="l107" class="code_block"><span class="nb">{</span><span class="k">\tt</span> dynamic<span class="nb">}</span> property).  There is also an <span class="nb">{</span><span class="k">\tt</span> abolish/2<span class="nb">}</span> which
</div><div id="l108" class="code_block">takes <span class="nb">{</span><span class="k">\tt</span> Pred<span class="nb">}</span> and <span class="nb">{</span><span class="k">\tt</span> Arity<span class="nb">}</span> as its two arguments.
</div><div id="l109" class="code_block">
</div><div id="l110" class="code_block"><span class="k">\ouritem</span><span class="nb">{</span>clause(+Head,?Body)<span class="nb">}</span><span class="k">\index</span><span class="nb">{{</span><span class="k">\tt</span> clause/2<span class="nb">}}</span>
</div><div id="l111" class="code_block">Returns through backtracking all dynamic clauses in the database whose head
</div><div id="l112" class="code_block">matches <span class="nb">{</span><span class="k">\tt</span> Head<span class="nb">}</span> and Body matches <span class="nb">{</span><span class="k">\tt</span> Body<span class="nb">}</span>.  For facts the <span class="nb">{</span><span class="k">\tt</span> Body<span class="nb">}</span> is
</div><div id="l113" class="code_block"><span class="nb">{</span><span class="k">\tt</span> true<span class="nb">}</span>.  
</div><div id="l114" class="code_block">
</div><div id="l115" class="code_block"><span class="k">\ouritem</span><span class="nb">{</span>retract<span class="k">\_nr</span>(+Clause)<span class="nb">}</span><span class="k">\index</span><span class="nb">{{</span><span class="k">\tt</span> retract<span class="k">\_nr</span>/1<span class="nb">}}</span>
</div><div id="l116" class="code_block">Performs just as <span class="nb">{</span><span class="k">\tt</span> retract/1<span class="nb">}</span> does, except that it does not reclaim the
</div><div id="l117" class="code_block">space used by the retracted clause. This is provided to allow programmers
</div><div id="l118" class="code_block">to modify dynamic clauses while executing them (a practice that is 
</div><div id="l119" class="code_block">discouraged.) For example, to retract an intersection, as described above,
</div><div id="l120" class="code_block">one could do:
</div><div id="l121" class="code_block"><span class="k">\begin</span><span class="nb">{</span>center<span class="nb">}</span>
</div><div id="l122" class="code_block"><span class="nb">{</span><span class="k">\tt</span> :- p(X), q(X), retract<span class="k">\_nr</span>(p(X)), retract<span class="k">\_nr</span>(q(X)), fail.<span class="nb">}</span>
</div><div id="l123" class="code_block"><span class="k">\end</span><span class="nb">{</span>center<span class="nb">}</span>
</div><div id="l124" class="code_block">In order to reclaim space after using <span class="nb">{</span><span class="k">\tt</span> retract<span class="k">\_nr</span>/1<span class="nb">}</span>, see 
</div><div id="l125" class="code_block"><span class="nb">{</span><span class="k">\tt</span> reclaim<span class="k">\_space</span>/1<span class="nb">}</span> below.  Predicate <span class="nb">{</span><span class="k">\tt</span> retract<span class="k">\_nr</span>/1<span class="nb">}</span>
</div><div id="l126" class="code_block">is not a standard predicate and must be imported from module <span class="nb">{</span><span class="k">\tt</span> assert<span class="nb">}</span>.
</div><div id="l127" class="code_block"><span class="nb">{</span><span class="k">\tt</span> retract<span class="k">\_nr</span>/1<span class="nb">}</span> is provided for (partial)
</div><div id="l128" class="code_block">compatibility with the <span class="nb">{</span><span class="k">\tt</span> retract/1<span class="nb">}</span> predicate of SB-Prolog.
</div><div id="l129" class="code_block">
</div><div id="l130" class="code_block"><span class="c">%In this case, the {\tt retract\_nr/1} deletes the clauses, but will not</span>
</div><div id="l131" class="code_block"><span class="c">%drastically modify the clause data structure,</span>
</div><div id="l132" class="code_block"><span class="c">%and this code will execute. Of course, space is not reclaimed for further</span>
</div><div id="l133" class="code_block"><span class="c">%use (but see {\tt reclaim\_space/1} below).  Predicate {\tt retract\_nr/1}</span>
</div><div id="l134" class="code_block"><span class="c">%is not a standard predicate but must be imported from module {\tt assert}.</span>
</div><div id="l135" class="code_block"><span class="c">%The use of this predicate is discouraged; it is provided for (partial)</span>
</div><div id="l136" class="code_block"><span class="c">%compatibility with the {\tt retract/1} predicate provided by SB-Prolog that</span>
</div><div id="l137" class="code_block"><span class="c">%did not reclaim space.</span>
</div><div id="l138" class="code_block">
</div><div id="l139" class="code_block"><span class="k">\ouritem</span><span class="nb">{</span>reclaim<span class="k">\_space</span>(+Head)<span class="nb">}</span><span class="k">\index</span><span class="nb">{{</span><span class="k">\tt</span> reclaim<span class="k">\_space</span>/1<span class="nb">}}</span>
</div><div id="l140" class="code_block">Runs through the dynamic code for the predicate indicated by <span class="nb">{</span><span class="k">\tt</span> Head<span class="nb">}</span>, and
</div><div id="l141" class="code_block">reclaims space for any clauses that have been deleted from that predicate by
</div><div id="l142" class="code_block"><span class="nb">{</span><span class="k">\tt</span> retract<span class="k">\_nr</span>/1<span class="nb">}</span>.  This cannot safely be used when execution is still
</div><div id="l143" class="code_block">within some invocation of the specified predicate, or will backtrack into
</div><div id="l144" class="code_block">such a scope.  To complete our example of retracting the intersection of
</div><div id="l145" class="code_block">dynamic predicates:
</div><div id="l146" class="code_block"><span class="k">\begin</span><span class="nb">{</span>center<span class="nb">}</span>
</div><div id="l147" class="code_block"><span class="nb">{</span><span class="k">\tt</span> :- p(X), q(X), retract<span class="k">\_nr</span>(p(X)), retract<span class="k">\_nr</span>(q(X)), fail<span class="k">\</span> ;<span class="k">\\</span>
</div><div id="l148" class="code_block">     reclaim<span class="k">\_space</span>(p(<span class="k">\_</span>)), reclaim<span class="k">\_space</span>(q(<span class="k">\_</span>)).<span class="nb">}</span>
</div><div id="l149" class="code_block"><span class="k">\end</span><span class="nb">{</span>center<span class="nb">}</span>
</div><div id="l150" class="code_block">would do the trick. Notice that the <span class="nb">{</span><span class="k">\tt</span> reclaim<span class="k">\_space</span><span class="nb">}</span> calls 
</div><div id="l151" class="code_block">must be made after execution has completely failed
</div><div id="l152" class="code_block">out of choice points for <span class="nb">{</span><span class="k">\tt</span> q(X)<span class="nb">}</span> and <span class="nb">{</span><span class="k">\tt</span> p(X)<span class="nb">}</span>.  Predicate 
</div><div id="l153" class="code_block"><span class="nb">{</span><span class="k">\tt</span> reclaim<span class="k">\_space</span>/1<span class="nb">}</span> is not
</div><div id="l154" class="code_block">standard but must be imported from module <span class="nb">{</span><span class="k">\tt</span> assert<span class="nb">}</span>.
</div><div id="l155" class="code_block">As with <span class="nb">{</span><span class="k">\tt</span> retract<span class="k">\_nr</span><span class="nb">}</span>, the use of this predicate is discouraged; 
</div><div id="l156" class="code_block">it is provided for (partial) compatibility with SB-Prolog.
</div><div id="l157" class="code_block">
</div><div id="l158" class="code_block"><span class="k">\comment</span><span class="nb">{</span> 
</div><div id="l159" class="code_block">TLS: I dont think we need hashtable size given that we use dynamic
</div><div id="l160" class="code_block">hashing.  We still are supporting it, but we dont need to encourage it
</div><div id="l161" class="code_block"><span class="k">\vspace</span><span class="nb">{</span>-.35in<span class="nb">}</span>
</div><div id="l162" class="code_block"><span class="k">\ouritem</span><span class="nb">{</span>index(+PredSpec, +IndexSpec, +HashTableSize)<span class="nb">}</span><span class="k">\index</span><span class="nb">{{</span><span class="k">\tt</span> index/3<span class="nb">}}</span>
</div><div id="l163" class="code_block">
</div><div id="l164" class="code_block">If <span class="nb">{</span><span class="k">\tt</span> index/3<span class="nb">}</span> is used, then the predicate indicated by <span class="nb">{</span><span class="k">\tt</span>
</div><div id="l165" class="code_block">PredSpec<span class="nb">}</span> is declared to be indexed according to <span class="nb">{</span><span class="k">\tt</span> IndexSpec<span class="nb">}</span> using
</div><div id="l166" class="code_block">initial hash table of sizes of <span class="nb">{</span><span class="k">\tt</span> HashTableSize<span class="nb">}</span>.  After this
</div><div id="l167" class="code_block">directive is given, all clauses asserted to <span class="nb">{</span><span class="k">\tt</span> PredSpec<span class="nb">}</span> will be so
</div><div id="l168" class="code_block">indexed.  
</div><div id="l169" class="code_block">
</div><div id="l170" class="code_block">For dynamic predicates,
</div><div id="l171" class="code_block"><span class="nb">{</span><span class="k">\tt</span> index/2<span class="nb">}</span> is an executable directive that can be used to specify
</div><div id="l172" class="code_block">the indexing of a predicate before clauses to that predicate have been
</div><div id="l173" class="code_block">asserted.  
</div><div id="l174" class="code_block">
</div><div id="l175" class="code_block">
</div><div id="l176" class="code_block">As an example, one could specify: <span class="nb">{</span><span class="k">\tt</span> index(p/5,[1+2,1,4],300)<span class="nb">}</span>.
</div><div id="l177" class="code_block">After clauses are asserted to it, a call to <span class="nb">{</span><span class="k">\tt</span> p/5<span class="nb">}</span> would first
</div><div id="l178" class="code_block">check to see if both the first and second arguments are nonvariable
</div><div id="l179" class="code_block">and if so, use an index based on both those values. Otherwise, it
</div><div id="l180" class="code_block">would see if the second argument is nonvariable and if so, use an
</div><div id="l181" class="code_block">index based on it. Otherwise, it would see if the fourth argument is
</div><div id="l182" class="code_block">nonvariable and if so use an index based on it. As a last resort, it would
</div><div id="l183" class="code_block">use no index but backtrack through all the clauses in the predicate.
</div><div id="l184" class="code_block">(Notice that it may well make sense to include an argument that 
</div><div id="l185" class="code_block">appears in a joint specification later alone, as 1 in this example,
</div><div id="l186" class="code_block">but it never makes sense foring the single argument to appear earlier. In
</div><div id="l187" class="code_block">that case the joint index would never be used.)
</div><div id="l188" class="code_block">
</div><div id="l189" class="code_block"><span class="nb">}</span>
</div><div id="l190" class="code_block">
</div><div id="l191" class="code_block"><span class="k">\ouritem</span><span class="nb">{</span>index(+PredSpec, +IndexSpec)<span class="nb">}</span><span class="k">\index</span><span class="nb">{{</span><span class="k">\tt</span> index/2<span class="nb">}}</span>
</div><div id="l192" class="code_block"><span class="k">\label</span><span class="nb">{</span>index<span class="nb">_</span>dynamic<span class="nb">}</span> <span class="k">\index</span><span class="nb">{</span>indexing!dynamic predicates<span class="nb">}</span>
</div><div id="l193" class="code_block">
</div><div id="l194" class="code_block">In general, XSB supports hash-based indexing on various arguments or
</div><div id="l195" class="code_block">combinations of arguments, along with trie-based indexing.  The
</div><div id="l196" class="code_block">availability of various kinds of indexing depends on whether code is
</div><div id="l197" class="code_block">static (e.g. compiled) or dynamic (e.g. asserted or loaded with <span class="nb">{</span><span class="k">\tt</span>
</div><div id="l198" class="code_block">load<span class="k">\_dyn</span>/1<span class="nb">}</span>).  The executable directive <span class="nb">{</span><span class="k">\tt</span> index/2<span class="nb">}</span> does <span class="nb">{</span><span class="k">\em</span>
</div><div id="l199" class="code_block">not<span class="k">\/</span><span class="nb">}</span> re-index an already existing predicate but takes effect only
</div><div id="l200" class="code_block">for clauses asserted after the directive has been given.  Index
</div><div id="l201" class="code_block">directives can be given to the compiler as part of source code or
</div><div id="l202" class="code_block">executed during program execution (analogously to <span class="nb">{</span><span class="k">\tt</span> op/3<span class="nb">}</span>).
</div><div id="l203" class="code_block">
</div><div id="l204" class="code_block"><span class="k">\begin</span><span class="nb">{</span>itemize<span class="nb">}</span>
</div><div id="l205" class="code_block"><span class="k">\item</span> <span class="nb">{</span><span class="k">\em</span> Hash-based Indexing<span class="nb">}</span> 
</div><div id="l206" class="code_block"><span class="k">\begin</span><span class="nb">{</span>itemize<span class="nb">}</span>
</div><div id="l207" class="code_block"><span class="k">\item</span> <span class="nb">{</span><span class="k">\em</span> Static Predicates<span class="nb">}</span><span class="k">\</span> 
</div><div id="l208" class="code_block">In this case <span class="nb">{</span><span class="k">\tt</span> IndexSpec<span class="nb">}</span> must be a non-negative integer which
</div><div id="l209" class="code_block">indicates the argument on which an index is to be constructed.  If
</div><div id="l210" class="code_block"><span class="nb">{</span><span class="k">\tt</span> IndexSpec<span class="nb">}</span> is~0, then no index is kept (possibly an efficient
</div><div id="l211" class="code_block">strategy for predicates with only one or two clauses.)
</div><div id="l212" class="code_block"><span class="k">\item</span> <span class="nb">{</span><span class="k">\em</span> Dynamic Predicates<span class="nb">}</span>
</div><div id="l213" class="code_block">For a dynamic predicate, (to which no clauses have yet been asserted),
</div><div id="l214" class="code_block"><span class="nb">{</span><span class="k">\tt</span> IndexSpec<span class="nb">}</span> is either an <span class="nb">{</span><span class="k">\tt</span> IndexElt<span class="nb">}</span> or a list of <span class="nb">{</span><span class="k">\tt</span>
</div><div id="l215" class="code_block">IndexElt<span class="nb">}</span>s.  Each <span class="nb">{</span><span class="k">\tt</span> IndexElt<span class="nb">}</span> defines an index and specifies an argument or group of
</div><div id="l216" class="code_block">arguments that make up the search key of the index.  An argument is
</div><div id="l217" class="code_block">indicated by a small integer (<span class="nb">{</span><span class="k">\tt</span> ArgNo<span class="nb">}</span>) indicating the argument number (starting
</div><div id="l218" class="code_block">from 1) to use in the index.  An argument indicator may optionally be annotated
</div><div id="l219" class="code_block">as <span class="nb">{</span><span class="k">\tt</span> *(ArgNo)<span class="nb">}</span>.  The argument number alone indicates that only the
</div><div id="l220" class="code_block">main functor symbol of the indicated argument will participate in the
</div><div id="l221" class="code_block">index.  When annotated with the asterisk, the first 5 fields in the
</div><div id="l222" class="code_block">corresponding term (in a depth-first traversal of the term) will be
</div><div id="l223" class="code_block">used in the index.  If there are fewer than 5, they all will be used.
</div><div id="l224" class="code_block">If any of the first 5 is a variable, then the index cannot be used.
</div><div id="l225" class="code_block">
</div><div id="l226" class="code_block">An index is usually on a single argument, in which case the <span class="nb">{</span><span class="k">\tt</span>
</div><div id="l227" class="code_block">IndexElt<span class="nb">}</span> consists of a single argument indicator.  However, sometimes
</div><div id="l228" class="code_block">one wants an index on multiple arguments, meaning that the values of
</div><div id="l229" class="code_block">several arguments are to be concatenated to create the search key of
</div><div id="l230" class="code_block">the index.  Such a multi-argument (or joint) index is indicated by
</div><div id="l231" class="code_block">using an <span class="nb">{</span><span class="k">\tt</span> IndexElt<span class="nb">}</span> that has up to 3 argument indicators separated
</div><div id="l232" class="code_block">by the <span class="nb">{</span><span class="k">\tt</span> +<span class="nb">}</span> (plus) operator, e.g., <span class="nb">{</span><span class="k">\tt</span> 1+2+3<span class="nb">}</span>.
</div><div id="l233" class="code_block">
</div><div id="l234" class="code_block">For example, <span class="nb">{</span><span class="k">\tt</span> index(p/3,[2,1])<span class="nb">}</span> indicates that clauses asserted to
</div><div id="l235" class="code_block">the predicate <span class="nb">{</span><span class="k">\tt</span> p/3<span class="nb">}</span> should be indexed on both the second and the
</div><div id="l236" class="code_block">first argument.  Subsequent calls to <span class="nb">{</span><span class="k">\tt</span> p/3<span class="nb">}</span> will first check to see
</div><div id="l237" class="code_block">if the second argument is nonvariable, and if so use that index, using
</div><div id="l238" class="code_block">the main functor symbol of that argument. If the second argument is
</div><div id="l239" class="code_block">variable, it will next check to see if the first argument is
</div><div id="l240" class="code_block">nonvariable and if so, use that index, built on the main functor
</div><div id="l241" class="code_block">symbol of the first argument.  
</div><div id="l242" class="code_block">
</div><div id="l243" class="code_block"><span class="nb">{</span><span class="k">\tt</span> index(p/3,[*(2),1])<span class="nb">}</span> would result in similar behavior as the
</div><div id="l244" class="code_block">previous example, but the first index to be tried (on the second
</div><div id="l245" class="code_block">argument) would be built using more of the term value in that second
</div><div id="l246" class="code_block">argument position (not just the main functor symbol.)
</div><div id="l247" class="code_block">
</div><div id="l248" class="code_block">As another example, one could specify: <span class="nb">{</span><span class="k">\tt</span> index(p/5,[1+2,1,4])<span class="nb">}</span>.
</div><div id="l249" class="code_block">After clauses are asserted to it, a call to <span class="nb">{</span><span class="k">\tt</span> p/5<span class="nb">}</span> would first
</div><div id="l250" class="code_block">check to see if both the first and second arguments are nonvariable
</div><div id="l251" class="code_block">and if so, use an index based on both those values. Otherwise, it
</div><div id="l252" class="code_block">would see if the first argument is nonvariable and if so, use an index
</div><div id="l253" class="code_block">based on it. Otherwise, it would see if the fourth argument is
</div><div id="l254" class="code_block">nonvariable and if so use an index based on it. As a last resort, it
</div><div id="l255" class="code_block">would use no index but backtrack through all the clauses in the
</div><div id="l256" class="code_block">predicate.  In all these cases, the indexes are built using only the
</div><div id="l257" class="code_block">main functor symbol in the indicated argument position. (Notice that
</div><div id="l258" class="code_block">it may well make sense to include an argument that appears in a joint
</div><div id="l259" class="code_block">specification later alone, as 1 in this example, but it never makes
</div><div id="l260" class="code_block">sense forcing the single argument to appear earlier. In that case the
</div><div id="l261" class="code_block">joint index would never be used.)
</div><div id="l262" class="code_block">
</div><div id="l263" class="code_block">If we want to use similar indexing on <span class="nb">{</span><span class="k">\tt</span> p/5<span class="nb">}</span> of the previous
</div><div id="l264" class="code_block">example, except say argument 1 takes on complex term values and we
</div><div id="l265" class="code_block">want to index on more of those terms, we might specify the index as
</div><div id="l266" class="code_block"><span class="nb">{</span><span class="k">\tt</span> index(p/5,[*(1)+2,*(1),4])<span class="nb">}</span>.
</div><div id="l267" class="code_block">
</div><div id="l268" class="code_block"><span class="k">\end</span><span class="nb">{</span>itemize<span class="nb">}</span>
</div><div id="l269" class="code_block">
</div><div id="l270" class="code_block"><span class="k">\item</span> <span class="nb">{</span><span class="k">\em</span> Trie-based Indexing<span class="nb">}</span>
</div><div id="l271" class="code_block">The executable declaration <span class="nb">{</span><span class="k">\tt</span> index(Predspec,trie)<span class="nb">}</span> causes clauses
</div><div id="l272" class="code_block">for <span class="nb">{</span><span class="k">\tt</span> Predspec<span class="nb">}</span> to be asserted using tries (see <span class="k">\cite</span><span class="nb">{</span>RRSSW98<span class="nb">}</span>,
</div><div id="l273" class="code_block">which is available through the XSB web page).  The name trie indexing
</div><div id="l274" class="code_block">is something of a misnomer since the trie itself both indexes the term
</div><div id="l275" class="code_block">and represents it.  In XSB, the above trie index is formed using a
</div><div id="l276" class="code_block">left-to-right traversal of the unit clauses.  These indexes can be
</div><div id="l277" class="code_block">very effective if discriminating information lies deep within a term,
</div><div id="l278" class="code_block">and if there is sharing of left-prefixes of a term, can reduce the
</div><div id="l279" class="code_block">space needed to represent terms.  Furthermore, asserting a unit clause
</div><div id="l280" class="code_block">as a trie is much faster than asserting it using default WAM code.
</div><div id="l281" class="code_block"><span class="k">\comment</span><span class="nb">{</span>
</div><div id="l282" class="code_block">Trie indexing can be used with alternative or joint indexes.  For the
</div><div id="l283" class="code_block">directive <span class="nb">{</span><span class="k">\tt</span> index(p/3,[2,1],trie)<span class="nb">}</span>, two trie indices would be
</div><div id="l284" class="code_block">formed for <span class="nb">{</span><span class="k">\tt</span> p/3<span class="nb">}</span>: one that traversed arguments in order <span class="nb">{</span><span class="k">\em</span>
</div><div id="l285" class="code_block">2,1,3<span class="nb">}</span> and another that traversed arguments in order <span class="nb">{</span><span class="k">\em</span> 1,2,3<span class="nb">}</span>.  The
</div><div id="l286" class="code_block">actual implementation seeks to reduce redundant storage of code for
</div><div id="l287" class="code_block">alternative indices.
</div><div id="l288" class="code_block"><span class="nb">}</span>
</div><div id="l289" class="code_block">
</div><div id="l290" class="code_block">Despite these advantages, representing terms as tries leads to
</div><div id="l291" class="code_block">semantic differences from asserted code, of which the user should be
</div><div id="l292" class="code_block">aware.  First, the order of clauses within a trie is arbitrary: using
</div><div id="l293" class="code_block"><span class="nb">{</span><span class="k">\tt</span> asserta/1<span class="nb">}</span> or <span class="nb">{</span><span class="k">\tt</span> assertz<span class="nb">}</span> for a predicate currently using trie
</div><div id="l294" class="code_block">indexing will give the same behavior as using <span class="nb">{</span><span class="k">\tt</span> assert<span class="nb">}</span>.  Also, the
</div><div id="l295" class="code_block">current version of XSB only allows trie indexing for unit clauses.
</div><div id="l296" class="code_block">
</div><div id="l297" class="code_block">Trie-based indexing is available only for dynamic predicates.
</div><div id="l298" class="code_block"><span class="k">\end</span><span class="nb">{</span>itemize<span class="nb">}</span>
</div><div id="l299" class="code_block">
</div><div id="l300" class="code_block"><span class="k">\ouritem</span><span class="nb">{</span>dynamic(+PredSpec)<span class="nb">}</span><span class="k">\index</span><span class="nb">{{</span><span class="k">\tt</span> dynamic/1<span class="nb">}}</span><span class="k">\label</span><span class="nb">{</span>dynamic/1<span class="nb">}</span>
</div><div id="l301" class="code_block">is an executable predicate which converts a predicate specified as
</div><div id="l302" class="code_block">(Predicate/Arity) to a dynamic predicate. If <span class="nb">{</span><span class="k">\tt</span> Predicate<span class="nb">}</span> is not
</div><div id="l303" class="code_block">previously defined, it will be initialized to empty (so that calls to
</div><div id="l304" class="code_block">it quietly fail, instead of issuing <span class="nb">{</span><span class="k">\sf</span> ``Undefined predicate&#39;&#39;<span class="nb">}</span>
</div><div id="l305" class="code_block">error messages.) If the predicate is previously defined and dynamic,
</div><div id="l306" class="code_block"><span class="nb">{</span><span class="k">\tt</span> dynamic/1<span class="nb">}</span> is a noop. If previously defined as compiled, <span class="nb">{</span><span class="k">\tt</span>
</div><div id="l307" class="code_block">Predicate<span class="nb">}</span> will be converted to dynamic, which means that clauses can
</div><div id="l308" class="code_block">be added, although the compiled portion cannot be manipulated.  Note
</div><div id="l309" class="code_block">that <span class="nb">{</span><span class="k">\tt</span> dynamic/1<span class="nb">}</span> can be used like a compiler directive, since it
</div><div id="l310" class="code_block">will be passed through to be executed when the module is loaded. Note,
</div><div id="l311" class="code_block">however, that the semantics is different from that of the standard
</div><div id="l312" class="code_block"><span class="k">\cite</span><span class="nb">{</span>ISO-Prolog<span class="nb">}</span> when the file contains clauses defining the
</div><div id="l313" class="code_block">so-specified predicate.
</div><div id="l314" class="code_block">
</div><div id="l315" class="code_block"><span class="k">\ouritem</span><span class="nb">{</span>table(+PredSpec)<span class="nb">}</span><span class="k">\index</span><span class="nb">{{</span><span class="k">\tt</span> table/1<span class="nb">}}</span>
</div><div id="l316" class="code_block">is an executable predicate, where PredSpec is a predicate
</div><div id="l317" class="code_block">specification for a dynamic predicate. (This is also a compiler
</div><div id="l318" class="code_block">directive when <span class="nb">{</span><span class="k">\tt</span> PredSpec<span class="nb">}</span> specifies a compiled predicate. See the
</div><div id="l319" class="code_block">section of this manual on compiler directives.) This predicate
</div><div id="l320" class="code_block">declares a dynamic predicate to be tabled. It simply saves information
</div><div id="l321" class="code_block">to be used at the time of assert and so it must be called before any
</div><div id="l322" class="code_block">clauses are asserted into the specified predicate in order for the
</div><div id="l323" class="code_block">predicate to be tabled.
</div><div id="l324" class="code_block">
</div><div id="l325" class="code_block"><span class="k">\end</span><span class="nb">{</span>description<span class="nb">}</span>
</div><div id="l326" class="code_block">
</div><div id="l327" class="code_block"><span class="c">%----------------------------------------------------------------------</span>
</div><div id="l328" class="code_block"><span class="c">%\input{tr_assert}	% To be uncommented when they become standard.</span>
</div><div id="l329" class="code_block"><span class="c">%----------------------------------------------------------------------</span>
</div><div id="l330" class="code_block">
</div><div id="l331" class="code_block"><span class="k">\subsection</span><span class="nb">{</span>The <span class="nb">{</span><span class="k">\tt</span> storage<span class="nb">}</span> Module: Associative Arrays and Backtrackable Updates<span class="nb">}</span>
</div><div id="l332" class="code_block">
</div><div id="l333" class="code_block"><span class="k">\label</span><span class="nb">{</span>storage module<span class="nb">}</span>
</div><div id="l334" class="code_block">XSB provides a high-level interface that supports efficient storage and
</div><div id="l335" class="code_block">querying of key-value pairs. A <span class="k">\emph</span><span class="nb">{</span>key-value pair<span class="nb">}</span> is an association
</div><div id="l336" class="code_block">between keys and the corresponding values. There can be at most one value
</div><div id="l337" class="code_block">associated with a given key. A key-value pair can be stored, deleted or
</div><div id="l338" class="code_block">queried. XSB provides two sets of predicates for handling such pairs:
</div><div id="l339" class="code_block">backtrackable and non-backtrackable. The backtrackable primitives for
</div><div id="l340" class="code_block">insertion and deletion of key-value pairs commit their changes to the
</div><div id="l341" class="code_block">database only if the goal succeeds. Otherwise, if the goal fails, the
</div><div id="l342" class="code_block">change is undone. Similarly, XSB provides primitive for backtrackable
</div><div id="l343" class="code_block">updates analogous to <span class="nb">{</span><span class="k">\tt</span> assert<span class="nb">}</span> and <span class="nb">{</span><span class="k">\tt</span> retract<span class="nb">}</span>. The semantics of
</div><div id="l344" class="code_block">backtrackable updates is defined using Transaction logic <span class="k">\cite</span><span class="nb">{</span>BoKi94<span class="nb">}</span>.
</div><div id="l345" class="code_block">
</div><div id="l346" class="code_block">All the predicates described in this section must be imported from
</div><div id="l347" class="code_block">module <span class="nb">{</span><span class="k">\tt</span> storage<span class="nb">}</span>.
</div><div id="l348" class="code_block">
</div><div id="l349" class="code_block"><span class="k">\subsubsection</span><span class="nb">{</span>Non-backtrackable Storage<span class="nb">}</span>
</div><div id="l350" class="code_block">
</div><div id="l351" class="code_block"><span class="k">\begin</span><span class="nb">{</span>description<span class="nb">}</span>
</div><div id="l352" class="code_block"><span class="k">\ouritem</span><span class="nb">{</span>storage<span class="k">\_insert\_keypair</span>(+StorageName,+Key, +Value, ?Inserted)<span class="nb">}</span><span class="k">\index</span><span class="nb">{{</span><span class="k">\tt</span> storage<span class="k">\_insert\_keypair</span>/4<span class="nb">}}</span>
</div><div id="l353" class="code_block"><span class="c">%%</span>
</div><div id="l354" class="code_block">Insert the given Key-Value pair into the database. If the pair is new, then
</div><div id="l355" class="code_block"><span class="nb">{</span><span class="k">\tt</span> Inserted<span class="nb">}</span> unifies with 1. If the pair is already in the database, then
</div><div id="l356" class="code_block"><span class="nb">{</span><span class="k">\tt</span> Inserted<span class="nb">}</span> unifies with 0. If the database already contains a pair with
</div><div id="l357" class="code_block">the given key that is associated with a <span class="k">\emph</span><span class="nb">{</span>different<span class="nb">}</span> value, then
</div><div id="l358" class="code_block"><span class="nb">{</span><span class="k">\tt</span> Inserted<span class="nb">}</span> unifies with -1.
</div><div id="l359" class="code_block">The first argument, <span class="nb">{</span><span class="k">\tt</span> Storage<span class="nb">}</span>, must be an atom naming the storage to be
</div><div id="l360" class="code_block">used. Different names denote different storages.
</div><div id="l361" class="code_block">In both cases the predicate succeeds.
</div><div id="l362" class="code_block">
</div><div id="l363" class="code_block"><span class="k">\ouritem</span><span class="nb">{</span>storage<span class="k">\_delete\_keypair</span>(+StorageName, +Key, ?Deleted)<span class="nb">}</span>
</div><div id="l364" class="code_block"><span class="k">\index</span><span class="nb">{{</span><span class="k">\tt</span> storage<span class="k">\_delete\_keypair</span>/3<span class="nb">}}</span>
</div><div id="l365" class="code_block"><span class="c">%%</span>
</div><div id="l366" class="code_block">Delete the key-value pair with the given key from the databases. If
</div><div id="l367" class="code_block">the pair was in the database then <span class="nb">{</span><span class="k">\tt</span> Deleted<span class="nb">}</span> unifies with 1.
</div><div id="l368" class="code_block">If it was <span class="k">\emph</span><span class="nb">{</span>not<span class="nb">}</span> in the databases then <span class="nb">{</span><span class="k">\tt</span> Deleted<span class="nb">}</span> unifies with 0.
</div><div id="l369" class="code_block">The first argument, <span class="nb">{</span><span class="k">\tt</span> Storage<span class="nb">}</span>, must be an atom naming the storage to be
</div><div id="l370" class="code_block">used. Different names denote different storages.
</div><div id="l371" class="code_block">In both cases the predicate succeeds.
</div><div id="l372" class="code_block">
</div><div id="l373" class="code_block"><span class="k">\ouritem</span><span class="nb">{</span>storage<span class="k">\_find\_keypair</span>(+StorageName, +Key, ?Value)<span class="nb">}</span>
</div><div id="l374" class="code_block"><span class="k">\index</span><span class="nb">{{</span><span class="k">\tt</span> storage<span class="k">\_find\_keypair</span>/3<span class="nb">}}</span>
</div><div id="l375" class="code_block"><span class="c">%%</span>
</div><div id="l376" class="code_block">If the database has a key pair with the given key, then <span class="nb">{</span><span class="k">\tt</span> Value<span class="nb">}</span> unifies
</div><div id="l377" class="code_block">with the value stored in the database. If no such pair exists in the
</div><div id="l378" class="code_block">database, then the goal fails.
</div><div id="l379" class="code_block">
</div><div id="l380" class="code_block">Note that this predicate works with non-backtrackable associative arrays
</div><div id="l381" class="code_block">described above as well as with the backtrackable ones, described below.
</div><div id="l382" class="code_block">
</div><div id="l383" class="code_block"><span class="k">\ouritem</span><span class="nb">{</span>storage<span class="k">\_insert\_fact</span>(+StorageName, +Fact, ?Inserted)<span class="nb">}</span><span class="k">\index</span><span class="nb">{{</span><span class="k">\tt</span> storage<span class="k">\_insert\_fact</span>/3<span class="nb">}}</span>
</div><div id="l384" class="code_block">Similar to keypair insertion, but this primitive inserts facts rather than
</div><div id="l385" class="code_block">key pairs.
</div><div id="l386" class="code_block">
</div><div id="l387" class="code_block"><span class="k">\ouritem</span><span class="nb">{</span>storage<span class="k">\_delete\_fact</span>(+StorageName, +Fact, ?Inserted)<span class="nb">}</span><span class="k">\index</span><span class="nb">{{</span><span class="k">\tt</span> storage<span class="k">\_delete\_fact</span>/3<span class="nb">}}</span>
</div><div id="l388" class="code_block">Similar to keypair deletion, but this primitive deletes facts rather than
</div><div id="l389" class="code_block">key pairs.
</div><div id="l390" class="code_block">
</div><div id="l391" class="code_block"><span class="k">\ouritem</span><span class="nb">{</span>storage<span class="k">\_find\_fact</span>(+StorageName, +Fact)<span class="nb">}</span><span class="k">\index</span><span class="nb">{{</span><span class="k">\tt</span> storage<span class="k">\_find\_fact</span>/2<span class="nb">}}</span>
</div><div id="l392" class="code_block">Similar to keypair finding, but this primitive finds facts facts rather than
</div><div id="l393" class="code_block">key pairs.
</div><div id="l394" class="code_block"><span class="c">%%</span>
</div><div id="l395" class="code_block"><span class="k">\end</span><span class="nb">{</span>description<span class="nb">}</span>
</div><div id="l396" class="code_block">
</div><div id="l397" class="code_block"><span class="k">\subsubsection</span><span class="nb">{</span>Backtrackable Updates<span class="nb">}</span>
</div><div id="l398" class="code_block"><span class="k">\label</span><span class="nb">{</span>backtrackable update<span class="nb">}</span>
</div><div id="l399" class="code_block">
</div><div id="l400" class="code_block"><span class="k">\begin</span><span class="nb">{</span>description<span class="nb">}</span>
</div><div id="l401" class="code_block"><span class="k">\ouritem</span><span class="nb">{</span>storage<span class="k">\_insert\_keypair\_bt</span>(+StorageName, +Key, +Value, ?Inserted)<span class="nb">}</span>
</div><div id="l402" class="code_block"><span class="k">\index</span><span class="nb">{{</span><span class="k">\tt</span> storage<span class="k">\_insert\_keypair\_bt</span>/4<span class="nb">}}</span>
</div><div id="l403" class="code_block">This predicate works exactly as its non-backtrackable counterpart,
</div><div id="l404" class="code_block"><span class="nb">{</span><span class="k">\tt</span> storage<span class="k">\_insert\_keypair</span>/4<span class="nb">}</span>, when the top-level goal succeeds.
</div><div id="l405" class="code_block">However, if the top-level goal fails, then the result of the insertion is
</div><div id="l406" class="code_block">undone. In other words, the pair remains in the database until it is
</div><div id="l407" class="code_block">explicitly deleted or until the top-level query fails. The exact semantics
</div><div id="l408" class="code_block">is defined by Transaction Logic <span class="k">\cite</span><span class="nb">{</span>BoKi94<span class="nb">}</span>.
</div><div id="l409" class="code_block">
</div><div id="l410" class="code_block">Backtrackable key-value pairs are kept in the same database as
</div><div id="l411" class="code_block">non-backtrackable pairs and are queried through the same predicate
</div><div id="l412" class="code_block"><span class="nb">{</span><span class="k">\tt</span> keypair<span class="k">\_find</span>/2<span class="nb">}</span>.
</div><div id="l413" class="code_block">
</div><div id="l414" class="code_block"><span class="k">\ouritem</span><span class="nb">{</span>storage<span class="k">\_delete\_keypair\_bt</span>(+StorageName, +Key, ?Deleted)<span class="nb">}</span>
</div><div id="l415" class="code_block"><span class="k">\index</span><span class="nb">{{</span><span class="k">\tt</span> storage<span class="k">\_delete\_keypair\_bt</span>/3<span class="nb">}}</span>
</div><div id="l416" class="code_block"><span class="c">%%</span>
</div><div id="l417" class="code_block">Like <span class="nb">{</span><span class="k">\tt</span> storage<span class="k">\_delete\_keypair</span>/3<span class="nb">}</span>, but backtrackable.
</div><div id="l418" class="code_block">
</div><div id="l419" class="code_block">
</div><div id="l420" class="code_block"><span class="k">\ouritem</span><span class="nb">{</span>storage<span class="k">\_insert\_fact\_bt</span>(+StorageName, +Goal)<span class="nb">}</span> <span class="k">\index</span><span class="nb">{{</span><span class="k">\tt</span> storage<span class="k">\_insert\_fact\_bt</span>/2<span class="nb">}}</span>
</div><div id="l421" class="code_block"><span class="c">%%</span>
</div><div id="l422" class="code_block">Like <span class="nb">{</span><span class="k">\tt</span> storage<span class="k">\_insert\_fact</span>/2<span class="nb">}</span>, but backtrackable.
</div><div id="l423" class="code_block">
</div><div id="l424" class="code_block"><span class="k">\ouritem</span><span class="nb">{</span>storage<span class="k">\_delete\_fact\_bt</span>(+StorageName, +Goal)<span class="nb">}</span> 
</div><div id="l425" class="code_block"><span class="k">\index</span><span class="nb">{{</span><span class="k">\tt</span> storage<span class="k">\_delete\_fact\_bt</span>/2<span class="nb">}}</span>
</div><div id="l426" class="code_block"><span class="c">%%</span>
</div><div id="l427" class="code_block">This is a backtrackable version of <span class="nb">{</span><span class="k">\tt</span> storage<span class="k">\_delete\_fact</span>/2<span class="nb">}</span>.
</div><div id="l428" class="code_block">
</div><div id="l429" class="code_block"><span class="k">\ouritem</span><span class="nb">{</span>storage<span class="k">\_reclaim\_space</span>(+StorageName)<span class="nb">}</span> <span class="k">\index</span><span class="nb">{{</span><span class="k">\tt</span> storage<span class="k">\_reclaim\_space</span>/1<span class="nb">}}</span>
</div><div id="l430" class="code_block"><span class="c">%%</span>
</div><div id="l431" class="code_block">This is similar to <span class="nb">{</span><span class="k">\tt</span> reclaim<span class="k">\_space</span>/1<span class="nb">}</span> for <span class="nb">{</span><span class="k">\tt</span> assert<span class="nb">}</span> and <span class="nb">{</span><span class="k">\tt</span>
</div><div id="l432" class="code_block">  retract<span class="nb">}</span>, but it is used for storage managed by the primitives defined in
</div><div id="l433" class="code_block">the <span class="nb">{</span><span class="k">\tt</span> storage<span class="nb">}</span> module. As with <span class="nb">{</span><span class="k">\tt</span> reclaim<span class="k">\_space</span>/1<span class="nb">}</span>, this goal is
</div><div id="l434" class="code_block">typically called just before returning to the top level.
</div><div id="l435" class="code_block"><span class="c">%%</span>
</div><div id="l436" class="code_block"><span class="k">\end</span><span class="nb">{</span>description<span class="nb">}</span>
</div><div id="l437" class="code_block">
</div><div id="l438" class="code_block">
</div><div id="l439" class="code_block"><span class="c">%=====================================================================</span>
</div><div id="l440" class="code_block">
</div><div id="l441" class="code_block"><span class="k">\section</span><span class="nb">{</span>Execution State<span class="nb">}</span><span class="k">\label</span><span class="nb">{</span>environmental<span class="nb">}</span>
</div><div id="l442" class="code_block">
</div><div id="l443" class="code_block"><span class="k">\begin</span><span class="nb">{</span>description<span class="nb">}</span>
</div><div id="l444" class="code_block">
</div><div id="l445" class="code_block"><span class="k">\ouritem</span><span class="nb">{</span>break<span class="nb">}</span><span class="k">\index</span><span class="nb">{{</span><span class="k">\tt</span> break/0<span class="nb">}}</span>
</div><div id="l446" class="code_block">    Causes the current execution to be suspended at the beginning of the next 
</div><div id="l447" class="code_block">    call.  The interpreter then enters break level 1 and is ready to accept
</div><div id="l448" class="code_block">    input as if it were at top level.  If another call to <span class="nb">{</span><span class="k">\tt</span> break/0<span class="nb">}</span> is 
</div><div id="l449" class="code_block">    encountered, it moves up to break level 2, and so on.  While execution 
</div><div id="l450" class="code_block">    is done at break level <span class="s">$</span><span class="nb">n&gt;</span><span class="m">0</span><span class="s">$</span> the prompt changes to <span class="nb">{</span><span class="k">\tt</span> <span class="s">$</span><span class="nb">n</span><span class="s">$</span>: ?-<span class="nb">}</span>.
</div><div id="l451" class="code_block">
</div><div id="l452" class="code_block">    To close a break level and resume the suspended execution, the user can 
</div><div id="l453" class="code_block">    type the the atom <span class="nb">{</span><span class="k">\tt</span> end<span class="k">\_of\_file</span><span class="nb">}</span> or the end-of-file character 
</div><div id="l454" class="code_block">    applicable on the system (usually <span class="nb">{</span><span class="k">\tt</span> CTRL-d<span class="nb">}</span> on UNIX systems).  
</div><div id="l455" class="code_block">    Predicate <span class="nb">{</span><span class="k">\tt</span> break/0<span class="nb">}</span> 
</div><div id="l456" class="code_block">    then succeeds (note in the following example that the calls to <span class="nb">{</span><span class="k">\tt</span> break/0<span class="nb">}</span>
</div><div id="l457" class="code_block">    do not succeed), and the execution of the interrupted program is resumed.  
</div><div id="l458" class="code_block">    Alternatively, the suspended execution can be abandoned by calling the 
</div><div id="l459" class="code_block">    standard predicate <span class="nb">{</span><span class="k">\tt</span> abort/0<span class="nb">}</span>, which causes a return to the top level.
</div><div id="l460" class="code_block">
</div><div id="l461" class="code_block">    An example of <span class="nb">{</span><span class="k">\tt</span> break/0<span class="nb">}</span> &#39;s use is the following:
</div><div id="l462" class="code_block">
</div><div id="l463" class="code_block">    <span class="k">\stuff</span><span class="nb">{</span>
</div><div id="l464" class="code_block">	<span class="k">\&gt;</span>   <span class="k">\&gt;</span>     | ?- break. <span class="k">\\</span>
</div><div id="l465" class="code_block">	<span class="k">\&gt;</span>   <span class="k">\&gt;</span>     [ Break (level 1) ] <span class="k">\\</span>
</div><div id="l466" class="code_block">	<span class="k">\&gt;</span>   <span class="k">\&gt;</span>     1: ?- break. <span class="k">\\</span>
</div><div id="l467" class="code_block">	<span class="k">\&gt;</span>   <span class="k">\&gt;</span>     [ Break (level 2) ] <span class="k">\\</span>
</div><div id="l468" class="code_block">	<span class="k">\&gt;</span>   <span class="k">\&gt;</span>     2: ?- end<span class="k">\_of\_file</span>. <span class="k">\\</span>
</div><div id="l469" class="code_block">	<span class="k">\&gt;</span>   <span class="k">\&gt;</span>     [ End break (level 2) ] <span class="k">\\</span>
</div><div id="l470" class="code_block">	<span class="k">\\</span>
</div><div id="l471" class="code_block">	<span class="k">\&gt;</span>   <span class="k">\&gt;</span>     yes <span class="k">\\</span>
</div><div id="l472" class="code_block">	<span class="k">\&gt;</span>   <span class="k">\&gt;</span>     1: ?-
</div><div id="l473" class="code_block">    <span class="nb">}</span>
</div><div id="l474" class="code_block">
</div><div id="l475" class="code_block">    Entering a break closes all incomplete tables (those which may not have a 
</div><div id="l476" class="code_block">    complete set of answers).  Closed tables are unaffected, even if 
</div><div id="l477" class="code_block">    the tables were created during the computation for which the break was
</div><div id="l478" class="code_block">    entered.
</div><div id="l479" class="code_block">
</div><div id="l480" class="code_block"><span class="k">\ouritem</span><span class="nb">{</span>halt<span class="nb">}</span><span class="k">\index</span><span class="nb">{{</span><span class="k">\tt</span> halt/0<span class="nb">}}</span>
</div><div id="l481" class="code_block">    Exits the <span class="k">\ourprolog\</span> session regardless of the break level.  On exiting
</div><div id="l482" class="code_block">    the system cpu and elapsed time information is displayed.
</div><div id="l483" class="code_block">
</div><div id="l484" class="code_block"><span class="k">\ouritem</span><span class="nb">{</span>prompt(+NewPrompt, ?OldPrompt)<span class="nb">}</span><span class="k">\index</span><span class="nb">{{</span><span class="k">\tt</span> prompt/2<span class="nb">}}</span>
</div><div id="l485" class="code_block">    Sets the prompt of the top level interpreter to <span class="nb">{</span><span class="k">\tt</span> NewPrompt<span class="nb">}</span> and 
</div><div id="l486" class="code_block">    returns the old prompt in <span class="nb">{</span><span class="k">\tt</span> OldPrompt<span class="nb">}</span>.
</div><div id="l487" class="code_block">
</div><div id="l488" class="code_block">    An example of <span class="nb">{</span><span class="k">\tt</span> prompt/2<span class="nb">}</span> &#39;s use is the following:
</div><div id="l489" class="code_block">
</div><div id="l490" class="code_block">    <span class="k">\stuff</span><span class="nb">{</span>
</div><div id="l491" class="code_block">	<span class="k">\&gt;</span>   <span class="k">\&gt;</span>     | ?- prompt(&#39;Yes master &gt; &#39;, P). <span class="k">\\</span>
</div><div id="l492" class="code_block">	<span class="k">\\</span>
</div><div id="l493" class="code_block">	<span class="k">\&gt;</span>   <span class="k">\&gt;</span>     P = | ?- ; <span class="k">\\</span>
</div><div id="l494" class="code_block">	<span class="k">\\</span>
</div><div id="l495" class="code_block">	<span class="k">\&gt;</span>   <span class="k">\&gt;</span>     no <span class="k">\\</span>
</div><div id="l496" class="code_block">	<span class="k">\&gt;</span>   <span class="k">\&gt;</span>     Yes master &gt; fail. <span class="k">\\</span>
</div><div id="l497" class="code_block">	<span class="k">\\</span>
</div><div id="l498" class="code_block">	<span class="k">\&gt;</span>   <span class="k">\&gt;</span>     no <span class="k">\\</span>
</div><div id="l499" class="code_block">	<span class="k">\&gt;</span>   <span class="k">\&gt;</span>     Yes master &gt;
</div><div id="l500" class="code_block">    <span class="nb">}</span>
</div><div id="l501" class="code_block">
</div><div id="l502" class="code_block"><span class="k">\ouritem</span><span class="nb">{</span>garbage<span class="k">\_collection</span>(+Option)<span class="nb">}</span><span class="k">\index</span><span class="nb">{{</span><span class="k">\tt</span>
</div><div id="l503" class="code_block">    garbage<span class="k">\_collection</span>/1<span class="nb">}}</span> Sets the system so that subsequent heap
</div><div id="l504" class="code_block">    garbage collecting will be done according to the specified <span class="nb">{</span><span class="k">\tt</span>
</div><div id="l505" class="code_block">    Option<span class="nb">}</span>.  <span class="nb">{</span><span class="k">\tt</span> Option<span class="nb">}</span> may be the atom <span class="k">\verb</span>|none| indicating that
</div><div id="l506" class="code_block">    heap garbage collection is turned off; it may be the atom
</div><div id="l507" class="code_block">    <span class="k">\verb</span>|sliding| indicating that sliding garbage collection will be
</div><div id="l508" class="code_block">    done; the atom <span class="k">\verb</span>|copying| indicating that the copying garbage
</div><div id="l509" class="code_block">    collector will be used; or it may be the atom <span class="k">\verb</span>|indirection|
</div><div id="l510" class="code_block">    indicating that the indirect-sliding garbage collector will be
</div><div id="l511" class="code_block">    used.  
</div><div id="l512" class="code_block"> 
</div><div id="l513" class="code_block"><span class="k">\ouritem</span><span class="nb">{</span>cputime(-CPU<span class="k">\_Time</span>)<span class="nb">}</span><span class="k">\index</span><span class="nb">{{</span><span class="k">\tt</span> cputime/1<span class="nb">}}</span>
</div><div id="l514" class="code_block">    Returns the <span class="nb">{</span><span class="k">\tt</span> CPU<span class="k">\_Time</span><span class="nb">}</span> at the time of the call in seconds.
</div><div id="l515" class="code_block">    The difference between results of successive calls to this
</div><div id="l516" class="code_block">    predicate can measure the time spent in specific predicates.
</div><div id="l517" class="code_block">
</div><div id="l518" class="code_block"><span class="k">\ouritem</span><span class="nb">{</span>statistics<span class="nb">}</span><span class="k">\index</span><span class="nb">{{</span><span class="k">\tt</span> statistics/0<span class="nb">}}</span> Prints on the current
</div><div id="l519" class="code_block">    output stream: 
</div><div id="l520" class="code_block"><span class="k">\begin</span><span class="nb">{</span>itemize<span class="nb">}</span> 
</div><div id="l521" class="code_block"><span class="k">\item</span> Information about allocation of memory  containing the 
</div><div id="l522" class="code_block"><span class="k">\begin</span><span class="nb">{</span>itemize<span class="nb">}</span> 
</div><div id="l523" class="code_block"><span class="k">\item</span> Global stack (heap) and local (environment) stack (see e.g.
</div><div id="l524" class="code_block"><span class="k">\cite</span><span class="nb">{</span>AitK90<span class="nb">}</span>). Memory for these two WAM stacks is allocated as a
</div><div id="l525" class="code_block">single unit so that each stack grows together; information is provided
</div><div id="l526" class="code_block">on the current allocation for the stacks as well as on the stack sizes
</div><div id="l527" class="code_block">themselves.  (See Section~<span class="k">\ref</span><span class="nb">{</span>sec:EmuOptions<span class="nb">}</span> for the memory
</div><div id="l528" class="code_block">re-allocation algorithm).  For maximum space used by each of these
</div><div id="l529" class="code_block">stacks, use the <span class="nb">{</span><span class="k">\tt</span> &#39;-s&#39;<span class="nb">}</span> command-line option.
</div><div id="l530" class="code_block"><span class="c">%</span>
</div><div id="l531" class="code_block"><span class="k">\item</span> Trail and choice point stack (see e.g. <span class="k">\cite</span><span class="nb">{</span>AitK90<span class="nb">}</span>).  Memory
</div><div id="l532" class="code_block">for these two WAM stacks is allocated as a single unit so that each
</div><div id="l533" class="code_block">stack grows together; information is provided on the current
</div><div id="l534" class="code_block">allocation for the stacks as well as on the stack sizes themselves.
</div><div id="l535" class="code_block">The (re-)allocation follows the algorithm sketched in
</div><div id="l536" class="code_block">Section~<span class="k">\ref</span><span class="nb">{</span>sec:EmuOptions<span class="nb">}</span>).  (See Section~<span class="k">\ref</span><span class="nb">{</span>sec:EmuOptions<span class="nb">}</span> for
</div><div id="l537" class="code_block">the memory re-allocation algorithm).  For maximum space used by each
</div><div id="l538" class="code_block">of these stacks, use the <span class="nb">{</span><span class="k">\tt</span> &#39;-s&#39;<span class="nb">}</span> command-line option.
</div><div id="l539" class="code_block"><span class="c">% TLS: this had been taken out a version or two ago.</span>
</div><div id="l540" class="code_block"><span class="c">%	  \item SLG subgoal space (tablestack)</span>
</div><div id="l541" class="code_block"><span class="k">\item</span> SLG unification stack.  This stack is used as a space to copy
</div><div id="l542" class="code_block">terms from the execution stacks into table space, or back out.  This
</div><div id="l543" class="code_block">stack will not be reallocated unless extremely large terms are tabled.
</div><div id="l544" class="code_block"><span class="c">%</span>
</div><div id="l545" class="code_block"><span class="k">\item</span> SLG completion stack.  The completion stack is used to perform
</div><div id="l546" class="code_block">incremental completion for sets of mutually dependant tabled
</div><div id="l547" class="code_block">subgoals.  One completion stack frame is allocated per tabled subgoal
</div><div id="l548" class="code_block"><span class="k">\cite</span><span class="nb">{</span>SaSw98<span class="nb">}</span> but the size of these frames is version-dependent.
</div><div id="l549" class="code_block"><span class="c">%</span>
</div><div id="l550" class="code_block"><span class="k">\item</span> the space occupied by subgoal and answer tables (in the form of
</div><div id="l551" class="code_block">tries) <span class="k">\cite</span><span class="nb">{</span>RRSSW98<span class="nb">}</span>.
</div><div id="l552" class="code_block"><span class="k">\end</span><span class="nb">{</span>itemize<span class="nb">}</span>
</div><div id="l553" class="code_block"><span class="k">\item</span> Information about the number of tabling operations performed in
</div><div id="l554" class="code_block">the session.  Note that the statistics are divided up between calls to
</div><div id="l555" class="code_block">predicates that use variant tabling and those that use (call)
</div><div id="l556" class="code_block">subsumptive tabling (see Section <span class="k">\ref</span><span class="nb">{</span>sec:TablingStrategies<span class="nb">}</span> and
</div><div id="l557" class="code_block"><span class="k">\cite</span><span class="nb">{</span>TST99<span class="nb">}</span>).
</div><div id="l558" class="code_block"><span class="k">\begin</span><span class="nb">{</span>itemize<span class="nb">}</span>
</div><div id="l559" class="code_block"><span class="k">\item</span> Call Subsumption Subgoal Operations.  For predicates that use
</div><div id="l560" class="code_block">subsumptive tabling, the total number of subsumptive subgoal calls is
</div><div id="l561" class="code_block">given, as is the number of new calls (<span class="nb">{</span><span class="k">\tt</span> producers<span class="nb">}</span>) and the number
</div><div id="l562" class="code_block">of repeated calls to non-completed tables (<span class="nb">{</span><span class="k">\tt</span> variants<span class="nb">}</span>).
</div><div id="l563" class="code_block">Furthermore, the number of properly subsumed calls to incomplete
</div><div id="l564" class="code_block">tables is given, along with the number of subsumed calls to completed
</div><div id="l565" class="code_block">tables.  Finally, the total number of subsumptive table entries
</div><div id="l566" class="code_block">overall is given, including all producer and consumer calls.
</div><div id="l567" class="code_block"><span class="c">%</span>
</div><div id="l568" class="code_block"><span class="k">\item</span> Call Subsumption Answer Operations.  In call subsumptive
</div><div id="l569" class="code_block">tabling, answer lists are copied from producer subgoals to subsumed
</div><div id="l570" class="code_block">consumer subgoals (this opration is not required in variant tabling).
</div><div id="l571" class="code_block">The number of <span class="nb">{</span><span class="k">\tt</span> answer ident<span class="nb">}</span> operations represents the number of
</div><div id="l572" class="code_block">times this copy is done.  In addition, the number of consumptions
</div><div id="l573" class="code_block">performed by all consuming subsumptive table entries is also given.
</div><div id="l574" class="code_block"><span class="c">%</span>
</div><div id="l575" class="code_block"><span class="k">\item</span> Call Variance Subgoal Operations.  For call variance the number
</div><div id="l576" class="code_block">of subgoal check/insert operations is given along with the unique
</div><div id="l577" class="code_block">number of subgoals encountered (<span class="nb">{</span><span class="k">\tt</span> generator<span class="nb">}</span>) and the number of
</div><div id="l578" class="code_block">redundant consumer encountered (<span class="nb">{</span><span class="k">\tt</span> consumer<span class="nb">}</span>).
</div><div id="l579" class="code_block"><span class="c">%</span>
</div><div id="l580" class="code_block"><span class="k">\item</span> Total Answer Operations.  For both variant and subsumptive
</div><div id="l581" class="code_block">tables, the number of answer check insert operations is given along
</div><div id="l582" class="code_block">with the number of answers actually inserted into the table and the
</div><div id="l583" class="code_block">number of redundant answers derived.
</div><div id="l584" class="code_block"><span class="k">\end</span><span class="nb">{</span>itemize<span class="nb">}</span>
</div><div id="l585" class="code_block"><span class="c">%</span>
</div><div id="l586" class="code_block"><span class="k">\item</span> Garbage Collection Information.  Time spent garbage collecting
</div><div id="l587" class="code_block">and number of heap cells collected.
</div><div id="l588" class="code_block">
</div><div id="l589" class="code_block"><span class="k">\item</span> Information about process CPU and clock time.
</div><div id="l590" class="code_block">    <span class="k">\end</span><span class="nb">{</span>itemize<span class="nb">}</span>
</div><div id="l591" class="code_block">
</div><div id="l592" class="code_block">As mentioned above, if the emulator is invoked with the <span class="nb">{</span><span class="k">\tt</span> &#39;-s&#39;<span class="nb">}</span>
</div><div id="l593" class="code_block">    option (see Section~<span class="k">\ref</span><span class="nb">{</span>sec:EmuOptions<span class="nb">}</span>), additional information
</div><div id="l594" class="code_block">    is printed out about maximum use of each execution stack and table
</div><div id="l595" class="code_block">    space.  However, the <span class="nb">{</span><span class="k">\tt</span> &#39;-s&#39;<span class="nb">}</span> option can substantially slow down
</div><div id="l596" class="code_block">    the emulator so benchmarks of time should be performed separately
</div><div id="l597" class="code_block">    from benchmarks of space.
</div><div id="l598" class="code_block">
</div><div id="l599" class="code_block"><span class="nb">{</span><span class="k">\bf</span> Example<span class="nb">}</span>: The following printout shows how the <span class="nb">{</span><span class="k">\tt</span> statistics/0<span class="nb">}</span>
</div><div id="l600" class="code_block">output looks if it is invoked with the <span class="nb">{</span><span class="k">\tt</span> &#39;-s&#39;<span class="nb">}</span> option (without it
</div><div id="l601" class="code_block">the <span class="nb">{</span><span class="k">\tt</span> Maximum stack used<span class="nb">}</span>, and <span class="nb">{</span><span class="k">\tt</span> Maximum table space used<span class="nb">}</span> lines
</div><div id="l602" class="code_block">are not shown).  Information about the allocation size is provided
</div><div id="l603" class="code_block">since the sizes can be changed through emulator options (see
</div><div id="l604" class="code_block">Section~<span class="k">\ref</span><span class="nb">{</span>sec:EmuOptions<span class="nb">}</span>).
</div><div id="l605" class="code_block">
</div><div id="l606" class="code_block">    <span class="nb">{</span><span class="k">\footnotesize</span>
</div><div id="l607" class="code_block">     <span class="k">\begin</span><span class="nb">{</span>verbatim<span class="nb">}</span>
</div><div id="l608" class="code_block">     | ?- statistics.
</div><div id="l609" class="code_block">
</div><div id="l610" class="code_block">Memory (total)         1941216 bytes:       238120 in use,      1703096 free
</div><div id="l611" class="code_block">  permanent space       237280 bytes:       237280 in use,            0 free
</div><div id="l612" class="code_block">  glob/loc space        786432 bytes:          524 in use,       785908 free
</div><div id="l613" class="code_block">    global                                     284 bytes
</div><div id="l614" class="code_block">    local                                      240 bytes
</div><div id="l615" class="code_block">  trail/cp space        786432 bytes:          316 in use,       786116 free
</div><div id="l616" class="code_block">    trail                                       24 bytes
</div><div id="l617" class="code_block">    choice point                               292 bytes
</div><div id="l618" class="code_block">  SLG unific. space      65536 bytes:            0 in use,        65536 free
</div><div id="l619" class="code_block">  SLG completion         65536 bytes:            0 in use,        65536 free
</div><div id="l620" class="code_block">  SLG table space            0 bytes:            0 in use,            0 free
</div><div id="l621" class="code_block">
</div><div id="l622" class="code_block">        Maximum stack used: global 224, local 1384, trail 240, cp 492,
</div><div id="l623" class="code_block">                            SLG completion 0 (0 subgoals)
</div><div id="l624" class="code_block">        Maximum table space used:  0 bytes
</div><div id="l625" class="code_block">
</div><div id="l626" class="code_block">Tabling Operations
</div><div id="l627" class="code_block">  Call Subsumption Subgoal Operations:
</div><div id="l628" class="code_block">            0 call check/insert ops: 0 producers, 0 variants,
</div><div id="l629" class="code_block">            0 properly subsumed. 0 used completed table, 
</div><div id="l630" class="code_block">	    0 table entries overall.
</div><div id="l631" class="code_block">  Call Subsumption Answer Operations:
</div><div id="l632" class="code_block">            0 relevant answer ident ops.  0 consumptions via answer list.
</div><div id="l633" class="code_block">  Call Variance Subgoal Operations: 
</div><div id="l634" class="code_block">            0 call check/insert ops: 0 generators, 0 consumers.
</div><div id="l635" class="code_block">  Total Answer Operations: 
</div><div id="l636" class="code_block">            0 answer check/insert ops: 0 unique inserts, 0 redundant.
</div><div id="l637" class="code_block">
</div><div id="l638" class="code_block"><span class="nb">{</span>GC<span class="nb">}</span>    0 heap garbage collections by copying: collected 0 cells in 0.000000 millisecs
</div><div id="l639" class="code_block">
</div><div id="l640" class="code_block">      0.570 sec. cputime, 5.088 sec. elapsetime 
</div><div id="l641" class="code_block"><span class="k">\end</span><span class="nb">{</span>verbatim<span class="nb">}}</span> 
</div><div id="l642" class="code_block">     For expert users of XSB, further information about resources
</div><div id="l643" class="code_block">     required by the system can be obtained through the non-supported
</div><div id="l644" class="code_block">     predicate <span class="nb">{</span><span class="k">\tt</span> statistics/1<span class="nb">}</span> in <span class="nb">{</span><span class="k">\tt</span> <span class="k">\$</span>XSB<span class="k">\_DIR</span>/emu/trace.c<span class="nb">}</span>.
</div><div id="l645" class="code_block">
</div><div id="l646" class="code_block"><span class="c">%\ouritem{analyze\_table(+Pred\_indicator)}\index{{\tt analyze\_table/1}}</span>
</div><div id="l647" class="code_block"><span class="c">%    This predicate provides additional means for the user to profile</span>
</div><div id="l648" class="code_block"><span class="c">%    execution of tabled predicates.  Given a predicate indicator for a </span>
</div><div id="l649" class="code_block"><span class="c">%    tabled predicate, {\tt analyze\_table/1} prints the following information.</span>
</div><div id="l650" class="code_block"><span class="c">%    \begin{itemize}</span>
</div><div id="l651" class="code_block"><span class="c">%    \item  &quot;$\langle$Num$\rangle$ call hash buckets used out of </span>
</div><div id="l652" class="code_block"><span class="c">%	   $\langle$Total$\rangle$&quot;.  The number</span>
</div><div id="l653" class="code_block"><span class="c">%           of call hash buckets containing at least one element.</span>
</div><div id="l654" class="code_block"><span class="c">%    \item  &quot;avg call bucket length (of used) $\langle$Avg$\rangle$&quot;.  </span>
</div><div id="l655" class="code_block"><span class="c">%	   The average length of call hash buckets containing at least one</span>
</div><div id="l656" class="code_block"><span class="c">%	   element.</span>
</div><div id="l657" class="code_block"><span class="c">%    \item  &quot;max call bucket length $\langle$Length$\rangle$&quot;.</span>
</div><div id="l658" class="code_block"><span class="c">%    \item  &quot;$\langle$Num$\rangle$ ret hash buckets used out of </span>
</div><div id="l659" class="code_block"><span class="c">%	   $\langle$Total$\rangle$&quot;.  The number</span>
</div><div id="l660" class="code_block"><span class="c">%           of ret hash buckets containing at least one element.</span>
</div><div id="l661" class="code_block"><span class="c">%    \item  &quot;avg ret bucket length (of used) $\langle$Avg$\rangle$&quot;.</span>
</div><div id="l662" class="code_block"><span class="c">%	   The average length of ret hash buckets containing at least</span>
</div><div id="l663" class="code_block"><span class="c">%	   one element.</span>
</div><div id="l664" class="code_block"><span class="c">%    \item  &quot;max ret bucket length $\langle$Length$\rangle$&quot;.</span>
</div><div id="l665" class="code_block"><span class="c">%    \end{itemize}</span>
</div><div id="l666" class="code_block">
</div><div id="l667" class="code_block"><span class="c">%    In \version, {\tt analyze\_table/1} is most readily used to </span>
</div><div id="l668" class="code_block"><span class="c">%    determine proper call and return hash sizes.  The hash table sizes can</span>
</div><div id="l669" class="code_block"><span class="c">%    be reset using {\tt set\_table\_prop/3} from the interpreter level</span>
</div><div id="l670" class="code_block"><span class="c">%    (see Section~\ref{sec:TablingPredicates}) or by recompiling the source code</span>
</div><div id="l671" class="code_block"><span class="c">%    with new declarations (see Section~\ref{compiler_directives}).</span>
</div><div id="l672" class="code_block">
</div><div id="l673" class="code_block"><span class="c">%    Example:</span>
</div><div id="l674" class="code_block"><span class="c">%    {\footnotesize</span>
</div><div id="l675" class="code_block"><span class="c">%     \begin{verbatim}</span>
</div><div id="l676" class="code_block"><span class="c">%     | ?- analyze_table(ancestor/2).</span>
</div><div id="l677" class="code_block"><span class="c">%                 1 hash buckets full out of 97</span>
</div><div id="l678" class="code_block"><span class="c">%                 avg call bucket length (of filled) 1.00</span>
</div><div id="l679" class="code_block"><span class="c">%                 max call bucket length 1</span>
</div><div id="l680" class="code_block"><span class="c">%                 ret buckets used 97 out of 97</span>
</div><div id="l681" class="code_block"><span class="c">%                 avg return bucket length 11.92</span>
</div><div id="l682" class="code_block"><span class="c">%                 max ret bucket length 17</span>
</div><div id="l683" class="code_block"><span class="c">%</span>
</div><div id="l684" class="code_block"><span class="c">%     yes</span>
</div><div id="l685" class="code_block"><span class="c">%     \end{verbatim}}</span>
</div><div id="l686" class="code_block"><span class="c">%    The output of {\tt analyze\_table} indicates that the return hash size for</span>
</div><div id="l687" class="code_block"><span class="c">%    ancestor is too small for the query.  Changing the return hash size will</span>
</div><div id="l688" class="code_block"><span class="c">%    speed up similar queries which add answers to tables, but the size of the</span>
</div><div id="l689" class="code_block"><span class="c">%    return hash table has no effect on the speed of queries which use completed</span>
</div><div id="l690" class="code_block"><span class="c">%    tables.</span>
</div><div id="l691" class="code_block">
</div><div id="l692" class="code_block"><span class="k">\ouritem</span><span class="nb">{</span>shell(+SystemCall)<span class="nb">}</span><span class="k">\index</span><span class="nb">{{</span><span class="k">\tt</span> shell/1<span class="nb">}}</span>
</div><div id="l693" class="code_block">    Calls the operating system with the atom <span class="nb">{</span><span class="k">\tt</span> SystemCall<span class="nb">}</span> as argument.
</div><div id="l694" class="code_block">    It succeeds if <span class="nb">{</span><span class="k">\tt</span> SystemCall<span class="nb">}</span> is executed successfully, otherwise it
</div><div id="l695" class="code_block">    fails.  As a notational convenience, the user can supply <span class="nb">{</span><span class="k">\tt</span> SystemCall<span class="nb">}</span> 
</div><div id="l696" class="code_block">    in the form of a list (something currently not possible for <span class="nb">{</span><span class="k">\tt</span> shell/2<span class="nb">}</span>).
</div><div id="l697" class="code_block">
</div><div id="l698" class="code_block">    For example, the call:
</div><div id="l699" class="code_block">
</div><div id="l700" class="code_block">    <span class="k">\demo</span><span class="nb">{{</span><span class="k">\tt</span> <span class="s">$</span><span class="nb">|</span><span class="s">$</span> ?- shell(&#39;echo <span class="k">\$</span>HOME&#39;).<span class="nb">}}</span>
</div><div id="l701" class="code_block">
</div><div id="l702" class="code_block">    <span class="k">\noindent</span>
</div><div id="l703" class="code_block">    will output in the current output stream of <span class="k">\ourprolog\</span> the name of
</div><div id="l704" class="code_block">    the user&#39;s home directory; while the call:
</div><div id="l705" class="code_block">
</div><div id="l706" class="code_block">    <span class="k">\demo</span><span class="nb">{{</span><span class="k">\tt</span> <span class="s">$</span><span class="nb">|</span><span class="s">$</span> ?- File = &#39;test.c&#39;, shell([&#39;cc -c &#39;, File]).<span class="nb">}}</span>
</div><div id="l707" class="code_block">
</div><div id="l708" class="code_block">    <span class="k">\noindent</span>
</div><div id="l709" class="code_block">    will call the C compiler to compile the file <span class="nb">{</span><span class="k">\tt</span> test.c<span class="nb">}</span>.
</div><div id="l710" class="code_block">
</div><div id="l711" class="code_block">    Note that in UNIX systems, since <span class="nb">{</span><span class="k">\tt</span> shell/1<span class="nb">}</span> is executed by
</div><div id="l712" class="code_block">    forking off a shell process, it cannot be used, for example, to
</div><div id="l713" class="code_block">    change the working directory of the interpreter.  For that reason
</div><div id="l714" class="code_block">    the standard predicate <span class="nb">{</span><span class="k">\tt</span> cd/1<span class="nb">}</span> described below should be used.
</div><div id="l715" class="code_block">
</div><div id="l716" class="code_block"><span class="c">%    {\em Note to DOS users.} \index{DOS}  The {\tt shell/1} command works</span>
</div><div id="l717" class="code_block"><span class="c">%    for DOS through the underlying GNU djgpp mechanism used to port \ourprolog.</span>
</div><div id="l718" class="code_block">
</div><div id="l719" class="code_block"><span class="k">\ouritem</span><span class="nb">{</span>shell(+SystemCall, -Result)<span class="nb">}</span><span class="k">\index</span><span class="nb">{{</span><span class="k">\tt</span> shell/2<span class="nb">}}</span>
</div><div id="l720" class="code_block">    Calls the operating system with the atom <span class="nb">{</span><span class="k">\tt</span> SystemCall<span class="nb">}</span> as argument
</div><div id="l721" class="code_block">    and returns the result of the call in <span class="nb">{</span><span class="k">\tt</span> Result<span class="nb">}</span>.  In comparison with
</div><div id="l722" class="code_block">    <span class="nb">{</span><span class="k">\tt</span> shell/1<span class="nb">}</span> this predicate always succeeds, even if the <span class="nb">{</span><span class="k">\tt</span> SystemCall<span class="nb">}</span> 
</div><div id="l723" class="code_block">    cannot be successfully executed.
</div><div id="l724" class="code_block">
</div><div id="l725" class="code_block"><span class="c">%    {\em Note to DOS users.} \index{DOS}  The {\tt shell/2} command works</span>
</div><div id="l726" class="code_block"><span class="c">%    for DOS through the underlying GNU djgpp mechanism used to port \ourprolog.</span>
</div><div id="l727" class="code_block">
</div><div id="l728" class="code_block"><span class="k">\ouritem</span><span class="nb">{</span>ls<span class="nb">}</span><span class="k">\index</span><span class="nb">{{</span><span class="k">\tt</span> ls/0<span class="nb">}}</span> 
</div><div id="l729" class="code_block">    Under UNIX, this command lists in the current output stream the files 
</div><div id="l730" class="code_block">    in the system&#39;s current directory if it can do so.  If so, it succeeds.
</div><div id="l731" class="code_block">    It is the same as <span class="nb">{</span><span class="k">\tt</span> shell(&#39;ls -F&#39;, 0)<span class="nb">}</span>.  
</div><div id="l732" class="code_block">
</div><div id="l733" class="code_block"><span class="k">\ouritem</span><span class="nb">{</span>cd(+Dir)<span class="nb">}</span><span class="k">\index</span><span class="nb">{{</span><span class="k">\tt</span> cd/1<span class="nb">}}</span>
</div><div id="l734" class="code_block">    Under UNIX and Windows, this predicate changes the interpreter&#39;s
</div><div id="l735" class="code_block">    working directory to <span class="nb">{</span><span class="k">\tt</span> Dir<span class="nb">}</span>.  If the directory specified does
</div><div id="l736" class="code_block">    not exist or is not a directory, or the user does not have execute
</div><div id="l737" class="code_block">    permission for that directory, predicate <span class="nb">{</span><span class="k">\tt</span> cd/1<span class="nb">}</span> simply fails
</div><div id="l738" class="code_block">    raising no permission error.
</div><div id="l739" class="code_block">
</div><div id="l740" class="code_block">    Exceptions:
</div><div id="l741" class="code_block">    <span class="k">\begin</span><span class="nb">{</span>description<span class="nb">}</span>
</div><div id="l742" class="code_block">    <span class="k">\item</span><span class="na">[{\tt instantiation\_error}]</span>
</div><div id="l743" class="code_block">	<span class="nb">{</span><span class="k">\tt</span> Dir<span class="nb">}</span> is not instantiated at the time of call.
</div><div id="l744" class="code_block">    <span class="k">\item</span><span class="na">[{\tt type\_error}]</span>
</div><div id="l745" class="code_block">	<span class="nb">{</span><span class="k">\tt</span> Dir<span class="nb">}</span> is not an atom.
</div><div id="l746" class="code_block">    <span class="k">\end</span><span class="nb">{</span>description<span class="nb">}</span>
</div><div id="l747" class="code_block">
</div><div id="l748" class="code_block"><span class="k">\ouritem</span><span class="nb">{</span>edit(+Module)<span class="nb">}</span><span class="k">\index</span><span class="nb">{{</span><span class="k">\tt</span> edit/1<span class="nb">}}</span>
</div><div id="l749" class="code_block">    Provided that the environment variable <span class="nb">{</span><span class="k">\tt</span> EDITOR<span class="nb">}</span> has been set,
</div><div id="l750" class="code_block">    and the system is executing under UNIX, 
</div><div id="l751" class="code_block">    a call to <span class="nb">{</span><span class="k">\tt</span> edit(foo)<span class="nb">}</span> will call the default editor on the file
</div><div id="l752" class="code_block">    named <span class="nb">{</span><span class="k">\tt</span> foo.P<span class="nb">}</span>.  The argument to <span class="nb">{</span><span class="k">\tt</span> edit/1<span class="nb">}</span>, should be instantiated,
</div><div id="l753" class="code_block">    it can be an absolute or a relative file name, but it should <span class="nb">{</span><span class="k">\em</span> not<span class="nb">}</span>
</div><div id="l754" class="code_block">    contain the suffix <span class="nb">{</span><span class="k">\tt</span> .P<span class="nb">}</span>.  Users can also set their preferred options
</div><div id="l755" class="code_block">    of calling the default editor by setting an environment variable named
</div><div id="l756" class="code_block">    <span class="nb">{</span><span class="k">\tt</span> EDITOR<span class="k">\_OPTIONS</span><span class="nb">}</span>.
</div><div id="l757" class="code_block">
</div><div id="l758" class="code_block">    Examples of possible uses of predicate <span class="nb">{</span><span class="k">\tt</span> edit/1<span class="nb">}</span> are:
</div><div id="l759" class="code_block">    <span class="k">\begin</span><span class="nb">{</span>enumerate<span class="nb">}</span>
</div><div id="l760" class="code_block">    <span class="k">\item</span> If the environment variables have been set as follows:
</div><div id="l761" class="code_block">          <span class="k">\begin</span><span class="nb">{</span>verbatim<span class="nb">}</span>
</div><div id="l762" class="code_block">	        setenv EDITOR /usr/ucb/vi
</div><div id="l763" class="code_block">	        setenv EDITOR<span class="nb">_</span>OPTIONS -l
</div><div id="l764" class="code_block">          <span class="k">\end</span><span class="nb">{</span>verbatim<span class="nb">}</span>
</div><div id="l765" class="code_block">          a call like:
</div><div id="l766" class="code_block">          <span class="k">\begin</span><span class="nb">{</span>verbatim<span class="nb">}</span>
</div><div id="l767" class="code_block">	        | ?- edit(foo).
</div><div id="l768" class="code_block">          <span class="k">\end</span><span class="nb">{</span>verbatim<span class="nb">}</span>
</div><div id="l769" class="code_block">          will call the vi editor in the mode where left and right parentheses
</div><div id="l770" class="code_block">	  and curly brackets are checked for balance for the file <span class="nb">{</span><span class="k">\tt</span> foo.P<span class="nb">}</span>
</div><div id="l771" class="code_block">	  in the current working directory.
</div><div id="l772" class="code_block">    <span class="k">\item</span> If, on the other hand, they have been set as follows:
</div><div id="l773" class="code_block">          <span class="k">\begin</span><span class="nb">{</span>verbatim<span class="nb">}</span>
</div><div id="l774" class="code_block">	        setenv EDITOR /usr/local/bin/emacs
</div><div id="l775" class="code_block">	        setenv EDITOR<span class="nb">_</span>OPTIONS -r
</div><div id="l776" class="code_block">          <span class="k">\end</span><span class="nb">{</span>verbatim<span class="nb">}</span>
</div><div id="l777" class="code_block">          a call like:
</div><div id="l778" class="code_block">          <span class="k">\begin</span><span class="nb">{</span>verbatim<span class="nb">}</span>
</div><div id="l779" class="code_block">	        | ?- edit(&#39;~/foo&#39;).
</div><div id="l780" class="code_block">          <span class="k">\end</span><span class="nb">{</span>verbatim<span class="nb">}</span>
</div><div id="l781" class="code_block">          will call the emacs editor in reverse video for the file <span class="nb">{</span><span class="k">\tt</span> foo.P<span class="nb">}</span>
</div><div id="l782" class="code_block">	  in user&#39;s home directory.
</div><div id="l783" class="code_block">    <span class="k">\end</span><span class="nb">{</span>enumerate<span class="nb">}</span>
</div><div id="l784" class="code_block">
</div><div id="l785" class="code_block"><span class="k">\end</span><span class="nb">{</span>description<span class="nb">}</span>
</div><div id="l786" class="code_block">
</div><div id="l787" class="code_block"><span class="c">%need op (just so we dont forget ???</span>
</div><div id="l788" class="code_block">
</div><div id="l789" class="code_block">
</div><div id="l790" class="code_block"><span class="c">%=====================================================================</span>
</div><div id="l791" class="code_block">
</div><div id="l792" class="code_block"><span class="k">\section</span><span class="nb">{</span>Exception Handling<span class="nb">}</span><span class="k">\label</span><span class="nb">{</span>exception<span class="nb">}</span>
</div><div id="l793" class="code_block"><span class="k">\index</span><span class="nb">{</span>exceptions<span class="nb">}</span>
</div><div id="l794" class="code_block">
</div><div id="l795" class="code_block"><span class="k">\begin</span><span class="nb">{</span>description<span class="nb">}</span>
</div><div id="l796" class="code_block">
</div><div id="l797" class="code_block"><span class="k">\ouritem</span><span class="nb">{</span>abort<span class="nb">}</span><span class="k">\index</span><span class="nb">{{</span><span class="k">\tt</span> abort/0<span class="nb">}}</span> 
</div><div id="l798" class="code_block">    Abandons the current execution and returns to the top level.  This
</div><div id="l799" class="code_block">    predicate is normally used in one of the following two cases: 
</div><div id="l800" class="code_block">    <span class="k">\begin</span><span class="nb">{</span>itemize<span class="nb">}</span> 
</div><div id="l801" class="code_block">    <span class="k">\item</span> when some error condition or exception has occurred and carrying
</div><div id="l802" class="code_block">	  on the computation is of no further use.
</div><div id="l803" class="code_block">    <span class="k">\item</span> when using the debugger (see Chapter~<span class="k">\ref</span><span class="nb">{</span>debugging<span class="nb">}</span>).  
</div><div id="l804" class="code_block">    <span class="k">\end</span><span class="nb">{</span>itemize<span class="nb">}</span>
</div><div id="l805" class="code_block">    Currently, all exception handling routines terminate with a call to 
</div><div id="l806" class="code_block">    predicate <span class="nb">{</span><span class="k">\tt</span> abort/0<span class="nb">}</span>, so an exception encountered at a break level 
</div><div id="l807" class="code_block">    other than the top level will return the interpreter at the top level.
</div><div id="l808" class="code_block">
</div><div id="l809" class="code_block">    <span class="nb">{</span><span class="k">\tt</span> abort/0<span class="nb">}</span> does not close any files which may have been opened.
</div><div id="l810" class="code_block">    If the program under execution is doing file manipulation using
</div><div id="l811" class="code_block">    <span class="nb">{</span><span class="k">\tt</span> see/1<span class="nb">}</span> and <span class="nb">{</span><span class="k">\tt</span> tell/1<span class="nb">}</span>, then unexpected behavior may occur
</div><div id="l812" class="code_block">    after the program is aborted and restarted, unless the user
</div><div id="l813" class="code_block">    manually closes the files.
</div><div id="l814" class="code_block">
</div><div id="l815" class="code_block">    Aborting closes all incomplete tables (those which may not have a 
</div><div id="l816" class="code_block">    complete set of answers).  Closed tables are unaffected, even if 
</div><div id="l817" class="code_block">    the tables were created during the aborted computation.
</div><div id="l818" class="code_block">
</div><div id="l819" class="code_block">    <span class="nb">{</span><span class="k">\tt</span> abort/0<span class="nb">}</span> is implemented by throwing the term <span class="nb">{</span><span class="k">\tt</span>
</div><div id="l820" class="code_block">    &#39;<span class="k">\_\$</span>abort<span class="k">\_ball</span>&#39;/0<span class="nb">}</span>.  Implementations that wish to override the
</div><div id="l821" class="code_block">    default behavior of <span class="nb">{</span><span class="k">\tt</span> abort/0<span class="nb">}</span> must call a top-level goal via
</div><div id="l822" class="code_block">    <span class="nb">{</span><span class="k">\tt</span> catch/1<span class="nb">}</span> and ensure that <span class="nb">{</span><span class="k">\tt</span> &#39;<span class="k">\_\$</span>abort<span class="k">\_ball</span>&#39;/0<span class="nb">}</span> is handled.
</div><div id="l823" class="code_block">
</div><div id="l824" class="code_block"><span class="k">\ouritem</span><span class="nb">{</span>abort(+Message)<span class="nb">}</span><span class="k">\index</span><span class="nb">{{</span><span class="k">\tt</span> abort/1<span class="nb">}}</span> <span class="k">\index</span><span class="nb">{{</span><span class="k">\tt</span> STDERR<span class="nb">}}</span>
</div><div id="l825" class="code_block">    Acts as <span class="nb">{</span><span class="k">\tt</span> abort/0<span class="nb">}</span> but sents <span class="nb">{</span><span class="k">\tt</span> Message<span class="nb">}</span> to <span class="nb">{</span><span class="k">\tt</span> STDERR<span class="nb">}</span>
</div><div id="l826" class="code_block">    before aborting.
</div><div id="l827" class="code_block">
</div><div id="l828" class="code_block"><span class="k">\ouritem</span><span class="nb">{</span>catch(?Goal,?Catcher,?Handler)<span class="nb">}</span><span class="k">\index</span><span class="nb">{{</span><span class="k">\tt</span> catch/3<span class="nb">}}</span> 
</div><div id="l829" class="code_block"><span class="k">\vspace</span><span class="nb">{</span>-7mm<span class="nb">}</span>
</div><div id="l830" class="code_block"><span class="k">\ouritem</span><span class="nb">{</span>throw(+Handler)<span class="nb">}</span><span class="k">\index</span><span class="nb">{{</span><span class="k">\tt</span> throw/1<span class="nb">}}</span> 
</div><div id="l831" class="code_block"><span class="c">%%</span>
</div><div id="l832" class="code_block">While very simple exceptions can be handled by <span class="nb">{</span><span class="k">\tt</span> abort/0<span class="nb">}</span>, more
</div><div id="l833" class="code_block">sophisticated exception handling is performed by using <span class="nb">{</span><span class="k">\tt</span> catch/3<span class="nb">}</span>
</div><div id="l834" class="code_block">and <span class="nb">{</span><span class="k">\tt</span> throw/1<span class="nb">}</span> together.  When <span class="nb">{</span><span class="k">\tt</span> catch(Goal,Catcher,Handler)<span class="nb">}</span> is
</div><div id="l835" class="code_block">called, a continuation is saved, and <span class="nb">{</span><span class="k">\tt</span> Goal<span class="nb">}</span> is called.  If no
</div><div id="l836" class="code_block">exceptions are encountered, answers for <span class="nb">{</span><span class="k">\tt</span> Goal<span class="nb">}</span> are obtained as
</div><div id="l837" class="code_block">usual.  Within the execution of <span class="nb">{</span><span class="k">\tt</span> Goal<span class="nb">}</span>, an exception can be
</div><div id="l838" class="code_block">signalled by a call to <span class="nb">{</span><span class="k">\tt</span> throw(Catcher)<span class="nb">}</span>.  This predicate searches
</div><div id="l839" class="code_block">for an ancestor of the current environment in which a catch was set up
</div><div id="l840" class="code_block">whose catcher (second argument) unifies with <span class="nb">{</span><span class="k">\tt</span> Catcher<span class="nb">}</span>.  If such
</div><div id="l841" class="code_block">an ancestor is found, program execution reverts to the ancestor and
</div><div id="l842" class="code_block">all intervening choice points are removed.  The ancestor&#39;s handler
</div><div id="l843" class="code_block">(third argument) is called and the exception is thereby handled.  The
</div><div id="l844" class="code_block">following, somewhat fanciful example, helps clarify these concepts.
</div><div id="l845" class="code_block">
</div><div id="l846" class="code_block">The following predicate <span class="nb">{</span><span class="k">\tt</span> userdiv/2<span class="nb">}</span> is designed to be called with
</div><div id="l847" class="code_block">the first argument instantiated to a number.  A second number is then
</div><div id="l848" class="code_block">read from a console, and the first number is divided by the second,
</div><div id="l849" class="code_block">and unified with the second argument of <span class="nb">{</span><span class="k">\tt</span> userdiv/2<span class="nb">}</span>.  By using
</div><div id="l850" class="code_block"><span class="nb">{</span><span class="k">\tt</span> catch/3<span class="nb">}</span> and <span class="nb">{</span><span class="k">\tt</span> throw/1<span class="nb">}</span> together the various types of errors
</div><div id="l851" class="code_block">can be caught.
</div><div id="l852" class="code_block">
</div><div id="l853" class="code_block"><span class="k">\begin</span><span class="nb">{</span>small<span class="nb">}</span>
</div><div id="l854" class="code_block"><span class="k">\begin</span><span class="nb">{</span>verbatim<span class="nb">}</span>
</div><div id="l855" class="code_block">userdiv(X,Ans):- 
</div><div id="l856" class="code_block">        catch(userdiv1(X,Ans),mydiv1(Y),handlefoo(Y,X)).
</div><div id="l857" class="code_block">
</div><div id="l858" class="code_block">userdiv1(X,Ans):- 
</div><div id="l859" class="code_block">        (number(X) -&gt; true; throw(mydiv1(exception1))),
</div><div id="l860" class="code_block">        write(&#39;Enter a number: &#39;),read(Y),
</div><div id="l861" class="code_block">        (number(Y) -&gt; true ; throw(mydiv1(exception2(Y)))),
</div><div id="l862" class="code_block">        (Y =;= 0 -&gt; throw(mydiv1(exception3(Y))); true),
</div><div id="l863" class="code_block">        Ans is X/Y.
</div><div id="l864" class="code_block"><span class="k">\end</span><span class="nb">{</span>verbatim<span class="nb">}</span>
</div><div id="l865" class="code_block"><span class="k">\end</span><span class="nb">{</span>small<span class="nb">}</span>
</div><div id="l866" class="code_block">
</div><div id="l867" class="code_block">The behavior of this program on some representative inputs is shown
</div><div id="l868" class="code_block">below.
</div><div id="l869" class="code_block">
</div><div id="l870" class="code_block"><span class="k">\begin</span><span class="nb">{</span>small<span class="nb">}</span>
</div><div id="l871" class="code_block"><span class="k">\begin</span><span class="nb">{</span>verbatim<span class="nb">}</span>
</div><div id="l872" class="code_block">| ?- userdiv(X,Y).
</div><div id="l873" class="code_block">userdiv/1 called with non-numeric numerator: <span class="nb">_</span>h76
</div><div id="l874" class="code_block">
</div><div id="l875" class="code_block">X = <span class="nb">_</span>h76
</div><div id="l876" class="code_block">Y = <span class="nb">_</span>h90
</div><div id="l877" class="code_block">
</div><div id="l878" class="code_block">yes
</div><div id="l879" class="code_block">| ?- userdiv(3,Y).
</div><div id="l880" class="code_block">Enter a number: foo.
</div><div id="l881" class="code_block">in userdiv/1 a non-numeric denominator was entered: foo
</div><div id="l882" class="code_block">
</div><div id="l883" class="code_block">Y = <span class="nb">_</span>h84
</div><div id="l884" class="code_block">
</div><div id="l885" class="code_block">yes
</div><div id="l886" class="code_block">| ?- userdiv(3,Y).
</div><div id="l887" class="code_block">Enter a number: 0.
</div><div id="l888" class="code_block">in userdiv/1 a denominator of 0 was entered.
</div><div id="l889" class="code_block">Y = <span class="nb">_</span>h84
</div><div id="l890" class="code_block">
</div><div id="l891" class="code_block">yes
</div><div id="l892" class="code_block">| ?- userdiv(3,Y).
</div><div id="l893" class="code_block">Enter a number: 2.
</div><div id="l894" class="code_block">
</div><div id="l895" class="code_block">Y = 1.5000
</div><div id="l896" class="code_block">
</div><div id="l897" class="code_block">yes
</div><div id="l898" class="code_block"><span class="k">\end</span><span class="nb">{</span>verbatim<span class="nb">}</span>
</div><div id="l899" class="code_block"><span class="k">\end</span><span class="nb">{</span>small<span class="nb">}</span>
</div><div id="l900" class="code_block">
</div><div id="l901" class="code_block">The actions of <span class="nb">{</span><span class="k">\tt</span> catch/3<span class="nb">}</span> and <span class="nb">{</span><span class="k">\tt</span> throw/1<span class="nb">}</span> resemble that of the
</div><div id="l902" class="code_block">Prolog cut in that they remove choice points that lie between a call
</div><div id="l903" class="code_block">to <span class="nb">{</span><span class="k">\tt</span> throw/1<span class="nb">}</span> and the matching <span class="nb">{</span><span class="k">\tt</span> catch/3<span class="nb">}</span> that serves as its
</div><div id="l904" class="code_block">ancestor.  However, if this process encounters a choice point for an
</div><div id="l905" class="code_block">incomplete table, execution is aborted to the top user level.
</div><div id="l906" class="code_block">
</div><div id="l907" class="code_block"><span class="k">\end</span><span class="nb">{</span>description<span class="nb">}</span>
</div><div id="l908" class="code_block">
</div><div id="l909" class="code_block">
</div><div id="l910" class="code_block">
</div><div id="l911" class="code_block"><span class="c">%%% Local Variables: </span>
</div><div id="l912" class="code_block"><span class="c">%%% mode: latex</span>
</div><div id="l913" class="code_block"><span class="c">%%% TeX-master: &quot;manual1&quot;</span>
</div><div id="l914" class="code_block"><span class="c">%%% End: </span>
</div></pre></div></td></tr></table></div>

      
    </div>
  

                    </div>
                    
                    
                </div>
            



        </div>
    </section>
      

    <footer class="sandiego">
    <div class="as-row">
        <div class="footer-wrapper">
            <nav aria-label="Site Links" role="navigation">
                <section>
                    <div class="as-h2">SourceForge</div>
                    <ul>
                    
                        <li><a href="/create/" title="Create a Project">Create a Project</a></li>
                    
                        <li><a href="/directory/" title="Open Source Software Directory">Open Source Software</a></li>
                        <li><a href="/software/" title="Business Software Directory">Business Software</a></li>
                        
                            
                            <li><a href="/top" title="Top Open Source Projects">Top Downloaded Projects</a></li>
                        

                    </ul>
                </section>
            </nav>
            <nav aria-label="Company Links" role="navigation">
                <section>
                    <div class="as-h2">Company</div>
                    <ul>
                        <li><a href="/about">About</a></li>
                        <li><a href="/about/leadership" title="Open Source Software Directory">Team</a></li>
                        <li class="h-card">
                            <address>
                                <span class="p-name p-org">SourceForge Headquarters</span><br>
                                <span class="p-street-address">225 Broadway Suite 1600</span><br>
                                <span class="p-locality">San Diego, CA <span class="p-postal-code">92101</span></span><br>
                                <span class="p-tel">+1 (858) 422-6466</span><br>
                            </address>
                        </li>
                        <li id="social">
                            
<span></span>
<a href="https://twitter.com/sourceforge" class="twitter" rel="nofollow" target="_blank" title="SourceForge on X">


<svg  class="vertical-icon-fix" data-name="twitter" viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M1684 408q-67 98-162 167 1 14 1 42 0 130-38 259.5t-115.5 248.5-184.5 210.5-258 146-323 54.5q-271 0-496-145 35 4 78 4 225 0 401-138-105-2-188-64.5t-114-159.5q33 5 61 5 43 0 85-11-112-23-185.5-111.5t-73.5-205.5v-4q68 38 146 41-66-44-105-115t-39-154q0-88 44-163 121 149 294.5 238.5t371.5 99.5q-8-38-8-74 0-134 94.5-228.5t228.5-94.5q140 0 236 102 109-21 205-78-37 115-142 178 93-10 186-50z"/></svg></a>
<a href="https://fosstodon.org/@sourceforge" rel="me nofollow" target="_blank" title="SourceForge on Mastodon">


<svg  class="vertical-icon-fix" data-name="mastodon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M433 179.11c0-97.2-63.71-125.7-63.71-125.7-62.52-28.7-228.56-28.4-290.48 0 0 0-63.72 28.5-63.72 125.7 0 115.7-6.6 259.4 105.63 289.1 40.51 10.7 75.32 13 103.33 11.4 50.81-2.8 79.32-18.1 79.32-18.1l-1.7-36.9s-36.31 11.4-77.12 10.1c-40.41-1.4-83-4.4-89.63-54a102.54 102.54 0 0 1-.9-13.9c85.63 20.9 158.65 9.1 178.75 6.7 56.12-6.7 105-41.3 111.23-72.9 9.8-49.8 9-121.5 9-121.5zm-75.12 125.2h-46.63v-114.2c0-49.7-64-51.6-64 6.9v62.5h-46.33V197c0-58.5-64-56.6-64-6.9v114.2H90.19c0-122.1-5.2-147.9 18.41-175 25.9-28.9 79.82-30.8 103.83 6.1l11.6 19.5 11.6-19.5c24.11-37.1 78.12-34.8 103.83-6.1 23.71 27.3 18.4 53 18.4 175z"/></svg></a>
<a href="https://www.facebook.com/sourceforgenet/" class="facebook" rel="nofollow" target="_blank" title="SourceForge on Facebook">


<svg  data-name="facebook" viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M1343 12v264h-157q-86 0-116 36t-30 108v189h293l-39 296h-254v759h-306v-759h-255v-296h255v-218q0-186 104-288.5t277-102.5q147 0 228 12z"/></svg></a>
<a href="https://www.linkedin.com/company/sourceforge.net" class="linkedin" rel="nofollow" target="_blank" title="SourceForge on LinkedIn">


<svg  data-name="linkedin" viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M477 625v991h-330v-991h330zm21-306q1 73-50.5 122t-135.5 49h-2q-82 0-132-49t-50-122q0-74 51.5-122.5t134.5-48.5 133 48.5 51 122.5zm1166 729v568h-329v-530q0-105-40.5-164.5t-126.5-59.5q-63 0-105.5 34.5t-63.5 85.5q-11 30-11 81v553h-329q2-399 2-647t-1-296l-1-48h329v144h-2q20-32 41-56t56.5-52 87-43.5 114.5-15.5q171 0 275 113.5t104 332.5z"/></svg></a>

<a href="/user/newsletters" rel=nofollow class="newsletter" title="Subscribe to our newsletter">


<svg  class="vertical-icon-fix" data-name="mmSF_11mail" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" viewBox="0 0 42 42" enable-background="new 0 0 42 42" xml:space="preserve"><path fill="#FFFFFF" d="M0,6v30h42V6H0z M24.2,21.2c-0.8,0.8-2.3,2-3.2,2c-0.9,0-2.4-1.2-3.2-2L5.8,9.7h30.3L24.2,21.2z M13.7,21l-9.9,9.4V11.6L13.7,21z M15.7,23L15.7,23c0.5,0.5,2.9,2.9,5.3,2.9c2.4,0,4.8-2.4,5.2-2.8l0.1-0.1l9.8,9.4H5.8L15.7,23z M28.3,21l9.9-9.5v18.9L28.3,21z"/></svg></a>

<span></span>
                        </li>
                    </ul>
                </section>
            </nav>
             <nav aria-label="Resources Links" role="navigation">
                <section>
                    <div class="as-h2">Resources</div>
                    <ul>
                        
                            <li><a href="/support" title="Support Section">Support</a></li>
                            <li><a href="/p/forge/documentation/Docs%20Home/" title="Site Documentation">Site Documentation</a></li>
                        
                        <li><a href="https://fosstodon.org/@sourceforgestatus" title="Site Status" rel="me nofollow">Site Status</a></li>
                        <li><a href="/reviews" title="Reviews" rel="me nofollow">SourceForge Reviews</a></li>

                    </ul>
                </section>
            </nav>
            <section class="footer-logo">
                <a href="/" title="Home" class="sf-logo">
                    
    
    <img src="https://a.fsdn.com/con/images/sandiego/sf-logo-full.svg"  alt="SourceForge logo" class="sf-logo-full"/>
                </a>
            </section>
        </div>
    </div>
    <section class="l-nav-bottom">
        <nav class="row">
            
                
            
        
    <div class="columns small-12 large-6 copyright-notice">
        &copy; 2025 Slashdot Media. All Rights Reserved.
    </div>
    <div class="columns large-6 links links-right">
        

    
    

    <a href="https://slashdotmedia.com/terms-of-use" target="_blank" title="Terms" rel="nofollow">Terms</a>
    <a href="https://slashdotmedia.com/privacy-statement/" target="_blank" title="Privacy" rel="nofollow">Privacy</a>

    
    
    

    
        <a href="https://slashdotmedia.com/opt-out-choices/" target="_blank" title="Opt Out" rel="nofollow">Opt Out</a>
    

    
        <a href="https://slashdotmedia.com/contact/" target="_blank" title="Advertise" rel="nofollow">Advertise</a>
    
    </div>
        </nav>
    </section>

    </footer>
    





    
    
    <div id="newsletter-floating" class="sandiego newsletter-floating-new">
        <a class="close-button btn-closer" data-close aria-label="Close modal">
            <span aria-hidden="true">&times;</span>
        </a>
        <div class="as-h2">Want the latest updates on software, tech news, and AI?</div>
        <div class="row">
            <div class="column small-2 medium-2 large-2" style="padding-left: 0px; padding-right: 0px;"><img src="/images/sandiego/sf_email_icon.svg"  alt="" /></div>
            <div class="as-h3 column small-10 medium-10 large-10">Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.</div>
        </div>
        <form action="/user/newsletters/" method="post">
            <div class="row">
              <input class="newsletter-input" type="email" placeholder="Enter your email address" autocomplete="off" name="newsletter_email"
                     value="">
              <input type="hidden" name="source" value="floating">
              <button type="submit" class="button blue newsletter-button">Submit</button>
            </div>
        </form>
    </div>
    






</div>


<div id="messages">
    
</div>


    <!-- ew:body_js -->


    <script type="text/javascript" src="https://a.fsdn.com/allura/nf/1752257864/_ew_/_slim/js?href=allura%2Fjs%2Fjquery.notify.js%3Ballura%2Fjs%2Fjquery.tooltipster.js%3Ballura%2Fjs%2Fallura-base.js%3Ballura%2Fjs%2Fchecklist.js%3Ballura%2Fjs%2Fadmin_modal.js%3Bjs%2Fjquery.lightbox_me.js%3Ballura%2Fjs%2Fmemorable.js%3Btheme%2Fsftheme%2Fjs%2Fsftheme%2Fshared.js%3Btheme%2Fsftheme%2Fjs%2Fsftheme%2Fsticky.js%3Btheme%2Fsftheme%2Fjs%2Fsftheme%2Fsandiego%2Fchrome.js%3Btheme%2Fsftheme%2Fjs%2Fsftheme%2Fsandiego%2Futilities.js%3Btheme%2Fsftheme%2Fjs%2Fsftheme%2Fvendor%2Ffoundation6%2Fplugins%2Ffoundation.core.min.js%3Btheme%2Fsftheme%2Fjs%2Fsftheme%2Fvendor%2Ffoundation6%2Fplugins%2Ffoundation.util.mediaQuery.min.js%3Btheme%2Fsftheme%2Fjs%2Fsftheme%2Fvendor%2Ffoundation6%2Fplugins%2Ffoundation.util.keyboard.min.js%3Btheme%2Fsftheme%2Fjs%2Fsftheme%2Fvendor%2Ffoundation6%2Fplugins%2Ffoundation.util.box.min.js%3Btheme%2Fsftheme%2Fjs%2Fsftheme%2Fvendor%2Ffoundation6%2Fplugins%2Ffoundation.util.nest.min.js%3Btheme%2Fsftheme%2Fjs%2Fsftheme%2Fvendor%2Ffoundation6%2Fplugins%2Ffoundation.dropdownMenu.min.js%3Btheme%2Fsftheme%2Fjs%2Fsftheme%2Fvendor%2Ffoundation6%2Fplugins%2Ffoundation.offcanvas.min.js%3Btheme%2Fsftheme%2Fjs%2Fsftheme%2Fvendor%2Ffoundation6%2Fplugins%2Ffoundation.toggler.min.js%3Btheme%2Fsftheme%2Fjs%2Fsftheme%2Fsandiego%2Fproject.js%3Btheme%2Fsftheme%2Fjs%2Fsftheme%2Fvendor%2Fjquery.typeahead.min.js%3Ballura%2Fjs%2Fmaximize-content.js"></script>

    
<!-- /ew:body_js -->



    <!-- ew:body_js_tail -->


    <script type="text/javascript" src="https://a.fsdn.com/allura/nf/1752257864/_ew_/_slim/js?href=theme%2Fsftheme%2Fjs%2Fsftheme%2Fvendor%2Ffoundation6%2Fplugins%2Ffoundation.util.triggers.min.js%3Btheme%2Fsftheme%2Fjs%2Fsftheme%2Fvendor%2Ffoundation6%2Fplugins%2Ffoundation.reveal.min.js"></script>

    
<!-- /ew:body_js_tail -->




<script type="text/javascript">(function() {
  $('#access_urls .btn').click(function(evt){
    evt.preventDefault();
    var parent = $(this).parents('.btn-bar');
    var checkout_cmd = $(this).attr('data-url');
    $(parent).find('input').val(checkout_cmd);
    $(parent).find('span').text($(this).attr('title')+' access');
    $(this).parent().children('.btn').removeClass('active');
    $(this).addClass('active');
    if (checkout_cmd.indexOf(' http://') !== -1 || checkout_cmd.indexOf(' https://') !== -1 ) {
      $('#http-2fa-msg').show();
    } else {
      $('#http-2fa-msg').hide();
    }
  });
  $('#access_urls .btn').first().click();

  
  var repo_status = document.getElementById('repo_status');
  // The repo_status div will only be present if repo.status != 'ready'
  if (repo_status) {
    $('.spinner').show()
    var delay = 500;
    function check_status() {
        $.get('/p/xsb/src/status', function(data) {
            if (data.status === 'ready') {
                $('.spinner').hide()
                $('#repo_status h2').html('Repo status: ready. <a href="." rel="nofollow">Click here to refresh this page.</a>');
            }
            else {
                $('#repo_status h2 span').html(data.status);
                if (delay < 60000){
                    delay = delay * 2;
                }
                window.setTimeout(check_status, delay);
            }
        });
    }
    var status_checker = window.setTimeout(check_status, delay);
    
  }
}());
</script>

<script type="text/javascript">(function() {
  $(window).on('hashchange', function(e) {
    var hash = window.location.hash.substring(1);
    if ('originalEvent' in e && 'oldURL' in e.originalEvent) {
      $('#' + e.originalEvent.oldURL.split('#')[1]).css('background-color', 'transparent');
    }
    if (hash !== '' && hash.substring(0, 1) === 'l' && !isNaN(hash.substring(1))) {
      $('#' + hash).css('background-color', '#ffff99');
    }
  }).trigger('hashchange');

  var clicks = 0;
  $('.code_block').each(function(index, element) {
    $(element).on('click', function() {
      // Trick to ignore double and triple clicks
      clicks++;
      if (clicks === 1) {
        setTimeout(function() {
          if (clicks === 1) {
            var hash = window.location.hash.substring(1);
            if (hash !== '' && hash.substring(0, 1) === 'l' && !isNaN(hash.substring(1))) {
              $('#' + hash).css('background-color', 'transparent');
            }
            $(element).css('background-color', '#ffff99');
            window.history.pushState({}, document.title, window.location.pathname + window.location.search + '#' + $(element).attr('id'));
          }
          clicks = 0;
        }, 500);
      }
    });
  });
}());
</script>


    


    
    
    <noscript><p><img src="https://analytics.slashdotmedia.com/index.php?idsite=39" style="border:0;position:absolute;top:0;" alt="" /></p></noscript>
    
    <script>
        $(document).foundation();
    </script>
    








    

<script>
    (function () {
        function load_bombora() {
            /*global _ml:true, window */
            _ml = window._ml || {};
            
            _ml.eid = '771';
            _ml.fp = 'fe8a3368-0397-4949-a368-04d70836971b';  
            var s = document.getElementsByTagName('script')[0], cd = new Date(), mltag = document.createElement('script');
            mltag.type = 'text/javascript';
            mltag.async = true;
            mltag.defer = true;
            mltag.src = '//ml314.com/tag.aspx?' + cd.getDate() + cd.getMonth() + cd.getFullYear();
            s.parentNode.insertBefore(mltag, s);
        }
        bizx.cmp.ifConsent({ purposes: 'all', vendors: 'bombora'},function() {
                    if (document.hidden) {
                        document.addEventListener('visibilitychange', function () {
                            if (!document.hidden) {
                                load_bombora();
                            }
                        }, {once: true});
                    } else {
                        load_bombora();
                    }
                });
    })();
</script>




<script>
    $(document).ready(function () {
        $(".tooltip, .m-tooltip").each(function(){
            let $el = $(this);
            $el.tooltipster({
                animation: 'fade',
                delay: 200,
                theme: 'tooltipster-light',
                trigger: 'hover',
                position: $el.data('position') || 'right',
                iconCloning: false,
                maxWidth: 300,
                contentAsHTML: true,
                interactive: true
            }).focus(function () {
                $(this).tooltipster('show');
            }).blur(function () {
                $(this).tooltipster('hide');
            });
        });
    });
</script>

    



<script type="text/javascript">
    bizx.cmp.ifConsent({ purposes: ['storage', 'measurement'], vendors: 'google-analytics'}, function () {
        /* jshint ignore:start */
        (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
                (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
            m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
        })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
        /* jshint ignore:end */

        window.dataLayer = window.dataLayer || [];
        function gtag(){ window.dataLayer.push(arguments); }
        window.gtag = window.gtag || gtag;
        bizx.cmp.embedScript("https://www.googletagmanager.com/gtag/js");
        gtag('js', new Date());
        gtag('set', {
            'page_location': 'https://sourceforge.net/p/xsb/src/3173/tree/trunk/XSB/docs/userman/rbltin.tex',
        });
    });
</script>










<script>
        function gam(id){
            bizx.cmp.ifConsent({ purposes: 'all' }, function () {
                bizx.cmp.embedScript(`https://pagead2.googlesyndication.com/pagead/js/pcd.js?${id}`,
                    true,  // async
                    'head', // location
                    null, // callback
                    false, // defer
                    {id: `google-pcd-tag-${id}`, 'data-audience-pixel': 'dc_iu=/41014381/DFPAudiencePixel;dc_seg=' + id});
            });
        }

        
            gam("8901705213");gam("8901712041");</script>

<script type="text/javascript">
    /*global ga, gtag */

    
        
        bizx.cmp.ifConsent({ purposes: ['storage', 'measurement'], vendors: 'google-analytics'}, function () {
            gtag('config', 'G-1H226E4E4L', {
                
                send_page_view: false,
                'SF_Page_Type': '', 
                user_properties: {
                    'SF_Logged_in': 'Logged Out', 
                },
                'devicePixelRatio': SF.devicePixelRatio, 
            });
            gtag('event', 'page_view', { send_to: 'G-1H226E4E4L' });
        });
    
    
    
        
</script>

</body>
</html>