Does the functionality go in each algebra domain, in which case the mathematics code is cluttered with boilerplate code for each output format, or does the functionality go in the drivers which gives less control over the output? Of course, this type of dilemma is not specific to CAS systems (see expression problem on Wiki). It just depends on what the designers want to optimise. I guess, in the case of CAS, there is no right or wrong answer. This makes the content much more human readable and allows the formatting to be changed without danger of introducing errors. For instance, when writing HTML documents, it is considered good practice to split out the formatting information into Cascading Style Sheets (CSS). In computing, generally, many types of formatter consider it bad practice to mix formatting information in with content. We want people to be able to specify new algebras by writing code using SPAD, of course this code will specify the mathematical structure but, how much code should be required to specify what the elements of this algebra will look like when they are displayed on some output device? Each algebra, such as matrix, complex numbers and so on, needs to be displayed in an appropriate way, but how to we specify that? There is a dilemma for the designers of a Computer Algebra Program (CAS) regarding the best way to specify the formatting of mathematical entities and expressions. Introduction to Formatting Mathematical Output There are plans to remove dependence on Lisp and bootcode in FriCAS and so the plan is to rewrite all of this purely in SPAD. Bootcode is obscure and badly documented cross between Lisp and SPAD, for this reason it is very hard to work out what this code does. Swapping backward and forward between SPAD and Lisp is a problem because type information is lost and heavy use has to be made of the 'pretend' instruction which is considered bad practice. One of the main reasons for the existing difficulties is that the code is a mixture of 3 languages: There are lots of interesting possibilities for changes to interfaces but changes can be stifled due to the fragile state of existing code. However it is hard to add new formats or change existing formats. Why Change?įriCAS can output mathematical expressions and structures in various formats such as text, TeX, mathML, html and so on. The remainder of this page explains how FriCAS formats its output and proposes changes to the way that this works. Proposal for a Change to The Way FriCAS Formats Output If you need to use unicode output I have put a simple unicode tester on this page.I have put information about my code for Monospaced formatted output (for output to the command line console) on the page here.I have put information about my code for HTML formatted output on the page here.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |