2 ms·
Because programming language talk is more interesting if you see some code, here is the very first example program from the list of programs in the tutorial [1]
by unwind 4y ago
Because programming language talk is more interesting if you see some code, here is the very first example program from the list of programs in the tutorial [1]:
fmod A-GRAPH is
sorts Edge Node .
ops n1 n2 n3 n4 n5 : -> Node .
ops a b c d e f : -> Edge .
ops source target : Edge -> Node .
eq source(a) = n1 . eq target(a) = n2 .
eq source(b) = n1 . eq target(b) = n3 .
eq source(c) = n3 . eq target(c) = n4 .
eq source(d) = n4 . eq target(d) = n2 .
eq source(e) = n2 . eq target(e) = n5 .
eq source(f) = n2 . eq target(f) = n1 .
endfm
Edit: The title of the above code is "A concrete graph".
This is very much not my cup of tea, but it seems to have been around for a while so I guess it's filling its purpose. Would be cool to hear from HN users who drive this daily.
[1]: http://maude.cs.uiuc.edu/maude1/tutorial/CoreMaudeExamples/a-graph.maude http://maude.cs.uiuc.edu/maude1/tutorial/CoreMaudeExamples/a...