Skip to Content.
Sympa Menu

k-user - Re: [[K-user] ] Semantics with time

k-user AT lists.cs.illinois.edu

Subject: K-user mailing list

List archive

Re: [[K-user] ] Semantics with time


Chronological Thread 
  • From: Dorel Lucanu <dorel.lucanu AT gmail.com>
  • To: Mihály Palenik <palenik.mihaly AT gmail.com>
  • Cc: k-user AT lists.cs.illinois.edu
  • Subject: Re: [[K-user] ] Semantics with time
  • Date: Thu, 4 Jan 2018 09:03:40 +0100
  • Authentication-results: illinois.edu; spf=pass smtp.mailfrom=dorel.lucanu AT gmail.com

The handling of time is a language design issue, so you should decide how the time is managed in your language semantics.
A possible way is to use a cell <time> including an integer variable that manages the time (in milliseconds); the semantics of each statement should update this value of this variable with elapsed time by the execution of the statement . 
How this cell is connected to a real clock when an interpreter is built is a component of the builtin model over which the semantics is developed (similar to input/output). 
To my knowledge, K does not include yet a default implementation of such a mechanism.

Best regards,
Dorel

On Thu, Jan 4, 2018 at 8:01 AM, Mihály Palenik <palenik.mihaly AT gmail.com> wrote:
Hello!

I have a statement which contains this syntax:
Millisecond "->" Exp
This means after Millisecond Exp should be evaulated.
Can you give me a hint how can I start to define a semantics for this? Is it possible to do like this with K?

Thank you in advance!

Best regards
Mihály Palenik




Archive powered by MHonArc 2.6.19.

Top of Page