Skip to Content.
Sympa Menu

k-user - Re: [K-user] new user: assignment by reference (as in PHP) and available operations on "Maps"

k-user AT lists.cs.illinois.edu

Subject: K-user mailing list

List archive

Re: [K-user] new user: assignment by reference (as in PHP) and available operations on "Maps"


Chronological Thread 
  • From: Stefan Ciobaca <stefan.ciobaca AT gmail.com>
  • To: Daniele Filaretti <dfilaretti AT gmail.com>
  • Cc: k-user AT cs.uiuc.edu
  • Subject: Re: [K-user] new user: assignment by reference (as in PHP) and available operations on "Maps"
  • Date: Mon, 23 Jul 2012 15:54:47 +0300
  • List-archive: <http://lists.cs.uiuc.edu/pipermail/k-user>
  • List-id: <k-user.cs.uiuc.edu>

Hello Daniele,

Welcome to K. I'll try to answer your question directly:

>> rule [ass_ref_1]:
>> <k> X := & Y:Id => . ... </k>
>> <env> ... Y |-> N => X |-> N ... </env>

Did you try to do the following?

>> rule [ass_ref_1]:
>> <k> X := & Y:Id => . ... </k>
>> <env> ... Y |-> N => (Y |-> N X |-> N) ... </env>

This replaces Y |- N by both X |- N and Y |- N, so it keeps Y bound. I
hope it solves your problem. Let us know if it works for you.

Cheers,
Stefan




Archive powered by MHonArc 2.6.16.

Top of Page