This is an early prototype of an extended Maude interpreter with support for running commands on metalevel modules. It is inspired in Full Maude, but written in Python.
Several Maude commands and command-line options are supported, but not all. Among them:
selectfollowed by a module name or a metamodule term (this term is parsed in the currently selected module)show moduleandshow allsearchreduce(red),rewrite(rew),frewrite(frew), anderewrite(erew) without boundspwd,cd, andquit
The extended interpreter can be run as maude-shell <Maude files, Python files or command-line options> with the same effect as in the Maude interpreter (i.e. the Maude files are processed and their commands are executed). The given Python scripts are executed too, so that they can install Python-based hooks through the maude Python library. Instead of maude-shell, which is only available when the package is properly installed in the system, the command may be python3 -m maude_shell if installed from the wheel or ./maude-shell if run through the standalone binary.
After all, a REPL appears where the supported commands can be introduced.
$ python -m maude_shell
\||||||||||||||||||/
--- Welcome to Maude ---
/||||||||||||||||||\
Maude Shell on Maude 3.5.1+smc
Maude> select META-LEVEL .
Maude> select upModule('NAT, false) .
Maude> red 1 + 2 .
reduce in NAT : 1 + 2
rewrites: 1
result NzNat: 3