aboutsummaryrefslogtreecommitdiff
path: root/src/maple
diff options
context:
space:
mode:
authorjthorn <jthorn@f88db872-0e4f-0410-b76b-b9085cfa78c5>2002-04-16 14:52:43 +0000
committerjthorn <jthorn@f88db872-0e4f-0410-b76b-b9085cfa78c5>2002-04-16 14:52:43 +0000
commit4fccaae0fde63cd99a3e7af22d81da7165caa8d5 (patch)
tree27d260817e6e4d5375ddca9bbdeb47ea80a7e171 /src/maple
parent9c527074ff42a619aa4a542f24f4db52f0413fc8 (diff)
fix a couple of bugs
git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinAnalysis/AHFinderDirect/trunk@518 f88db872-0e4f-0410-b76b-b9085cfa78c5
Diffstat (limited to 'src/maple')
-rw-r--r--src/maple/codegen2.maple23
-rw-r--r--src/maple/util.maple2
2 files changed, 14 insertions, 11 deletions
diff --git a/src/maple/codegen2.maple b/src/maple/codegen2.maple
index 29592cf..ba4f811 100644
--- a/src/maple/codegen2.maple
+++ b/src/maple/codegen2.maple
@@ -62,9 +62,10 @@ proc(expr_in::{algebraic, list(algebraic)},
output_file_name::string)
local expr, expr_temps, input_set, output_set, expr_cost;
-printf("codegen(%a)\n", lhs_name);
+printf("codegen2(%a)\n", lhs_name);
expr := expr_in;
+saveit(10, procname, "input", expr);
printf(" convert --> equation list\n");
expr := cvt_to_eqnlist(expr, lhs_name);
@@ -151,7 +152,7 @@ proc(expr::{algebraic, array, list({algebraic, array})},
# ... test for array first since otherwise expr itself is a "name",
# which would match type "algebraic" as well
-if ( type(expr, array) and type(lhs_name, name) )
+if (type(expr, array) and type(lhs_name, name))
then return map(
proc(ii)
return lhs_name[op(ii)] = expr[op(ii)];
@@ -159,19 +160,21 @@ if ( type(expr, array) and type(lhs_name, name) )
,
indices_in_order(expr)
);
+fi;
-elif ( type(expr, algebraic) and type(lhs_name, name) )
+if (type(expr, algebraic) and type(lhs_name, name))
then return [lhs_name = expr];
+fi;
-elif ( type(expr, list({algebraic, array})) and type(lhs_name, list(name)) )
+if (type(expr, list({algebraic, array})) and type(lhs_name, list(name)))
then return zip(op @ cvt_to_eqnlist, expr, lhs_name);
-
-else error "unknown type for expression!\n"
- " expr=%1\n"
- " whattype(expr)=%2\n"
- ,
- expr, whattype(expr);
fi;
+
+error "unknown type for expression!\n"
+ " expr=%1\n"
+ " whattype(expr)=%2\n"
+ ,
+ expr, whattype(expr);
end;
################################################################################
diff --git a/src/maple/util.maple b/src/maple/util.maple
index 2cf6562..a2ec9ec 100644
--- a/src/maple/util.maple
+++ b/src/maple/util.maple
@@ -112,7 +112,7 @@ end proc;
# Bugs:
# - The function fails if the indices aren't a list of numbers.
#
-lindices_in_order :=
+indices_in_order :=
proc(T::table)
return sort([indices(T)], lexorder_integer_list);
end;