N
N
nadom2014-11-27 18:09:26
Algorithms
nadom, 2014-11-27 18:09:26

What is *theoretical number of unique operators* ?

Good time of the day.
I am writing a program that is a combination of several quantitative metrics, incl. Halsted metrics.
The metric itself prepologaet counting the number of operators and operands in the program code. But there are also parameters:
- *theoretical number of unique operators*
- * -"- operands *
Can anyone guess what this is?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Anatoly Scherbakov, 2014-11-27
@Altaisoft

Well, let's say the program:
It has one binary operator `+` and two operands - 2 and 3. In the program
- One unary operator -
- One binary +
- Two binary **
Respectively operands:
- a, 2; b, 2
- (a**2 + b**2)
I'm not sure, but it seems to me that the latter should also be considered as a separate operand. Not?

Y
Yury Samuylov, 2014-12-04
@NetMozg

And where did these "theoretical" parameters come from? As far as I remember, Halsted himself used only "number of operators" and "number of operands" to calculate the complexity of the program code

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question