aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2009-01-31 03:30:43 +0000
committerdos-reis <gdr@axiomatics.org>2009-01-31 03:30:43 +0000
commit8519b9831708f14b575d7896ac5d31a393d547f7 (patch)
treec3b7a33b459280e041c3e777f12db9ca74935ea1
parent5779d5e238ccce218020d39307674de938a5ad94 (diff)
downloadopen-axiom-8519b9831708f14b575d7896ac5d31a393d547f7.tar.gz
Fix AW/83
* interp/i-coerfn.boot (Dmp2P): Scalar tag is 0 for Polynomial T. * testsuite/interpreter/aw-83.input (a): New.
-rw-r--r--src/ChangeLog7
-rw-r--r--src/interp/i-coerfn.boot7
-rw-r--r--src/testsuite/interpreter/aw-83.input5
3 files changed, 17 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index a3e20d81..0001fc28 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,10 @@
+2009-01-30 Waldek Hebisch <hebisch@math.uni.wroc.pl>
+ Gabriel Dos Reis <gdr@cs.tamu.edu>
+
+ Fix AW/83
+ * interp/i-coerfn.boot (Dmp2P): Scalar tag is 0 for Polynomial T.
+ * testsuite/interpreter/aw-83.input (a): New.
+
2009-01-29 Gabriel Dos Reis <gdr@cs.tamu.edu>
* OpenAxiom 1.2.1 Released.
diff --git a/src/interp/i-coerfn.boot b/src/interp/i-coerfn.boot
index e5d2da93..5ee715f0 100644
--- a/src/interp/i-coerfn.boot
+++ b/src/interp/i-coerfn.boot
@@ -1,6 +1,6 @@
-- Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
-- All rights reserved.
--- Copyright (C) 2007-2008, Gabriel Dos Reis.
+-- Copyright (C) 2007-2009, Gabriel Dos Reis.
-- All rights reserved.
--
-- Redistribution and use in source and binary forms, with or without
@@ -223,7 +223,10 @@ Dmp2P(u, source is [dmp,vl, S], target is [.,T]) ==
-- slight optimization for case #u = 1, #vl =1 and S=T
-- I know it's pathological, but it may avoid an instantiation
(1 = #u) and (1 = #vl) and (S = T) =>
- (lexp:= (CAAR u).0) = 0 => [1,:CDAR u]
+ -- The Rep of Polynomial T is a 2-branched Union with scalar
+ -- (coefficient ring values) first (tag = 0), and non-trivial
+ -- polynomials second (tag = 1).
+ (lexp:= (CAAR u).0) = 0 => [0,:CDAR u]
[1,vl.0,[lexp,0,:CDAR u]]
vl' := reverse MSORT vl
diff --git a/src/testsuite/interpreter/aw-83.input b/src/testsuite/interpreter/aw-83.input
new file mode 100644
index 00000000..9cba9a25
--- /dev/null
+++ b/src/testsuite/interpreter/aw-83.input
@@ -0,0 +1,5 @@
+--
+-- AW/83
+a := 1::DMP(['x],INT)
+a :: POLY INT -- used to cause trouble
+