k-user AT lists.cs.illinois.edu
Subject: K-user mailing list
List archive
- 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.
- [[K-user] ] How to model combinator calculi?, Mike Stay, 07/21/2017
- Re: [[K-user] ] How to model combinator calculi?, Everett Hildenbrandt, 07/21/2017
- Re: [[K-user] ] How to model combinator calculi?, Mike Stay, 07/21/2017
- Re: [[K-user] ] How to model combinator calculi?, Mike Stay, 07/21/2017
- Re: [[K-user] ] How to model combinator calculi?, Mike Stay, 07/22/2017
- Re: [[K-user] ] How to model combinator calculi?, Christos Kloukinas, 07/22/2017
- Re: [[K-user] ] How to model combinator calculi?, Mike Stay, 07/22/2017
- RE: [[K-user] ] How to model combinator calculi?, Rosu, Grigore, 07/21/2017
- Re: [[K-user] ] How to model combinator calculi?, Mike Stay, 07/21/2017
- Re: [[K-user] ] How to model combinator calculi?, Everett Hildenbrandt, 07/21/2017
Archive powered by MHonArc 2.6.19.