Skip to content

Extended Maude interpreter inspired in Full Maude (early prototype)

Notifications You must be signed in to change notification settings

fadoss/maude-shell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Extended Maude interpreter

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:

  • select followed by a module name or a metamodule term (this term is parsed in the currently selected module)
  • show module and show all
  • search
  • reduce (red), rewrite (rew), frewrite (frew), and erewrite (erew) without bounds
  • pwd, cd, and quit

Usage

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

About

Extended Maude interpreter inspired in Full Maude (early prototype)

Resources

Stars

Watchers

Forks