Did you know ... Search Documentation:
Pack logtalk -- logtalk-3.77.0/tools/code_metrics/SCRIPT.txt

This file is part of Logtalk https://logtalk.org/ Copyright 2017 Ebrahim Azarisooreh <ebrahim.azarisooreh@gmail.com> and Paulo Moura <pmoura@logtalk.org> SPDX-License-Identifier: Apache-2.0

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

% load the tool:

| ?- logtalk_load(code_metrics(loader)). ...

% run the code_metrics tool unit tests:

| ?- logtalk_load(code_metrics(tester)). ...

% apply all loaded metrics the tool to itself:

| ?- code_metrics::library(code_metrics). ...

% load the standard library and obtain coupling metric stats for all its entities:

| ?- logtalk_load(library(all_loader)). ...

| ?- coupling_metric::library(library). ...

% apply the documentation metric to a specific entity:

| ?- doc_metric::entity(logtalk). ...

% enumerate, by backtracking, the scores for number of clauses, depth % of inheritance tree, and coupling, for the built-in logtalk object:

| ?- noc_metric::entity_score(logtalk, Score). ...

| ?- dit_metric::entity_score(logtalk, Score). ...

| ?- coupling_metric::entity_score(logtalk, Score). ...