<?xml version='1.0'?>
<html xmlns='http://www.w3.org/1999/xhtml'
      xmlns:math='http://www.w3.org/1998/Math/MathML'
>
<head>
<title>The CppAD Wish List</title>
<meta name="description" id="description" content="The CppAD Wish List"/>
<meta name="keywords" id="keywords" content=" wish list new features adolc atan2 checkpoint forward iterator compile speed Ad&lt;double&gt; testing machine epsilon sequence operation optimize tape preprocessor tracing "/>
<style type='text/css'>
body { color : black }
body { background-color : white }
A:link { color : blue }
A:visited { color : purple }
A:active { color : purple }
</style>
<script type='text/javascript' language='JavaScript' src='_wishlist_xml.js'>
</script>
</head>
<body>
<table><tr>
<td>
<a href="http://www.coin-or.org/CppAD/" target="_top"><img border="0" src="_image.gif"/></a>
</td>
<td><a href="bugs.xml" target="_top">Prev</a>
</td><td><a href="whats_new.xml" target="_top">Next</a>
</td><td>
<select onchange='choose_across0(this)'>
<option>Index-&gt;</option>
<option>contents</option>
<option>reference</option>
<option>index</option>
<option>search</option>
<option>external</option>
</select>
</td>
<td>
<select onchange='choose_up0(this)'>
<option>Up-&gt;</option>
<option>CppAD</option>
<option>Appendix</option>
<option>WishList</option>
</select>
</td>
<td>
<select onchange='choose_down2(this)'>
<option>CppAD-&gt;</option>
<option>Install</option>
<option>Introduction</option>
<option>AD</option>
<option>ADFun</option>
<option>preprocessor</option>
<option>multi_thread</option>
<option>library</option>
<option>ipopt_solve</option>
<option>Example</option>
<option>speed</option>
<option>Appendix</option>
</select>
</td>
<td>
<select onchange='choose_down1(this)'>
<option>Appendix-&gt;</option>
<option>Faq</option>
<option>Theory</option>
<option>glossary</option>
<option>Bib</option>
<option>Bugs</option>
<option>WishList</option>
<option>whats_new</option>
<option>deprecated</option>
<option>compare_c</option>
<option>License</option>
</select>
</td>
<td>WishList</td>
<td>
<select onchange='choose_current0(this)'>
<option>Headings-&gt;</option>
<option>Adolc</option>
<option>Atan2</option>
<option>BenderQuad</option>
<option>Checkpointing</option>
<option>Conditional Expressions</option>
<option>---..Nesting</option>
<option>---..Sparsity</option>
<option>Forward Mode Recomputation</option>
<option>Iterator Interface</option>
<option>Library</option>
<option>Multiple Argument Forward</option>
<option>Numeric Limits</option>
<option>Operation Sequence</option>
<option>Optimization</option>
<option>---..Expression Hashing</option>
<option>---..Variable Pairs</option>
<option>Preprocessor Symbols</option>
<option>Software Guidelines</option>
<option>---..Boost</option>
<option>Tracing</option>
</select>
</td>
</tr></table><br/>



<center><b><big><big>The CppAD Wish List</big></big></b></center>
<br/>
<b><big><a name="Adolc" id="Adolc">Adolc</a></big></b>

<br/>
Create a documentation page that shows how to convert Adolc commands to
CppAD commands.

<br/>
<br/>
<b><big><a name="Atan2" id="Atan2">Atan2</a></big></b>

<br/>
The <a href="atan2.xml" target="_top"><span style='white-space: nowrap'>atan2</span></a>
 function could be made faster by adding
a special operator for it.

<br/>
<br/>
<b><big><a name="BenderQuad" id="BenderQuad">BenderQuad</a></big></b>
<br/>
See the <a href="benderquad.xml#Problem" target="_top"><span style='white-space: nowrap'>problem</span></a>
 with the 
current <code><font color="blue">BenderQuad</font></code> specifications.

<br/>
<br/>
<b><big><a name="Checkpointing" id="Checkpointing">Checkpointing</a></big></b>

<br/>
It would be more flexible to also have a 
<a href="checkpoint.xml#constructor" target="_top"><span style='white-space: nowrap'>checkpoint&#xA0;constructor</span></a>
 
that passed in an <a href="adfun.xml" target="_top"><span style='white-space: nowrap'>ADFun</span></a>
 object instead of a algorithm.
Perhaps the syntax would be

<code><font color="blue"><span style='white-space: nowrap'><br/>
&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;checkpoint&#xA0;</span></font><i><font color="black"><span style='white-space: nowrap'>afun</span></font></i><font color="blue"><span style='white-space: nowrap'>(</span></font><i><font color="black"><span style='white-space: nowrap'>name</span></font></i><font color="blue"><span style='white-space: nowrap'>,&#xA0;</span></font><i><font color="black"><span style='white-space: nowrap'>ad_fun</span></font></i><font color="blue"><span style='white-space: nowrap'>,&#xA0;</span></font><i><font color="black"><span style='white-space: nowrap'>copy</span></font></i><font color="blue"><span style='white-space: nowrap'>)<br/>
</span></font></code>
where 
<code><i><font color="black"><span style='white-space: nowrap'>copy</span></font></i></code>
 would determine if a separate copy of 
<code><i><font color="black"><span style='white-space: nowrap'>ad_fun</span></font></i></code>

was made or if a pointer was used. 
Note that if a pointer is used, it becomes invalid when the destructor
for 
<code><i><font color="black"><span style='white-space: nowrap'>ad_fun</span></font></i></code>
 is called.

<br/>
<br/>
<b><big><a name="Conditional Expressions" id="Conditional Expressions">Conditional Expressions</a></big></b>


<br/>
<br/>
<b><a name="Conditional Expressions.Nesting" id="Conditional Expressions.Nesting">Nesting</a></b>
<br/>
If one <a href="optimize.xml" target="_top"><span style='white-space: nowrap'>optimizes</span></a>
 the code
<code><font color='blue'><pre style='display:inline'> 
	x = CondExpLt(left_x, right_x, true_x, false_x)
	y = CondExpGt(left_y, right_y, true_y, false_y)
	z = CondExpEq(left_z, right_z, x, y)
</pre></font></code>

only two of the expressions
<code><font color="blue">true_x</font></code>, <code><font color="blue">false_x</font></code>, <code><font color="blue">true_y</font></code>, <code><font color="blue">false_y</font></code> 
will be evaluated 
(two will be skipped depending on the result of <code><font color="blue">left_z == right_z</font></code>).
Not all of the expressions corresponding to
<code><font color="blue">left_x</font></code>, <code><font color="blue">right_x</font></code>, <code><font color="blue">left_y</font></code>, <code><font color="blue">right_y</font></code> need to be
evaluate, but they are.
The optimizer could be improved to skip two more expressions 
(depending on the result of <code><font color="blue">left_z == right_z</font></code>).

<br/>
<br/>
<b><a name="Conditional Expressions.Sparsity" id="Conditional Expressions.Sparsity">Sparsity</a></b>
<br/>
The <a href="optimize.xml" target="_top"><span style='white-space: nowrap'>optimizer</span></a>
 uses 
<a href="atomic_rev_sparse_jac.xml" target="_top"><span style='white-space: nowrap'>atomic&#xA0;reverse&#xA0;jacobian&#xA0;sparsity</span></a>

to determine which arguments affect the value of the results
for the atomic functions (which include <a href="checkpoint.xml" target="_top"><span style='white-space: nowrap'>checkpoint</span></a>
 functions).
While the partials of

<code><font color="blue"><span style='white-space: nowrap'><br/>
&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;</span></font><i><font color="black"><span style='white-space: nowrap'>z</span></font></i><font color="blue"><span style='white-space: nowrap'>&#xA0;=&#xA0;CondExp</span></font><i><font color="black"><span style='white-space: nowrap'>Rel</span></font></i><font color="blue"><span style='white-space: nowrap'>(&#xA0;</span></font><i><font color="black"><span style='white-space: nowrap'>left</span></font></i><font color="blue"><span style='white-space: nowrap'>,&#xA0;</span></font><i><font color="black"><span style='white-space: nowrap'>right</span></font></i><font color="blue"><span style='white-space: nowrap'>,&#xA0;</span></font><i><font color="black"><span style='white-space: nowrap'>if_true</span></font></i><font color="blue"><span style='white-space: nowrap'>,&#xA0;</span></font><i><font color="black"><span style='white-space: nowrap'>if_false</span></font></i><font color="blue"><span style='white-space: nowrap'>&#xA0;)<br/>
</span></font></code>
with respect to 
<code><i><font color="black"><span style='white-space: nowrap'>left</span></font></i></code>
 and 
<code><i><font color="black"><span style='white-space: nowrap'>right</span></font></i></code>
 always evaluates to zero,
the value of 
<code><i><font color="black"><span style='white-space: nowrap'>z</span></font></i></code>
 does depend on the value of 
<code><i><font color="black"><span style='white-space: nowrap'>left</span></font></i></code>
 and

<code><i><font color="black"><span style='white-space: nowrap'>right</span></font></i></code>
.
The <a href="checkpoint.xml" target="_top"><span style='white-space: nowrap'>checkpoint</span></a>
 functions use the value true for
<a href="revsparsejac.xml#nz_compare" target="_top"><span style='white-space: nowrap'>nz_compare</span></a>
 when computing 
reverse jacobian sparsity patterns.
This enables the optimizer to properly track the dependencies.
An <a href="atomic_option.xml" target="_top"><span style='white-space: nowrap'>atomic_option</span></a>
 should be added so this is only
done when the optimizer is using the sparsity pattern for this purpose.

<br/>
<br/>
<b><big><a name="Forward Mode Recomputation" id="Forward Mode Recomputation">Forward Mode Recomputation</a></big></b>

<br/>
If the results of <a href="forward_order.xml" target="_top"><span style='white-space: nowrap'>forward_order</span></a>
 have already been computed and are still
stored in the <a href="adfun.xml" target="_top"><span style='white-space: nowrap'>ADFun</span></a>
 object (see <a href="size_order.xml" target="_top"><span style='white-space: nowrap'>size_order</span></a>
), 
then they do not need to be recomputed and the results can just be returned.

<br/>
<br/>
<b><big><a name="Iterator Interface" id="Iterator Interface">Iterator Interface</a></big></b>

<br/>
All of the CppAD simple vector interfaces should also have an
iterator version for the following reasons:
<ol type="1"><li>
It would not be necessary to copy information to simple vectors
when it was originally stored in a different type of container.
</li><li>

It would not be necessary to reallocate memory for a result that is
repeatedly calculated
(because an iterator for the result container would be passed in).
</li></ol>


<br/>
<br/>
<b><big><a name="Library" id="Library">Library</a></big></b>



<br/>
One could build a CppAD library for use with the type <code><font color="blue">AD&lt;double&gt;</font></code>.
This would speed up compilation for the most common usage where
the 
<code><i><font color="black"><span style='white-space: nowrap'>Base</span></font></i></code>
 type is <code><font color="blue">double</font></code>.

<br/>
<br/>
<b><big><a name="Multiple Argument Forward" id="Multiple Argument Forward">Multiple Argument Forward</a></big></b>


<br/>
It has been suggested that computing and storing forward mode
results for multiple argument values
is faster for Adolc. 
Perhaps CppAD should allow for forward mode at 
multiple argument values.

<br/>
<br/>
<b><big><a name="Numeric Limits" id="Numeric Limits">Numeric Limits</a></big></b>


<br/>
Use a multiple of <code><font color="blue">std::numeric_limits&lt;double&gt;::epsilon()</font></code> instead
<code><font color="blue">1e-10</font></code> for a small number in correctness checks; e.g.,
see <a href="tan.cpp.xml" target="_top"><span style='white-space: nowrap'>tan.cpp</span></a>
.

<br/>
<br/>
<b><big><a name="Operation Sequence" id="Operation Sequence">Operation Sequence</a></big></b>


<br/>
It is possible to detect if the 
AD of 
<code><i><font color="black"><span style='white-space: nowrap'>Base</span></font></i></code>
 
<a href="glossary.xml#Operation.Sequence" target="_top"><span style='white-space: nowrap'>operation&#xA0;sequence</span></a>
 
does not depend on any of the
<a href="glossary.xml#Tape.Independent Variable" target="_top"><span style='white-space: nowrap'>independent&#xA0;variable</span></a>
 values.
This could be returned as an extra
<a href="seq_property.xml" target="_top"><span style='white-space: nowrap'>seq_property</span></a>
.

<br/>
<br/>
<b><big><a name="Optimization" id="Optimization">Optimization</a></big></b>




<br/>
<br/>
<b><a name="Optimization.Expression Hashing" id="Optimization.Expression Hashing">Expression Hashing</a></b>
<br/>
During expression sequence <a href="optimize.xml" target="_top"><span style='white-space: nowrap'>optimization</span></a>
,
hash codes are used to detect expressions that have already
been computed.
Perhaps this should be done during the original forward mode recording. 

<br/>
<br/>
<b><a name="Optimization.Variable Pairs" id="Optimization.Variable Pairs">Variable Pairs</a></b>
<br/>
Suppose that 
<code><i><font color="black"><span style='white-space: nowrap'>x</span></font></i></code>
 is a variable 
and 
<code><font color="blue"><span style='white-space: nowrap'>sin(</span></font><i><font color="black"><span style='white-space: nowrap'>x</span></font></i><font color="blue"><span style='white-space: nowrap'>)</span></font></code>
 is used in an expression.
The extra expression 
<code><font color="blue"><span style='white-space: nowrap'>cos(</span></font><i><font color="black"><span style='white-space: nowrap'>x</span></font></i><font color="blue"><span style='white-space: nowrap'>)</span></font></code>
 is also computed
during a <a href="forward.xml" target="_top"><span style='white-space: nowrap'>Forward</span></a>
 calculation.
This is because the derivative of the original expression
is expressed in terms of the values of the other expression.
In general, 
the representation of the derivative of an expression to order 
<code><i><font color="black"><span style='white-space: nowrap'>p</span></font></i></code>
 
may include the derivative of another expression to order 
<code><i><font color="black"><span style='white-space: nowrap'>p</span></font></i><font color="blue"><span style='white-space: nowrap'>-1</span></font></code>
.
In our example, if only the value 
<code><font color="blue"><span style='white-space: nowrap'>sin(</span></font><i><font color="black"><span style='white-space: nowrap'>x</span></font></i><font color="blue"><span style='white-space: nowrap'>)</span></font></code>
 
is requested, it is not necessary to compute 
<code><font color="blue"><span style='white-space: nowrap'>cos(</span></font><i><font color="black"><span style='white-space: nowrap'>x</span></font></i><font color="blue"><span style='white-space: nowrap'>)</span></font></code>
.
We should remove the computation of extra expressions derivatives that are 
not need to compute the requested derivative of the original expression. 

<br/>
<br/>
<b><big><a name="Preprocessor Symbols" id="Preprocessor Symbols">Preprocessor Symbols</a></big></b>

<br/>
Make sure all the user API preprocessor symbols are list in
the <a href="preprocessor.xml" target="_top"><span style='white-space: nowrap'>preprocessor</span></a>
 section.

<br/>
<br/>
<b><big><a name="Software Guidelines" id="Software Guidelines">Software Guidelines</a></big></b>


<br/>
<br/>
<b><a name="Software Guidelines.Boost" id="Software Guidelines.Boost">Boost</a></b>
<br/>
The following is a list of some software guidelines taken from
<a href="http://www.boost.org/development/requirements.html#Guidelines" target="_top"><span style='white-space: nowrap'>boost</span></a>
.
These guidelines are not followed by the current CppAD source code,
but perhaps they should be:

<ol type="1"><li>
Names (except as noted below) 
should be all lowercase, with words separated by underscores.
For example, acronyms should be treated as ordinary names 
(xml_parser instead of XML_parser).

</li><li>

Template parameter names should begin with an uppercase letter.

</li><li>

Use spaces rather than tabs.  
Currently, CppAD uses a tabs stops at column multiples of 5.
Five columns were chosen to avoid high levels of indenting and to allow for
<code><font color='blue'><pre style='display:inline'> 
	if( expression )
		statement
	else	statement
</pre></font></code>

with a tab after the else.
Automatic conversion to actual spaces should be easy. 

</li></ol>


<br/>
<br/>
<b><big><a name="Tracing" id="Tracing">Tracing</a></big></b>



<br/>
Add tracing the operation sequence to the user API and documentation.
Tracing the operation sequence is currently done by changing the CppAD 
source code. Use the command
<code><font color='blue'><pre style='display:inline'> 
	grep '^# *define *CPPAD_.*_TRACE' cppad/local/*.hpp
</pre></font></code>

to find all the possible tracing flags.


<hr/>Input File: omh/wish_list.omh

</body>
</html>
