blob: c30420200d6a696088bfe40ea40a4a75a8cdfd4c [file]
<!DOCTYPE HTML>
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc -->
<title>FunctionCallGraph (Apache SystemDS 3.2.0-SNAPSHOT API)</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../../jquery/jquery-ui.min.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../../jquery-ui.overrides.css" title="Style">
<script type="text/javascript" src="../../../../../script.js"></script>
<script type="text/javascript" src="../../../../../jquery/jszip/dist/jszip.min.js"></script>
<script type="text/javascript" src="../../../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script>
<!--[if IE]>
<script type="text/javascript" src="../../../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script>
<![endif]-->
<script type="text/javascript" src="../../../../../jquery/jquery-3.6.0.min.js"></script>
<script type="text/javascript" src="../../../../../jquery/jquery-ui.min.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="FunctionCallGraph (Apache SystemDS 3.2.0-SNAPSHOT API)";
}
}
catch(err) {
}
//-->
var data = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
var pathtoroot = "../../../../../";
var useModuleDirectories = true;
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<header role="banner">
<nav role="navigation">
<div class="fixedNav">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a id="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/FunctionCallGraph.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../allclasses.html">All&nbsp;Classes</a></li>
</ul>
<ul class="navListSearch">
<li><label for="search">SEARCH:</label>
<input type="text" id="search" value="search" disabled="disabled">
<input type="reset" id="reset" value="reset" disabled="disabled">
</li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a id="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
</div>
<div class="navPadding">&nbsp;</div>
<script type="text/javascript"><!--
$('.navPadding').css('padding-top', $('.fixedNav').css("height"));
//-->
</script>
</nav>
</header>
<!-- ======== START OF CLASS DATA ======== -->
<main role="main">
<div class="header">
<div class="subTitle"><span class="packageLabelInType">Package</span>&nbsp;<a href="package-summary.html">org.apache.sysds.hops.ipa</a></div>
<h2 title="Class FunctionCallGraph" class="title">Class FunctionCallGraph</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li>org.apache.sysds.hops.ipa.FunctionCallGraph</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<pre>public class <span class="typeNameLabel">FunctionCallGraph</span>
extends <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a></pre>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<section>
<ul class="blockList">
<li class="blockList"><a id="constructor.summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="memberSummary">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Constructor</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(org.apache.sysds.parser.DMLProgram)">FunctionCallGraph</a></span>&#8203;(<a href="../../parser/DMLProgram.html" title="class in org.apache.sysds.parser">DMLProgram</a>&nbsp;prog)</code></th>
<td class="colLast">
<div class="block">Constructs the function call graph for all functions
reachable from the main program.</div>
</td>
</tr>
<tr class="rowColor">
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(org.apache.sysds.parser.StatementBlock)">FunctionCallGraph</a></span>&#8203;(<a href="../../parser/StatementBlock.html" title="class in org.apache.sysds.parser">StatementBlock</a>&nbsp;sb)</code></th>
<td class="colLast">
<div class="block">Constructs the function call graph for all functions
reachable from the given statement block.</div>
</td>
</tr>
</table>
</li>
</ul>
</section>
<!-- ========== METHOD SUMMARY =========== -->
<section>
<ul class="blockList">
<li class="blockList"><a id="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Method</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#containsSecondOrderCall()">containsSecondOrderCall</a></span>()</code></th>
<td class="colLast">
<div class="block">Indicates if the function call graph, i.e., functions that are transitively
reachable from the main program, contains a second-order builtin function call
(e.g., eval, paramserv), which prohibits the removal of unused functions.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Set.html?is-external=true" title="class or interface in java.util" class="externalLink">Set</a>&lt;<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getCalledFunctions(java.lang.String)">getCalledFunctions</a></span>&#8203;(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;fkey)</code></th>
<td class="colLast">
<div class="block">Returns all functions called from the given function.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Set.html?is-external=true" title="class or interface in java.util" class="externalLink">Set</a>&lt;<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getCalledFunctions(java.lang.String,java.lang.String)">getCalledFunctions</a></span>&#8203;(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;fnamespace,
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;fname)</code></th>
<td class="colLast">
<div class="block">Returns all functions called from the given function.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/List.html?is-external=true" title="class or interface in java.util" class="externalLink">List</a>&lt;<a href="../FunctionOp.html" title="class in org.apache.sysds.hops">FunctionOp</a>&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getFunctionCalls(java.lang.String)">getFunctionCalls</a></span>&#8203;(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;fkey)</code></th>
<td class="colLast">
<div class="block">Returns all function operators calling the given function.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/List.html?is-external=true" title="class or interface in java.util" class="externalLink">List</a>&lt;<a href="../../parser/StatementBlock.html" title="class in org.apache.sysds.parser">StatementBlock</a>&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getFunctionCallsSB(java.lang.String)">getFunctionCallsSB</a></span>&#8203;(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;fkey)</code></th>
<td class="colLast">
<div class="block">Returns all statement blocks that contain a function operator
calling the given function.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Set.html?is-external=true" title="class or interface in java.util" class="externalLink">Set</a>&lt;<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getReachableFunctions()">getReachableFunctions</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns all functions that are reachable either directly or indirectly
form the main program, except the main program itself.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Set.html?is-external=true" title="class or interface in java.util" class="externalLink">Set</a>&lt;<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getReachableFunctions(java.util.Set)">getReachableFunctions</a></span>&#8203;(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Set.html?is-external=true" title="class or interface in java.util" class="externalLink">Set</a>&lt;<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&gt;&nbsp;excludeList)</code></th>
<td class="colLast">
<div class="block">Returns all functions that are reachable either directly or indirectly
form the main program, except the main program itself and the given
exclude-list of function names.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isReachableFunction(java.lang.String)">isReachableFunction</a></span>&#8203;(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;fkey)</code></th>
<td class="colLast">
<div class="block">Indicates if the given function is reachable either directly or indirectly
from the main program.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isReachableFunction(java.lang.String,java.lang.String)">isReachableFunction</a></span>&#8203;(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;fnamespace,
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;fname)</code></th>
<td class="colLast">
<div class="block">Indicates if the given function is reachable either directly or indirectly
from the main program.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isRecursiveFunction(java.lang.String)">isRecursiveFunction</a></span>&#8203;(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;fkey)</code></th>
<td class="colLast">
<div class="block">Indicates if the given function is either directly or indirectly recursive.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isRecursiveFunction(java.lang.String,java.lang.String)">isRecursiveFunction</a></span>&#8203;(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;fnamespace,
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;fname)</code></th>
<td class="colLast">
<div class="block">Indicates if the given function is either directly or indirectly recursive.</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isSideEffectFreeFunction(java.lang.String)">isSideEffectFreeFunction</a></span>&#8203;(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;fkey)</code></th>
<td class="colLast">
<div class="block">Indicates if the given function is side effect free, i.e., has no
prints, no persistent write, and includes no or only calls to
side-effect-free functions.</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isSideEffectFreeFunction(java.lang.String,java.lang.String)">isSideEffectFreeFunction</a></span>&#8203;(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;fnamespace,
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;fname)</code></th>
<td class="colLast">
<div class="block">Indicates if the given function is side effect free, i.e., has no
prints, no persistent write, and includes no or only calls to
side-effect-free functions.</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#removeFunctionCall(java.lang.String,org.apache.sysds.hops.FunctionOp,org.apache.sysds.parser.StatementBlock)">removeFunctionCall</a></span>&#8203;(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;fkey,
<a href="../FunctionOp.html" title="class in org.apache.sysds.hops">FunctionOp</a>&nbsp;fop,
<a href="../../parser/StatementBlock.html" title="class in org.apache.sysds.parser">StatementBlock</a>&nbsp;sb)</code></th>
<td class="colLast">
<div class="block">Removes a single function call identified by target function name,
and source function op and statement block.</div>
</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#removeFunctionCalls(java.lang.String)">removeFunctionCalls</a></span>&#8203;(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;fkey)</code></th>
<td class="colLast">
<div class="block">Removes all calls of the given function.</div>
</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#replaceFunctionCalls(java.lang.String,java.lang.String)">replaceFunctionCalls</a></span>&#8203;(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;fkeyOld,
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;fkey)</code></th>
<td class="colLast">
<div class="block">Replaces a function call to fkeyOld with a call to fkey,
but using the function op and statement block from the old.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a></h3>
<code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang" class="externalLink">equals</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang" class="externalLink">getClass</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang" class="externalLink">hashCode</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang" class="externalLink">notify</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang" class="externalLink">notifyAll</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang" class="externalLink">toString</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang" class="externalLink">wait</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang" class="externalLink">wait</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html?is-external=true#wait(long,int)" title="class or interface in java.lang" class="externalLink">wait</a></code></li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<section>
<ul class="blockList">
<li class="blockList"><a id="constructor.detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a id="&lt;init&gt;(org.apache.sysds.parser.DMLProgram)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>FunctionCallGraph</h4>
<pre>public&nbsp;FunctionCallGraph&#8203;(<a href="../../parser/DMLProgram.html" title="class in org.apache.sysds.parser">DMLProgram</a>&nbsp;prog)</pre>
<div class="block">Constructs the function call graph for all functions
reachable from the main program.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>prog</code> - dml program of given script</dd>
</dl>
</li>
</ul>
<a id="&lt;init&gt;(org.apache.sysds.parser.StatementBlock)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>FunctionCallGraph</h4>
<pre>public&nbsp;FunctionCallGraph&#8203;(<a href="../../parser/StatementBlock.html" title="class in org.apache.sysds.parser">StatementBlock</a>&nbsp;sb)</pre>
<div class="block">Constructs the function call graph for all functions
reachable from the given statement block.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>sb</code> - statement block (potentially hierarchical)</dd>
</dl>
</li>
</ul>
</li>
</ul>
</section>
<!-- ============ METHOD DETAIL ========== -->
<section>
<ul class="blockList">
<li class="blockList"><a id="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a id="getCalledFunctions(java.lang.String,java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getCalledFunctions</h4>
<pre class="methodSignature">public&nbsp;<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Set.html?is-external=true" title="class or interface in java.util" class="externalLink">Set</a>&lt;<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&gt;&nbsp;getCalledFunctions&#8203;(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;fnamespace,
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;fname)</pre>
<div class="block">Returns all functions called from the given function.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>fnamespace</code> - function namespace</dd>
<dd><code>fname</code> - function name</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>set of function keys (namespace and name)</dd>
</dl>
</li>
</ul>
<a id="getCalledFunctions(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getCalledFunctions</h4>
<pre class="methodSignature">public&nbsp;<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Set.html?is-external=true" title="class or interface in java.util" class="externalLink">Set</a>&lt;<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&gt;&nbsp;getCalledFunctions&#8203;(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;fkey)</pre>
<div class="block">Returns all functions called from the given function.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>fkey</code> - function key of calling function, null indicates the main program</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>set of function keys (namespace and name)</dd>
</dl>
</li>
</ul>
<a id="getFunctionCalls(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getFunctionCalls</h4>
<pre class="methodSignature">public&nbsp;<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/List.html?is-external=true" title="class or interface in java.util" class="externalLink">List</a>&lt;<a href="../FunctionOp.html" title="class in org.apache.sysds.hops">FunctionOp</a>&gt;&nbsp;getFunctionCalls&#8203;(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;fkey)</pre>
<div class="block">Returns all function operators calling the given function.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>fkey</code> - function key of called function,
null indicates the main program and returns an empty list</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>list of function call hops</dd>
</dl>
</li>
</ul>
<a id="getFunctionCallsSB(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getFunctionCallsSB</h4>
<pre class="methodSignature">public&nbsp;<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/List.html?is-external=true" title="class or interface in java.util" class="externalLink">List</a>&lt;<a href="../../parser/StatementBlock.html" title="class in org.apache.sysds.parser">StatementBlock</a>&gt;&nbsp;getFunctionCallsSB&#8203;(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;fkey)</pre>
<div class="block">Returns all statement blocks that contain a function operator
calling the given function.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>fkey</code> - function key of called function,
null indicates the main program and returns an empty list</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>list of statement blocks</dd>
</dl>
</li>
</ul>
<a id="removeFunctionCalls(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>removeFunctionCalls</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;removeFunctionCalls&#8203;(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;fkey)</pre>
<div class="block">Removes all calls of the given function.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>fkey</code> - function key of called function,
null indicates the main program, which has no affect</dd>
</dl>
</li>
</ul>
<a id="removeFunctionCall(java.lang.String,org.apache.sysds.hops.FunctionOp,org.apache.sysds.parser.StatementBlock)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>removeFunctionCall</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;removeFunctionCall&#8203;(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;fkey,
<a href="../FunctionOp.html" title="class in org.apache.sysds.hops">FunctionOp</a>&nbsp;fop,
<a href="../../parser/StatementBlock.html" title="class in org.apache.sysds.parser">StatementBlock</a>&nbsp;sb)</pre>
<div class="block">Removes a single function call identified by target function name,
and source function op and statement block.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>fkey</code> - function key of called function</dd>
<dd><code>fop</code> - source function call operator</dd>
<dd><code>sb</code> - source statement block</dd>
</dl>
</li>
</ul>
<a id="replaceFunctionCalls(java.lang.String,java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>replaceFunctionCalls</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;replaceFunctionCalls&#8203;(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;fkeyOld,
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;fkey)</pre>
<div class="block">Replaces a function call to fkeyOld with a call to fkey,
but using the function op and statement block from the old.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>fkeyOld</code> - old function key of called function</dd>
<dd><code>fkey</code> - new function key of called function</dd>
</dl>
</li>
</ul>
<a id="isRecursiveFunction(java.lang.String,java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isRecursiveFunction</h4>
<pre class="methodSignature">public&nbsp;boolean&nbsp;isRecursiveFunction&#8203;(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;fnamespace,
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;fname)</pre>
<div class="block">Indicates if the given function is either directly or indirectly recursive.
An example of an indirect recursive function is foo2 in the following call
chain: foo1 -&gt; foo2 -&gt; foo1.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>fnamespace</code> - function namespace</dd>
<dd><code>fname</code> - function name</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if the given function is recursive, false otherwise</dd>
</dl>
</li>
</ul>
<a id="isRecursiveFunction(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isRecursiveFunction</h4>
<pre class="methodSignature">public&nbsp;boolean&nbsp;isRecursiveFunction&#8203;(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;fkey)</pre>
<div class="block">Indicates if the given function is either directly or indirectly recursive.
An example of an indirect recursive function is foo2 in the following call
chain: foo1 -&gt; foo2 -&gt; foo1.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>fkey</code> - function key of calling function, null indicates the main program</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if the given function is recursive, false otherwise</dd>
</dl>
</li>
</ul>
<a id="isSideEffectFreeFunction(java.lang.String,java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isSideEffectFreeFunction</h4>
<pre class="methodSignature">public&nbsp;boolean&nbsp;isSideEffectFreeFunction&#8203;(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;fnamespace,
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;fname)</pre>
<div class="block">Indicates if the given function is side effect free, i.e., has no
prints, no persistent write, and includes no or only calls to
side-effect-free functions.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>fnamespace</code> - function namespace</dd>
<dd><code>fname</code> - function name</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if the given function is side-effect-free, false otherwise</dd>
</dl>
</li>
</ul>
<a id="isSideEffectFreeFunction(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isSideEffectFreeFunction</h4>
<pre class="methodSignature">public&nbsp;boolean&nbsp;isSideEffectFreeFunction&#8203;(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;fkey)</pre>
<div class="block">Indicates if the given function is side effect free, i.e., has no
prints, no persistent write, and includes no or only calls to
side-effect-free functions.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>fkey</code> - function key of calling function, null indicates the main program</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if the given function is side-effect-free, false otherwise</dd>
</dl>
</li>
</ul>
<a id="getReachableFunctions()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getReachableFunctions</h4>
<pre class="methodSignature">public&nbsp;<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Set.html?is-external=true" title="class or interface in java.util" class="externalLink">Set</a>&lt;<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&gt;&nbsp;getReachableFunctions()</pre>
<div class="block">Returns all functions that are reachable either directly or indirectly
form the main program, except the main program itself.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>set of function keys (namespace and name)</dd>
</dl>
</li>
</ul>
<a id="getReachableFunctions(java.util.Set)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getReachableFunctions</h4>
<pre class="methodSignature">public&nbsp;<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Set.html?is-external=true" title="class or interface in java.util" class="externalLink">Set</a>&lt;<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&gt;&nbsp;getReachableFunctions&#8203;(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Set.html?is-external=true" title="class or interface in java.util" class="externalLink">Set</a>&lt;<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&gt;&nbsp;excludeList)</pre>
<div class="block">Returns all functions that are reachable either directly or indirectly
form the main program, except the main program itself and the given
exclude-list of function names.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>excludeList</code> - list of function keys to exclude</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>set of function keys (namespace and name)</dd>
</dl>
</li>
</ul>
<a id="isReachableFunction(java.lang.String,java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isReachableFunction</h4>
<pre class="methodSignature">public&nbsp;boolean&nbsp;isReachableFunction&#8203;(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;fnamespace,
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;fname)</pre>
<div class="block">Indicates if the given function is reachable either directly or indirectly
from the main program.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>fnamespace</code> - function namespace</dd>
<dd><code>fname</code> - function name</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if the given function is reachable, false otherwise</dd>
</dl>
</li>
</ul>
<a id="isReachableFunction(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isReachableFunction</h4>
<pre class="methodSignature">public&nbsp;boolean&nbsp;isReachableFunction&#8203;(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;fkey)</pre>
<div class="block">Indicates if the given function is reachable either directly or indirectly
from the main program.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>fkey</code> - function key of calling function, null indicates the main program</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if the given function is reachable, false otherwise</dd>
</dl>
</li>
</ul>
<a id="containsSecondOrderCall()">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>containsSecondOrderCall</h4>
<pre class="methodSignature">public&nbsp;boolean&nbsp;containsSecondOrderCall()</pre>
<div class="block">Indicates if the function call graph, i.e., functions that are transitively
reachable from the main program, contains a second-order builtin function call
(e.g., eval, paramserv), which prohibits the removal of unused functions.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if the function call graph contains a second-order builtin function call.</dd>
</dl>
</li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
</div>
</main>
<!-- ========= END OF CLASS DATA ========= -->
<footer role="contentinfo">
<nav role="navigation">
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a id="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/FunctionCallGraph.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../allclasses.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a id="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</nav>
<p class="legalCopy"><small>Copyright &#169; 2023 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
</footer>
</body>
</html>