[Aldor-l] Buggy interpreter

Ralf Hemmecke ralf at hemmecke.de
Tue Jan 9 09:10:22 EST 2007


The following file gives a segfault in the interpreter.

Ralf

---BEGIN aaa.as
#include "aldor"
#include "algebra"
#include "aldorinterp"
import from Integer;
import from Vector Integer;
import from DenseMatrix Integer;
a:=[[1,0],[0,0]];
b:=[[0,1],[0,0]];
import from LinearAlgebra(Integer,DenseMatrix Integer);
(m1,m2,v):=solve(a,b);
m1;
m2;
v;
#quit
---END aaa.as


aldor -gloop < aaa.as
woodpecker:~/scratch>aldor -gloop < aaa.as
      AA  L      DDDD      OOO    RRRR
     A A  L      D   D    O   O   R   R
    A  A  L      D    D  O     O  R   R
   AAAAA  L      D    D  O     O  RRRR
  A    A  L      D   D    O   O   R  R
A     A  LLLLL  DDDD      OOO    R   R

(c) Numerical Algorithms Group Ltd 1995-2001
Release: Aldor(C) version 1.0.3 for LINUX(glibc2.3) (debug version)
Type "#int help" for more details.
                                            Comp: 200 msec, Interp: 40 msec
                                            Comp: 580 msec, Interp: 0 msec
                                            Comp: 100 msec, Interp: 0 msec
                                            Comp: 90 msec, Interp: 0 msec
                                            Comp: 20 msec, Interp: 0 msec
                                            Comp: 20 msec, Interp: 0 msec
matrix [[1,0],[0,0]] @ DenseMatrix(AldorInteger)
                                            Comp: 0 msec, Interp: 790 msec
matrix [[0,0],[1,0]] @ DenseMatrix(AldorInteger)
                                            Comp: 10 msec, Interp: 60 msec
                                            Comp: 10 msec, Interp: 0 msec
   () @ DenseMatrix(AldorInteger), DenseMatrix(AldorInteger), 
Vector(AldorInteger)
                                            Comp: 10 msec, Interp: 120 msec
matrix [[0],[1]] @ DenseMatrix(AldorInteger)
                                            Comp: 10 msec, Interp: 60 msec
matrix [[0,0],[0,0]] @ DenseMatrix(AldorInteger)
                                            Comp: 0 msec, Interp: 60 msec
Program fault (segmentation violation).Program fault (segmentation 
violation).

#1 (Error) Argument 1 of `<<$Vector(AldorInteger)' did not match any 
possible parameter type.
     The rejected type is TextWriter.
     Expected type BinaryWriter.




More information about the Aldor-l mailing list