Some Example Programs in Axiomatic Language
(not executed -- not tested)
"phonecode"
-- from Lutz Prechelt, An Empirical Comparison of Seven Programming Languages,
Computer 33(10):23-29, October 2000.
Technical Report.
minimum, median lines of non-comment code (from TR Appendix):
tcl - 44, 101
rexx - 53, 122
python - 42, 82
perl - 49, 74
Java - 107, 244
C++ - 150, 243
C - 188, 244
Axiomatic language solution, not counting utility functions: 54
(We don't count utility code since that would be part of a standard library.)
minimum spanning forest
Some MST Kruskal & Prim algorithm samples and # lines of non-comment, non-i/o code:
PlanetSourceCode - Prim, php: 25 lines for mst function,
link
scvalex - Prim C: about 34 lines for algorithm,
link
HubPages - Kruskal, C: about 49 lines for algorithm,
link
The Learning Point - Kruskal, C: about 65 lines for algorithm,
link
(There is some subjectivity in these line counts.)
Axiomatic language solution: 15 lines (non-utility)
utility functions & predicates:
form.ax
- functions and predicates on the form of expressions
ho.ax
- higher-order definitions
noteq.ax
- functions and predicates based on expression inequality
natnum.ax
- natural number functions
char.ax
- character functions