Software complexity measures are quantitative estimates of the amount
of effort required by a programmer to comprehend a piece of code. Many
measures have been designed for standard procedural languages, but li
ttle work has been done to apply software complexity concepts to nontr
aditional programming paradigms. This paper presents a collection of s
oftware complexity measures that were specifically designed to quantif
y the conceptual complexity of rule-based programs. These measures are
divided into two classes: bulk measures, which estimate complexity by
examining aspects of program size, and rule measures, which gauge com
plexity based on the ways in which program rules interact with data an
d other rules. A pilot study was conducted to assess the effectiveness
of these measures. Several measures were found to correlate well with
the study participants' ratings of program difficulty and the time re
quired by them to answer questions that required comprehension of prog
ram elements. The physical order of program rules was also shown to af
fect comprehension. The authors conclude that the development of softw
are complexity measures for particular programming paradigms may lead
to better tools for managing program development and predicting mainte
nance effort in nontraditional programming environments.