with Base_Ten;
package body Halstead_Program_Volume is

    type Accuracy is digits 6;

    -- make Argument of type FLOAT for now
    package Log_Base_Ten is new Base_Ten (Argument => Accuracy,
                                          Return_Value => Result);

    function Log (Of_Value : in Accuracy) return Result
        renames Log_Base_Ten.Log;

    procedure Of_Any_Program_Unit (Lc_N : in Vocabulary_Size;
                                   Uc_N : in Program_Length;
                                   V : out Result) is

    begin
        -- Of_Any_Program_Unit

        V := Result (Uc_N) * (Log (Accuracy (Lc_N)) / Log (Accuracy (2.0)));

    exception
        -- to be changed after the demo
        when others =>
            V := 0.0;

    end Of_Any_Program_Unit;

end Halstead_Program_Volume;