Skip to Content.
Sympa Menu

k-user - Re: [[K-user] ] freshGenerator

k-user AT lists.cs.illinois.edu

Subject: K-user mailing list

List archive

Re: [[K-user] ] freshGenerator


Chronological Thread 
  • From: "Park, Daejun" <dpark69 AT illinois.edu>
  • To: Mihály Palenik <palenik.mihaly AT gmail.com>
  • Cc: "k-user AT lists.cs.illinois.edu" <k-user AT lists.cs.illinois.edu>
  • Subject: Re: [[K-user] ] freshGenerator
  • Date: Tue, 21 Mar 2017 03:30:05 +0000
  • Accept-language: en-US

The fresh number generation works for the integer variables, for example, `!N:Int`. In your case, you can try:
```
rule freshPid => < !N . 1 . 1 >
```

Best,
Daejun

On Mar 20, 2017, at 7:09 PM, Mihály Palenik <palenik.mihaly AT gmail.com> wrote:

Hello,

I try to create own generator for Pid sort which is:
syntax Pid  ::= "<" Int "." Int "." Int ">"             [token, autoReject]

I try to copy freshId and freshInt functions:
syntax Pid ::= freshPid(Int)    [freshGenerator, function]
rule freshPid(I:Int) => <I.1.1>

Now the function doesn't have more sense but I have one problem. Everywhere where I use !P:Pid the result is <I.1.1>. Why? It is an Int so I think the first number of Pid has to be random.

Thank you your help in advance

Best regards,
Mihály Palenik




Archive powered by MHonArc 2.6.19.

Top of Page