Skip to Content.
Sympa Menu

maude-help - Re: [Maude-help] Questions to Maudes Basic Functions

maude-help AT lists.cs.illinois.edu

Subject: Maude-help mailing list

List archive

Re: [Maude-help] Questions to Maudes Basic Functions


Chronological Thread 
  • From: Marc Boyer <Marc.Boyer AT onera.fr>
  • To: maude-help AT cs.uiuc.edu
  • Subject: Re: [Maude-help] Questions to Maudes Basic Functions
  • Date: Wed, 12 Sep 2012 12:28:41 +0200
  • List-archive: <http://lists.cs.uiuc.edu/pipermail/maude-help/>
  • List-id: <maude-help.cs.uiuc.edu>

Le 12/09/2012 10:00, J.Hofmann a écrit :
Hi everyone,

I’m an absolute newbie to Maude, and still I don’t know the basic
functions. Perhaps you could answer me (because via Google, I wasn’t
able to solve my problems).

I am not an expert, but I have used Maude.

Is there any shortcut to stop Maude from reducing a module? (If it’s
lasting > 5 Minutes, I would like to stop it manually, but I don’t know how)

What did you mean by "reducing a module" ?

In my use, maude read some modules. And after it, you can ask maude
to reduce some terms.

Under Linux, when a reduction lasts "too much time", I just type C^C (Control-C) and I get the Debug> prompt.

Is it somehow possible to use a synthesized function right away? For
example, after having reduced a module, to use/test it with any input?

(I think about like in Haskell for example, where I can just type at the
prompt something like “add 1 2” and then the result is displayed.)

I do not understand. Here is a simple Maude code

fmod FACT is
pr INT .
op fib : Nat -> Nat .
var n : Nat .
eq fib( 0 ) = 1 .
eq fib( 1 ) = 1 .
ceq fib( n ) = ( fib( n - 1 )) + (fib(n - 2)) if n >= 2 .
endfm

Put it a file fact.maude

laptop-boyer|~$ maude fact.maude
\||||||||||||||||||/
--- Welcome to Maude ---
/||||||||||||||||||\
Maude 2.6 built: Dec 9 2010 18:40:31
Copyright 1997-2010 SRI International
Wed Sep 12 12:24:46 2012
Maude> red fib(5) .
reduce in FACT : fib(5) .
rewrites: 43 in 0ms cpu (0ms real) (~ rewrites/second)
result NzNat: 8
Maude> red fib(5) .


And last but not least: I found the website
http://maude.cs.uiuc.edu/maude2-manual/html/maude-manualch18.html, where
is stated, that for example the command “-help” lists some kind of help.

But I tried commands like “-help .”, “help .” etc., but always got the error

Because --help is a command line option, not a maude interpreteur command.

laptop-boyer|~$ maude --help
Maude interpreter
Usage: maude [options] [files]
Options:
--help Display this information
--version Display version number
-no-prelude Do not read in the standard prelude
-no-banner Do not output banner on startup
-no-advise No advisories on startup
-no-mixfix Do not use mixfix notation for output
-no-wrap Do not automatic line wrapping for output
-ansi-color Use ANSI control sequences
-no-ansi-color Do not use ANSI control sequences
-tecla Use tecla command line editing
-no-tecla Do not use tecla command line editing
-batch Run in batch mode
-interactive Run in interactive mode
-random-seed=<int> Set seed for random number generator
-xml-log=<filename> Set file in which to produce an xml log

Send bug reports to:
maude-bugs AT maude.cs.uiuc.edu



Marc Boyer
--
Marc Boyer, Ingenieur de recherche ONERA
Tel: (33) 5.62.25.26.36 DTIM
Fax: (33) 5.62.25.26.93 2, av Edouard Belin
http://www.onera.fr/staff/marc-boyer/ 31055 TOULOUSE Cedex 4




Archive powered by MHonArc 2.6.16.

Top of Page