Skip to Content.
Sympa Menu

k-user - Re: [K-user] help running example

k-user AT lists.cs.illinois.edu

Subject: K-user mailing list

List archive

Re: [K-user] help running example


Chronological Thread 
  • From: Chucky Ellison <celliso2 AT illinois.edu>
  • To: Stephen Chang <stchang AT ccs.neu.edu>
  • Cc: "k-user AT cs.uiuc.edu" <k-user AT cs.uiuc.edu>
  • Subject: Re: [K-user] help running example
  • Date: Tue, 15 Nov 2011 13:10:59 -0600
  • List-archive: <http://lists.cs.uiuc.edu/pipermail/k-user>
  • List-id: <k-user.cs.uiuc.edu>

David, you can't run that command directly since it requires #TCPPORT
to be set by the maude runner.

Stephen, can you try running:
$ echo "5" | krun --search programs/diverse/factorial.simple
and paste the output, and then
$ maude simple-untyped-compiled.maude .k/krun_tmp/maude_in
and paste the output?

Sorry for all the trouble,
-Chucky

On Tue, Nov 15, 2011 at 1:04 PM, Stephen Chang
<stchang AT ccs.neu.edu>
wrote:
>> Could you please also send us the output of the following command:
>>
>> maude simple-untyped-compiled.maude .k/krun_tmp/maude_in
>
> stchang@caprica:~/k-framework/examples/languages/research/simple/untyped$
> maude simple-untyped-compiled.maude .k/krun_tmp/maude_in
>                     \||||||||||||||||||/
>                   --- Welcome to Maude ---
>                     /||||||||||||||||||\
>            Maude 2.6 built: Dec  9 2010 18:28:39
>            Copyright 1997-2010 SRI International
>                   Tue Nov 15 14:03:37 2011
> Advisory: socket manager declined malformed message #createClientTcpSocket(
>    #socketManager, cnum(0), "localhost", #TCPPORT).
> Advisory: socket manager declined malformed message #createClientTcpSocket(
>    #socketManager, cnum(1), "localhost", #TCPPORT).
> Advisory: socket manager declined malformed message #createClientTcpSocket(
>    #socketManager, cnum(0), "localhost", #TCPPORT).
> Advisory: socket manager declined malformed message #createClientTcpSocket(
>    #socketManager, cnum(1), "localhost", #TCPPORT).
> Advisory: socket manager declined malformed message #createClientTcpSocket(
>    #socketManager, cnum(0), "localhost", #TCPPORT).
> rewrites: 158 in 0ms cpu (1ms real) (~ rewrites/second)
> result BagItem:
> < T >
>  < nextLoc > # 2(.List{K}) </ nextLoc >
>  < in > #parse("#Int",.) ListItem('#charString`(_`)('#string2Int`(_`)(#
>    #checkResult(#containedRequest(<> #Socket #toSend("1#readbyte#0#\r\n")
>    #Socket < cnum(1) : Client | state: connecting > #Socket
>    #createClientTcpSocket(#socketManager, cnum(1), "localhost", #TCPPORT)))(
>    .List{K})))) #buffer(.) #istream(0) </ in >
>  < out > #ostream(1) ListItem('String2DotK`(_`)(# #checkResult(
>    #containedRequest(<> #Socket #toSend("0#writebyte#1#73#\r\n") #Socket <
>    cnum(0) : Client | state: connecting > #Socket #createClientTcpSocket(
>    #socketManager, cnum(0), "localhost", #TCPPORT)))(.List{K})))
>    #removeCharUponAck #buffer(# "Input a natural numer: "(.List{K})) </ out
> >
>  < threads >
>  < thread >
>   < k > 'read`(`)(.List{K}) ~> freezer('_`,_(var{K}("`[HOLE`]"),,var{K}(
>    "K2")))(var{K}("K2")<-('.List`{","`}(.List{K}))) ~>
> freezer('_`(_`)(var{K}(
>    "K1"),,var{K}("`[HOLE`]")))(var{K}("K1")<-(# #id "factorial"(.List{K})))
> ~>
>    freezer('_`,_(var{K}("`[HOLE`]"),,var{K}("K2")))(var{K}("K2")<-('_`,_(#
>    "\n"(.List{K}),,'.List`{","`}(.List{K})))) ~>
> freezer('print`(_`);(var{K}(
>    "`[HOLE`]")))(.List{K}) ~> 'env`(_`)(wmap (# #id "factorial"(.List{K})
> |->
>    # 0(.List{K}) # #id "main"(.List{K}) |-> # 1(.List{K}))(.List{K})) ~>
>    'return_;('nothing(.List{K})) </ k >
>   < control >
>    < fstack > (# #id "factorial"(.List{K}) |-> # 0(.List{K}) # #id "main"(
>    .List{K}) |-> # 1(.List{K})),freezer('_;(var{K}("`[HOLE`]")))(.List{K}),
>     < xstack > (.).List </ xstack > </ fstack >
>    < xstack > (.).List </ xstack > </ control >
>   < env > # #id "factorial"(.List{K}) |-> # 0(.List{K}) # #id
> "main"(.List{K})
>    |-> # 1(.List{K}) </ env >
>   < holds > (.).Map </ holds > </ thread > </ threads >
>  < busy > (.).Set </ busy >
>  < genv > # #id "factorial"(.List{K}) |-> # 0(.List{K}) # #id
> "main"(.List{K})
>    |-> # 1(.List{K}) </ genv >
>  < store > # 0(.List{K}) |-> 'lambda`(_`,_`)('_`,_(# #id "y"(.List{K}),,
>    '.List`{","`}(.List{K})),,'`{_`}('var_;('_`,_(# #id "t"(.List{K}),,
>    '.List`{","`}(.List{K}))) ~> '_;('_=_(# #id "t"(.List{K}),,#
> 1(.List{K})))
>    ~> 'print`(_`);('_`,_(# "Factorial of "(.List{K}),,'_`,_(# #id "y"(.List{
>    K}),,'_`,_(# " is: "(.List{K}),,'.List`{","`}(.List{K}))))) ~> '`{_`}(
>    'var_;('_`,_(# #id "i"(.List{K}),,'.List`{","`}(.List{K}))) ~> '_;('_=_(#
>    #id "i"(.List{K}),,# 1(.List{K}))) ~> 'while_do_('_<=_(# #id
> "i"(.List{K}),
>    ,# #id "y"(.List{K})),,'`{_`}('_;('_=_(# #id "t"(.List{K}),,'_*_(# #id
> "t"(
>    .List{K}),,# #id "i"(.List{K})))) ~> '_;('_=_(# #id "i"(.List{K}),,'_+_(#
>    #id "i"(.List{K}),,# 1(.List{K}))))))) ~> 'return_;(# #id
> "t"(.List{K}))))
>    # 1(.List{K}) |-> 'lambda`(_`,_`)('.List`{","`}(.List{K}),,'`{_`}(
>    'print`(_`);('_`,_(# "Input a natural numer: "(.List{K}),,'.List`{","`}(
>    .List{K}))) ~> 'print`(_`);('_`,_('_`(_`)(# #id "factorial"(.List{K}),,
>    '_`,_('read`(`)(.List{K}),,'.List`{","`}(.List{K}))),,'_`,_(# "\n"(.List{
>    K}),,'.List`{","`}(.List{K})))))) </ store > </ T >
> Bye.
> _______________________________________________
> k-user mailing list
> k-user AT cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/k-user
>





Archive powered by MHonArc 2.6.16.

Top of Page