Artifact a0808806c8796b75e18e9c493a983ea73a868b7b71bbe8c0a82e252c8cc2ac9c:
- Executable file mttroot/mtt/bin/trans/mtt_optimise.sh — part of check-in [9e8650bb26] at 2002-06-05 17:57:50 on branch origin/optimise-algebraic-equations — Main part of optimisation routine moved to separate file. (user: geraint@users.sourceforge.net, size: 482) [annotate] [blame] [check-ins using] [more...]
#! /bin/sh set -e # get expression to optimise lhs="$1" rhs="$2" create_reduce_script () { lhs="$1" rhs="$2" cat <<EOF off echo$ load scope$ on double$ on noconvert$ on rounded$ off int$ off nat$ out "${tmp}"$ optimize mtt_tmp0 :=: ${rhs} iname mtt_tmp$ write "${lhs} := mtt_tmp0 $"$ shut "${tmp}"$ ;end; EOF return } # set work file names tmp="$0.tmp" log="$0.log" create_reduce_script "${lhs}" "${rhs}" | reduce > ${log} cat ${tmp} rm -f ${tmp} exit 0