I watched Mr. Wolfram and some researchers there look at ways to make combinators into graphs. Well, I was just messing around and I decided to make my own attempt at turning combinator expressions into graphs. This one mixes two things, first it turns the combinator expression into a tree, then it also connects any two sub expressions that are the same with an arrow, if they are next to each other. Here are some of my results.
In[]:=
findEdges[pos_Listexpr_,positionTaggeds_List]:=DirectedEdge[expr,Last[#]]&/@Cases[positionTaggeds,(Append[pos,0]_)|(Append[pos,1]_)]
In[]:=
joinSimilars[positionTaggeds_List]:=DirectedEdge@@@Catenate[Partition[#,2,1]&/@GatherBy[Last/@positionTaggeds,First]]
In[]:=
treeize[positionTaggeds_List]:=Catenate[DeleteCases[findEdges[#,positionTaggeds]&/@positionTaggeds,{}]]
In[]:=
positionTaggeds[expr_]:=#{Extract[expr,#],Unique[]}&/@Position[expr,_]
In[]:=
toConnectedTree[expr_]:=Union[Join[joinSimilars[#],treeize[#]]&[positionTaggeds[expr]]]
In[]:=
sKRule={k[x_][y_]x,s[x_][y_][z_]x[z][y[z]]};
In[]:=
symbolicSystem[rule_,init_,steps_Integer]:=FixedPointList[#/.rule&,init,steps]
ResourceFunction["SymbolicSystem"]
In[]:=
replaceWithList[expr_,pattern_,replaceWith_]:=ReplacePart[expr,Thread[Position[expr,pattern]replaceWith]]
In[]:=
randomTree[leafCount_]:=Nest[ReplacePart[#,RandomChoice[Position[#,x]]{x,x}]&,{x,x},leafCount-2]
In[]:=
treeToFunctions[tree_]:=ReplaceRepeated[tree,{x_,y_}x[y]]
In[]:=
randomCombinator[leafCount_]:=treeToFunctions[replaceWithList[randomTree[leafCount],x,RandomChoice[{s,k},leafCount]]]
In[]:=
SeedRandom[1]​​Graph[toConnectedTree[randomCombinator[10]],VertexLabels{v_First[v]}]
Out[]=
In[]:=
Graph[toConnectedTree[#],GraphLayout"SpringElectricalEmbedding"]&/@symbolicSystem[sKRule,s[s[s]][s][s][s][k],17]
Out[]=

,
,
,
,
,
,
,
,
,
,
,
,

In[]:=
SeedRandom[1]​​Table[Graph[toConnectedTree[randomCombinator[100]]],7]
Out[]=

,
,
,
,
,
,
