Files
klammertext/tst/coverage/cycle.k
T

22 lines
908 B
Plaintext
Raw Normal View History

@@@target ta | Target A @@@
@@@target tb | Target B @@@
# Mutual reference between two general klammers. A recursive analysis would
# not terminate; the greatest fixpoint does.
#
# These take a parameter deliberately. A general klammer with NO parameters
# is a CONSTANT, and a constant's body is spliced into later definitions at
# definition time -- so a parameterless pair never reaches the fixpoint as a
# cycle: the expansion has already turned the second body into a
# self-reference. Parameters keep the calls in the stored body.
@@ping s : @pong *s* @ @@
@@pong s : @ping *s* @ @@
# A cycle that reaches a constrained klammer keeps the constraint.
@@only_ta.ta s : A*s* @@
@@loop_a s : @loop_b *s* @ @only_ta *s* @ @@
@@loop_b s : @loop_a *s* @ @@
# Disjoint coverage: nothing is in both, so this can never be applied.
@@only_tb.tb s : B*s* @@
@@impossible s : @only_ta *s* @ @only_tb *s* @ @@