Interpreter In IssueTracker #99, I made some incorrect comments on how the Interpreter treats coercion between elements of the two domains fricas (1) -> )clear all fricas )set output tex off fricas )set output algebra on fricas )set mess bot on Type: Boolean
Note when an undeclared identifier fricas x:Variable(y):= y Type: Variable(y)
This is confirmed by (2), where the assignment is immediate because However, I was not able to find any function that does this: fricas t:= ((x::Symbol)=y) Type: Boolean
fricas t:= (x = (y::Symbol)) Type: Boolean
fricas )set mess bot off The absence of this map's signature may be why in (3), the Interpreter did not coerce The difference between Compiler Now, the real confusion is when one starts using the compiler! (By the way, in Windows 0.1.4 version, all compiling of the test packages, a message appears:
This does not appear below. Also there is a problem with MathAction/Wiki processing a comment line such as
So these are omitted from below.) (a) Without any prior declarations or assignments, you can compile within a routine, spad )abbrev package SVT1 SymbolVariableTest1
SymbolVariableTest1(): Spec == Imp where
Spec == with
symVar1:() -> Boolean
Imp == add
symVar1()==
y: Variable(y) := y
x: Variable(y) := y
t: Boolean := (x = y)
spad Compiling FriCAS source code from file
/var/lib/zope2.10/instance/axiom-wiki/var/LatexWiki/2836962772639158623-25px004.spad
using old system compiler.
SVT1 abbreviates package SymbolVariableTest1
------------------------------------------------------------------------
initializing NRLIB SVT1 for SymbolVariableTest1
compiling into NRLIB SVT1
compiling exported symVar1 : () -> Boolean
Time: 0 SEC.fricas symVar1() Type: Boolean
spad )abbrev package SVT2 SymbolVariableTest2
SymbolVariableTest2(): Spec == Imp where
Spec == with
symVar2:() -> Boolean
Imp == add
symVar2()==
x: Variable(y):=y
t:Boolean:= true
spad Compiling FriCAS source code from file
/var/lib/zope2.10/instance/axiom-wiki/var/LatexWiki/2427935065936506711-25px006.spad
using old system compiler.
SVT2 abbreviates package SymbolVariableTest2
------------------------------------------------------------------------
initializing NRLIB SVT2 for SymbolVariableTest2
compiling into NRLIB SVT2
compiling exported symVar2 : () -> Boolean
****** comp fails at level 3 with expression: ******
error in function symVar2 (b) We can compile spad )abbrev package SVT3 SymbolVariableTest3
SymbolVariableTest3(): Spec == Imp where
Spec == with
symVar3:() -> Boolean
Imp == add
symVar3()==
y: Variable(y)
x: Variable(y):=y
t:Boolean:= true
spad Compiling FriCAS source code from file
/var/lib/zope2.10/instance/axiom-wiki/var/LatexWiki/8532403455899499600-25px007.spad
using old system compiler.
SVT3 abbreviates package SymbolVariableTest3
------------------------------------------------------------------------
initializing NRLIB SVT3 for SymbolVariableTest3
compiling into NRLIB SVT3
compiling exported symVar3 : () -> Boolean
Time: 0 SEC.Even though fricas symVar3() But we cannot spad )abbrev package SVT4 SymbolVariableTest4
SymbolVariableTest4(): Spec == Imp where
Spec == with
symVar4:() -> Boolean
Imp == add
symVar4()==
y: Symbol
x: Variable(y):=y
t:Boolean:= true
spad Compiling FriCAS source code from file
/var/lib/zope2.10/instance/axiom-wiki/var/LatexWiki/5583142712275742882-25px009.spad
using old system compiler.
SVT4 abbreviates package SymbolVariableTest4
------------------------------------------------------------------------
initializing NRLIB SVT4 for SymbolVariableTest4
compiling into NRLIB SVT4
compiling exported symVar4 : () -> Boolean
****** comp fails at level 2 with expression: ******
error in function symVar4 Not even if we assign a value to spad )abbrev package SVT5 SymbolVariableTest5
SymbolVariableTest5(): Spec == Imp where
Spec == with
symVar5:() -> Boolean
Imp == add
symVar5()==
y: Symbol := y
x: Variable(y):=y::Variable(y)
t:Boolean:= true
spad Compiling FriCAS source code from file
/var/lib/zope2.10/instance/axiom-wiki/var/LatexWiki/2956805564468662474-25px010.spad
using old system compiler.
SVT5 abbreviates package SymbolVariableTest5
------------------------------------------------------------------------
initializing NRLIB SVT5 for SymbolVariableTest5
compiling into NRLIB SVT5
compiling exported symVar5 : () -> Boolean
****** comp fails at level 3 with expression: ******
error in function symVar5 (c) Although we can compile spad )abbrev package SVT6 SymbolVariableTest6
SymbolVariableTest6(): Spec == Imp where
Spec == with
symVar6:() -> Boolean
Imp == add
symVar6()==
y: Variable(y)
x: Variable(y):=y
t:Boolean:= x = y
spad Compiling FriCAS source code from file
/var/lib/zope2.10/instance/axiom-wiki/var/LatexWiki/7214572082810698305-25px011.spad
using old system compiler.
SVT6 abbreviates package SymbolVariableTest6
------------------------------------------------------------------------
initializing NRLIB SVT6 for SymbolVariableTest6
compiling into NRLIB SVT6
compiling exported symVar6 : () -> Boolean
****** comp fails at level 1 with expression: ******
error in function symVar6 Not even testing spad )abbrev package SVT7 SymbolVariableTest7
SymbolVariableTest7(): Spec == Imp where
Spec == with
symVar7:() -> Boolean
Imp == add
symVar7()==
y: Variable(y)
x: Variable(y):=y
t:Boolean:= x = x
spad Compiling FriCAS source code from file
/var/lib/zope2.10/instance/axiom-wiki/var/LatexWiki/4490168181249298181-25px012.spad
using old system compiler.
SVT7 abbreviates package SymbolVariableTest7
------------------------------------------------------------------------
initializing NRLIB SVT7 for SymbolVariableTest7
compiling into NRLIB SVT7
compiling exported symVar7 : () -> Boolean
****** comp fails at level 1 with expression: ******
error in function symVar7 (d) But if we stay with the domain spad )abbrev package SVT8 SymbolVariableTest8
SymbolVariableTest8(): Spec == Imp where
Spec == with
symVar8:() -> Boolean
Imp == add
symVar8()==
y:Symbol
x:Symbol:= y
t:Boolean:= (x=y)
spad Compiling FriCAS source code from file
/var/lib/zope2.10/instance/axiom-wiki/var/LatexWiki/6938772839598774218-25px013.spad
using old system compiler.
SVT8 abbreviates package SymbolVariableTest8
------------------------------------------------------------------------
initializing NRLIB SVT8 for SymbolVariableTest8
compiling into NRLIB SVT8
compiling exported symVar8 : () -> Boolean
Time: 0 SEC.Computing the next result, which produces the error below in Windows version, is not displayed properly by MathAction because the system error causes Axiom to return an error condition. symVar8() Like >> System error: equal: x is a NULL pointer #110 Domain Variable() and Symbol improvementsin formatting of
MathAction output --William Sit, Mon, 21 Feb 2005 18:14:07 -0600 reply Dear Bill:
Thanks for fixing some of the problems on MathAction in IssueTracker #110 and also rebroadcasting the page. Did you change the editor? The page is now defaulted to HTML+LaTeX and the editor that came up when I hit the edit button is a fancy editor with tool bars. On the other hand, I did not get the "raw" text. When I simply insert a carriage return before the header "Compiler", the preview shows error. Resetting the format to Structured Text + LaTeX will mess up (line breaks, etc) the preview as well. William William, I am sorry for this oversight. I did not intentionally change the editor. I forgot that by default the wiki uses a "fancy editor" called Epoz for the HTML page type. This editor assumes that the content is pure HTML and is supposed to let people who don't know HTML produce nicely formatted pages. Unfortunately the pages that we are editing contain embedded LaTeX commands that seem to completely confuse it. There is a way to change the mode to plain text editing, but I think that on the whole this is more trouble than it is worth. Therefore I have disabled Epoz and you should be able to edit the HTML+LaTeX page in the same way as the StructuredText+LaTeX pages.The reason that I changed the page type to HTML+LaTeX is because I have found that it often produces a better formated page when the page contains compiler output. --------- Bill Page. Status: open => closedThis is rather a discussion than a bug report. I moved its contents to a new page SymbolsAndVariables |