Skip to Content.
Sympa Menu

k-user - [[K-user] ] HOLE and ~> in new K

k-user AT lists.cs.illinois.edu

Subject: K-user mailing list

List archive

[[K-user] ] HOLE and ~> in new K


Chronological Thread 
  • From: Soha H <husseinsoh AT gmail.com>
  • To: k-user AT lists.cs.illinois.edu
  • Subject: [[K-user] ] HOLE and ~> in new K
  • Date: Thu, 18 May 2017 11:02:17 +0200

Hello,

It looks like HOLE is not recognizable by K anymore, are there any alternatives? Can someone give an example on how to write something like this in new K

E1:Exp + E2:Exp => E1 ~> HOLE + E2 (A)
V:Val ~> HOLE + E2 => V + E2

I found #freezer in kool_typed_dynamic, is it used for that purpose? Code is below

  rule (A:Exp(B:Exps))(C:Exps) => A(B) ~> #freezerFunCall(C) (B)
  rule (A:Exp[B:Exps])(C:Exps) => A[B] ~> #freezerFunCall(C)
  rule V:Val ~> #freezerFunCall(C:Exps) => V(C)
  syntax KItem ::= "#freezerFunCall" "(" K ")"
 

Rules like in (A) above are very flexible, because HOLE resides in the spot where where computation should resume, while in (B) I would need to defined multiple freezers for different contexts. 
Did I get it right? Is there anything I am missing? 

Much appreciated! 

Soha 







Archive powered by MHonArc 2.6.19.

Top of Page