[ library(asm) | The ECLiPSe Libraries | Reference Manual | Alphabetic Index ]
disasm(+PredSpec, ?WAMCode, +Module)
Disassemble an existing predicate PredSpec in the module Module to its WAM
abstract machine representation WAMCode.
- Variable or a list of WAM instructions in the right format.
Unifies WAMCode with the WAM instructions representing the abstract
machine code for the predicate specified by PredSpec (in Name/Arity
form) in module Module. The WAM code is in the form of a list, with each
element representing one WAM instruction. The format of the WAMCode is
the same as that used by asm/2,3 and pasm/3 to assemble a
predicate. Thus, the WAM code generated by disasm/2,3 can be used to
load the predicate into ECLiPSe without having to compile the source
The library asm must be loaded to use diasm/3.
Currently asm/3 cannot disassemble dynamic predicates.
If PredSpec is dynamic.
Fails if WAMCode is initially instantiated and does not unify with the WAM
code generated by asm/1 for the predicate, or if PredSpec is dynamic.
- (5) type error
- PredSpec or Module not in correct form.
- (60) referring to an undefined procedure
- PredSpec does not exist in module Module.
- (80) not a module
- Module is not an existing module.
disasm / 2, asm / 2, asm / 3, pasm / 3, wam / 1