Axiom does regression testing during every build.

src/input/*.input.pamphlet files are really just ".tex" files
(replace ".pamphlet" with ".tex" and they can create pdfs)
as they are intended to be user-visible documentation
included in the Literate Programming books.

Since these are part of the Literate Programming effort we
extract the actual tests from the ".pamphlet" (aka ".tex")
at test time. The Makefile trigger to signal including a
file in the regression testing is the suffix ".regress".
The resulting output is captured and compared with the
saved results.

The src/input/*.input.pamphlet files have a set of tests
delimited by tags (--S, --E) and numbered so test failure
messages point to the test failures. For example, in the
ackermann.input.pamphlet there are 23 tests.

We leverage the fact that -- is a comment and use that to
create special semantics for comments. (This is also used
in the algebra files to create help information.)

This pamphlet file creates a ".input" file for tests.
The expected results of each test are included in the input,
delimited by --R (for result) or --I (for ignore). The --R
results are byte-by-byte compared with the regression test run.

In addition to automating testing, including the expected
results shows how to use each function, making useful user
documentation of the many available functions. Latex was used
so it would be possible to explain, for example, what the
Ackermann function is.

The long-term goal was to explain, document, and show valid
examples of all functions.

--S 1 of 23
ackerslow(m:INT,n:INT):INT ==
  m = 0 => n+1
  (m>0 and n=0) => ackerslow(m-1,1)
  ackerslow(m-1,ackerslow(m,n-1))
--R 
--R   Function declaration ackerslow : (Integer,Integer) -> Integer has 
--R      been added to workspace.
--R                                                                   Type: 
Void
--I                                                                  Time: 
0 sec
--E 1

--S 2 of 23
ackerslow(0,0)
--R 
--R   Compiling function ackerslow with type (Integer,Integer) -> Integer 
--R
--R   (2)  1
--R                                                        Type: 
PositiveInteger
--I                                                   Time: 0.01 (OT) = 
0.01 sec
--E 2


To the specific question of SKIP, these are functions which
create graphics output. They were intended to be regression
tested by comparing the binary file formats but I never finished
that part of the work.

Tim


On Sunday, April 21, 2024 at 10:31:05 AM UTC-4 ra...@hemmecke.org wrote:

> > Tim Daly probably can say more about original intent. For me it is 
> > documentation: it is list of files that we have but do not use. 
> > Logically, removal of SKIP should involve removal of files listed 
> > there.
>
> I have not yet completely compared everything, but the content of this
> directory is currently a mixture of files for
>
> (A) testing FriCAS via the UnitTest framework
> (B) testing FriCAS by just comparing output to a previous version
> (C) auxiliary input files for producing picture for the book
> (D) some other draw files
>
> > Concerning the files: I kept them under assumtion that even though
> > we do not use them during normal testing, they could be used for
> > some ocassional test.
>
> Yes, if there were graphics test, that would be good.
>
> > IIRC some files are tests for planned but not implemented features. 
> > But most just test graphics.
>
> Honestly, I would be happy, if input/ contained just testfiles and this
> directory would be called tests/. THis should be OK for type (A) files.
> Type-(B) files should gradually be transformed to type-(A) files.
> Files of type (C) are actually living as sources in some .htex files for 
> the book. I think it would make sense to generate them from the .htex 
> files on the fly by a simple awk run. (I am currently trying to achieve 
> that.)
> Type (D) files we can keep, but maybe it makes sense to add a little 
> documentation to them explaining what the commands do. So in some sense
> including them to the end of the book. In the long run as Greg V. said, 
> it would be good to produce a format for the fricas-notebook repo. 
> Unfortunately, there is currently not yet a way to produce and include 
> graphics output in a jFriCAS notebook.
>
> Ralf
>

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to fricas-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/fricas-devel/800083b5-99de-4ff4-b0ec-bdbaf37ddf73n%40googlegroups.com.

Reply via email to