Skip to Content.
Sympa Menu

k-user - Re: [[K-user] ] How to model combinator calculi?

k-user AT lists.cs.illinois.edu

Subject: K-user mailing list

List archive

Re: [[K-user] ] How to model combinator calculi?


Chronological Thread 
  • From: Mike Stay <stay AT pyrofex.net>
  • To: Everett Hildenbrandt <hildenb2 AT illinois.edu>
  • Cc: k-user AT lists.cs.illinois.edu
  • Subject: Re: [[K-user] ] How to model combinator calculi?
  • Date: Fri, 21 Jul 2017 23:02:59 -0600
  • Authentication-results: illinois.edu; spf=pass smtp.mailfrom=stay AT pyrofex.net

It looks like I need an [anywhere] annotation on the SKI rules. I
also found that <k> tags can have multiplicity *, so here's a working
version of what I intended.

module SKIC-SYNTAX
syntax Par ::= "|"
syntax SComb ::= "s"
syntax KComb ::= "k"
syntax IComb ::= "i"
syntax Comb ::= Par | SComb | KComb | IComb
syntax Apply ::= "(" Term Term ")"
syntax Term ::= Id | Comb | Apply
endmodule

module SKIC
imports SKIC-SYNTAX

configuration
<T>
<k multiplicity="*"> $PGM:Term </k>
</T>

rule (i X:Term) => X [anywhere]
rule ((k X:Term) Y:Term) => X [anywhere]
rule (((s X:Term) Y:Term) Z:Term) => ((X Z) (Y Z)) [anywhere]

rule <k> ((| T:Term) U:Term) </k> => <k> T </k> <k> U </k>

endmodule
--
Mike Stay
CTO, Pyrofex Corp.



Archive powered by MHonArc 2.6.19.

Top of Page