axiom-developer
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Axiom-developer] No progress on notangle


From: Ralf Hemmecke
Subject: Re: [Axiom-developer] No progress on notangle
Date: Sun, 18 Feb 2007 22:01:48 +0100
User-agent: Thunderbird 2.0b2 (X11/20070116)

Unforunately, I am a lisp illiterate. :-( So I don't even know how to start your program on test files. So I would like to give a little (meaningless) testfile.

The output of notangle on the program below is

----------------------
foo(x: Integer): Integer == z := 1
                            for i in 1.. x repeat
                                h := 1
                                for j in 1..i repeat
                                    h := h + j
                                    h := 2*h
                                h := if h > 100
                                       then
                                         h-2
                                       else
                                         h+2
                                h := 3*h
                                z := h
                            z
----------------------

Does your program give the same result?

Furthermore what about the option "-L" that can be given to notangle?
That is particularly useful if your compiler emits a column number for error messages. #pile mode is bad in that case anyway, but there are also files that are indentation-independent.

Ralf

---BEGIN aaa.spad.pamphlet
<<*>>=
foo(x: Integer): Integer == <<foo body>>
@

<<foo body>>=
z := 1
for i in 1.. x repeat
    <<auxiliary computation>>
    h := <<post computation>>
    <<binding z>>
z
@

<<auxiliary computation>>=
h := 1
for j in 1..i repeat
    h := h + j
    h := 2*h
@

<<post computation>>=
if h > 100
  then
    h-2
  else
    h+2
@

<<binding z>>=
h := 3*h
z := h
@
---END aaa.spad.pamphlet




reply via email to

[Prev in Thread] Current Thread [Next in Thread]