k-user AT lists.cs.illinois.edu
Subject: K-user mailing list
List archive
- From: Dorel Lucanu <dlucanu AT info.uaic.ro>
- To: soha hussein <husseinsoh AT gmail.com>
- Cc: "k-user AT cs.uiuc.edu" <k-user AT cs.uiuc.edu>
- Subject: Re: [K-user] Global Variable and Functions
- Date: Tue, 13 Jan 2015 13:41:12 +0200
- List-archive: <http://lists.cs.uiuc.edu/pipermail/k-user/>
- List-id: <k-user.cs.uiuc.edu>
On 13/01/15 13:22, soha hussein wrote:
Hi Dorel,
I am not sure I understand what you are proposing.
1. what does !A mean? and where is it defined? I actually
tried to compile your code and it didn't pass, the compiler did
not recognize ! symbol.
What version of K do you use?In the latest version of K (k-nightly) ! is used for fresh variables. In the previous versions of K, we used rule start => A:Counter requires fresh(A:Counter) But, in that case, the output is a bit different. 2. in syntax Counter ::= myCounter(Int) [freshGenerator,
function]
did you mean it as
syntax Counter ::= "myCounter" "("Int")" [freshGenerator,
function] ? if not then where is myCounter(Int) defined?
3. when you executed the module you didn't provide a program
on which the definition is going to run? In other words what
does CounterA(2) and Counter(1) results from?
You have to provide a program name for krun only if the
specification of the configuration include $PGM variable, in that
case the AST obtained by parsing the program replace the name of
this variable. In that case, "krun prog-name" is similar to "krun -c
PGM=prog-name".4. where is the place where the counter gets incremented?
Dorel Soha
On Jan 13, 2015, at 12:05 PM, Dorel Lucanu <dlucanu AT info.uaic.ro>
wrote:
|
- [K-user] Global Variable and Functions, soha hussein, 01/12/2015
- Re: [K-user] Global Variable and Functions, soha hussein, 01/12/2015
- Re: [K-user] Global Variable and Functions, soha hussein, 01/12/2015
- Re: [K-user] Global Variable and Functions, Dorel Lucanu, 01/13/2015
- Re: [K-user] Global Variable and Functions, soha hussein, 01/13/2015
- Re: [K-user] Global Variable and Functions, Dorel Lucanu, 01/13/2015
- Message not available
- Message not available
- Message not available
- Message not available
- Message not available
- Message not available
- Message not available
- Message not available
- Message not available
- Message not available
- Message not available
- Message not available
- Message not available
- Message not available
- Message not available
- Re: [K-user] Global Variable and Functions, Traian Florin Şerbănuţă, 01/21/2015
- Message not available
- Re: [K-user] Global Variable and Functions, Dorel Lucanu, 01/13/2015
- Re: [K-user] Global Variable and Functions, soha hussein, 01/13/2015
- Re: [K-user] Global Variable and Functions, Dorel Lucanu, 01/13/2015
- Re: [K-user] Global Variable and Functions, soha hussein, 01/12/2015
- Re: [K-user] Global Variable and Functions, soha hussein, 01/12/2015
Archive powered by MHonArc 2.6.16.