assemble a sequence of addresses into an object
break an object into its component addresses
obtain the expression pointed to by an address
obtain the address that points to an expression
integer or symbolic object type identifier
sequence of integer addresses
integer representing an address
This collection of four functions is known as the ``hackware package'' in Maple. These functions allow access to the internal representations of Maple objects and to the addresses pointing to them.
You should become familiar with the internal representation of Maple objects before using this collection of functions. For details, refer to the Appendix in the Maple Programming Guide.
Extreme care is required when using these functions, because their use can lead to various types of unrecoverable internal errors. Maple does some rudimentary checks of the objects created through these functions, but it is not possible to check everything.
The functions assemble and disassemble are a complementary pair of functions:
The first function, assemble, assembles an object identifier and a sequence of integer addresses into a Maple object and returns an integer addr that gives the address of the object.
The second function, disassemble, looks at the Maple object pointed to by the integer address addr, disassembles the object into its component parts, and returns the sequence of addresses of the component parts.
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:
The kernelopts function with option dagtag can be used to map among these symbolic names and the corresponding integer values.
The functions pointto and addressof are a complementary pair of functions:
The function pointto takes an integer address addr and returns the Maple expression to which it points.
The addressof function takes a Maple expression and returns the integer address that points to it.
An object whose only reference is through an addressof() reference could be collected by garbage collection. To avoid this, either make sure that all the objects for which you compute addressof() are assigned to variables, or delay garbage collection (see gc).
The assemble, disassemble, pointto and addressof commands are thread-safe as of Maple 15.
For more information on thread safety, see index/threadsafe.
f ≔ 3⁢x2+5.0
a ≔ addressof⁡f
d ≔ disassemble⁡a
g ≔ assemble⁡d1,d2,d3
h ≔ y=ⅆⅆx⁢x2
b ≔ addressof⁡h
j ≔ disassemble⁡b
n ≔ assemble⁡INEQUAT,j2,j3
The Maple debugger
Download Help Document
What kind of issue would you like to report? (Optional)