k-user AT lists.cs.illinois.edu
Subject: K-user mailing list
List archive
- 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:
Mihály PalenikBest regards,Thank you your help in advanceNow 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.I try to copy freshId and freshInt functions:Hello,I try to create own generator for Pid sort which is:
syntax Pid ::= "<" Int "." Int "." Int ">" [token, autoReject]
syntax Pid ::= freshPid(Int) [freshGenerator, function]
rule freshPid(I:Int) => <I.1.1>
- [[K-user] ] freshGenerator, Mihály Palenik, 03/20/2017
- Re: [[K-user] ] freshGenerator, Park, Daejun, 03/20/2017
Archive powered by MHonArc 2.6.19.