jakubi

1384 Reputation

12 Badges

20 years, 2 days

MaplePrimes Activity


These are replies submitted by jakubi

It sounds to me, may be wrong, that the only posibility is that this process runs without returning control. If so, it may be not be suitable for running from the init file.
 

In ?release, it is stated:

The procedure Serve does not cause the calling process to fork or spawn new threads or lightweight processes. This is not a bug, but a design restriction imposed by licensing requirements.

This works also for me under Windows using this .bat file in the path:

========== automw.bat =========

@echo off
set fname=%1
maple12 -s -q automw.mpl

===============================

For me maple12 is really a bat file in the path with a bit different name, that opens cmaple.exe, like:

========== maple12.bat =======

@echo off
c:\maple-path\bin.win\cmaple.exe %1 %2 %3 %4 %5 %6 %7 

==============================

and I have changed in automw.mpl localhost.localdomain to just localhost, as this works for me OK both under Linux and Windows.

Then, I execute the bat file as:

automw j:/path/file.mw

Note, the path with forward bars.

It was exactly that: I have changed the host name and domain, and forgot about it...

Now it works provided I give the full name of the .mw file as parameter (ie with its path). The code number that I get on the console is 63. Otherwise, even executing the script (in the path) from the same directory with automw.mpl and the.mw file, an error message occurs that this mw file could not be found (and code 41).

In all, this is very interesting. It opens for me a whole new area of posibilities.  I guess that  similar things could be done from a compiled executable using OpenMaple.

I have tried these steps in Debian Etch, but I have not got the same result yet. The result of executing the script automw from the console is a new Standard GUI instance that opens with the .mw file inside. When I close this second Standard instance, the control does not return to the console, and it looks like this:

$ automw lp.mw
$
0

Initially I have observed also a delay of about two minutes before the new Standard GUI opened, as if  the link through the socket to the running Standard GUI is not being opened and  a timeout occurs. But I do not know yet where the problem could be (a firewall issue?).

 

I think that it is fair to say that there are (at least) three inequivalent sets of identifiers for Maple objects: dagtags, types and inert headers. And that the differences between them are not fully documented.

is that: The object identifier objectid represents the type of the object. And clearly, from your example, these object identifiers and the types are not equivalent. So, the objectid cannot represent the type.

that seems to me confusing in the light of the current discussion.

?assemble:

The object identifier objectid represents the type of the object, and can be expressed as an integer, or as a symbolic name. The valid object identifier names are:

[list of object identifiers, aka dagtags]

OK, but this help page does not show a list of those differences. In particular, are these differences exactly the same as those between types and dagtags?

Yes, for column output it is fine. I have been using:

kernelopts(memusage)[1..,1];

and

seq( [i,kernelopts( dagtag = i )], i = 1..61 );

to see also their numbers.

Now, this appendix states:

All the internal data structures have the same general format: Header Data1 ... Datan ...
The header field, stored in one or more machine words, encodes the length of the structure and its type.

As written here, it sounds that there is a one-to-one correspondence: header-dagtag-type. Probably this paragraph should be improved.

And what about the correspondence of types with the output of 'ToInert'? Here:

ToInert(3*a);

_Inert_PROD(_Inert_NAME("a"),_Inert_INTPOS(3))

?ToInert states:

Inert forms closely mirror the Maple internal DAG data structure representation.

How close is "closely"?

For reference, and for the example of above, I have looked on how this can be done in Mathematica 5:

Table[Exp[i/5*q*Pi], {i, 4}] /. Exp[Rational[n_Integer, 5]*q*Pi] -> alpha^n

{alpha, alpha^2, alpha^3, alpha^4}

Not perfect (it does not work for i=0 or 5), and this 'Rational' is not the most obvious thing, but not so bad either. I believe that the equivalent syntax in Maple would imply a structured type, something like 'fraction(n::integer,5)' but as such does not seem correct.

this knowledge is somewhat limited:

int(cos(a*sin(t)),t=0..Pi/2);
                         1/2 Pi BesselJ(0, a)

int(cos(a*sin(t)),t=0..Pi);

                           Pi BesselJ(0, a)

int(cos(a*sin(t)),t=0..2*Pi);

                          2 Pi
                         /
                        |
                        |      cos(a sin(t)) dt
                        |
                       /
                         0

Apparently, the periodicity and symmetries of the integrand are not used in the latter case.

this knowledge is somewhat limited:

int(cos(a*sin(t)),t=0..Pi/2);
                         1/2 Pi BesselJ(0, a)

int(cos(a*sin(t)),t=0..Pi);

                           Pi BesselJ(0, a)

int(cos(a*sin(t)),t=0..2*Pi);

                          2 Pi
                         /
                        |
                        |      cos(a sin(t)) dt
                        |
                       /
                         0

Apparently, the periodicity and symmetries of the integrand are not used in the latter case.

i do not know whether these lines are general enough (eg they contain some assumptions on the form of the terms), but may be a step towards that:

indets(qs,`^`(`*`,fraction));
s:=map(x->op(1,x),%);
for i to nops(s) do
qs||i:=algsubs(s[i]=u,qs);
end do;
map(length,[seq(qs||i,i=1..nops(s))]);
member(min(%),%,'p');
member(max(%%),%%,'p2');
indets(s,name) minus indets(s[p2],name);
qqq:=map(u->u::positive,%);
qs||p:
simplify(%) assuming u::positive,op(qqq);
subs(u=s[p],%);


                                    157
                                    ---
                                    10
           /             2         \
           |        | q |          |                    3 1/2
        c1 |-----------------------|    (Delta GRAVIT Ds )
           |       7/3   2         |
           \(H - B)    ks  Delta Ds/
        -----------------------------------------------------
                                 71/5
                               tr

i do not know whether these lines are general enough (eg they contain some assumptions on the form of the terms), but may be a step towards that:

indets(qs,`^`(`*`,fraction));
s:=map(x->op(1,x),%);
for i to nops(s) do
qs||i:=algsubs(s[i]=u,qs);
end do;
map(length,[seq(qs||i,i=1..nops(s))]);
member(min(%),%,'p');
member(max(%%),%%,'p2');
indets(s,name) minus indets(s[p2],name);
qqq:=map(u->u::positive,%);
qs||p:
simplify(%) assuming u::positive,op(qqq);
subs(u=s[p],%);


                                    157
                                    ---
                                    10
           /             2         \
           |        | q |          |                    3 1/2
        c1 |-----------------------|    (Delta GRAVIT Ds )
           |       7/3   2         |
           \(H - B)    ks  Delta Ds/
        -----------------------------------------------------
                                 71/5
                               tr

First 65 66 67 68 69 70 71 Last Page 67 of 123