Did you know ... Search Documentation:
Pack logtalk -- logtalk-3.99.0/library/application/NOTES.md

This file is part of Logtalk https://logtalk.org/ SPDX-FileCopyrightText: 1998-2026 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.

application

This library provides the application_common category and the application_protocol protocol for declaring application metadata, including optional git-related facts such as repository URL, branch, commit, author, and commit message, plus optional package and archive identifiers. Application metadata is typically consumed by tools such as sbom.

The library distinguishes two kinds of information:

  • release metadata, such as name, version, description, license, distribution location, package identifier, release date, and validity date
  • optional source provenance metadata, such as repository URL, branch, commit, commit date, author, commit message, and archive identifiers

    Source provenance predicates are explicit facts declared by the application. They are not a reflection of the current status of a local git checkout and should not be assumed to identify a released artifact unless the application author chooses to state them for that purpose.

API documentation

Open the [../../apis/library_index.html#application](../../apis/library_index.html#application) link in a web browser.

Loading

To load all entities in this library, load the loader.lgt file:

| ?- logtalk_load(application(loader)).

Testing

To test this library predicates, load the tester.lgt file:

| ?- logtalk_load(application(tester)).

Usage

Define an application metadata object importing the application_common category and declaring the metadata that is known explicitly. For example:

:- object(my_application,
        imports(application_common)).

        name(my_application).
        version('1.2.3').
        description('Example application metadata object').
        license('Apache-2.0').
        homepage('https://example.com/my_application').
        distribution('https://example.com/my_application/releases/download/v1.2.3/my_application.tgz').
        package('pkg:generic/my_application@1.2.3').
        creators(['Tool: Build pipeline', 'Person: Alice']).
        supplier('Organization: Example Application').
        originator('Organization: Upstream Project').
        repository('https://example.com/my_application.git').
        repository_branch(main).
        repository_commit('0123456789abcdef0123456789abcdef01234567').
        git_object_identifier('gitoid:commit:sha1:0123456789abcdef0123456789abcdef01234567').
        software_heritage_identifier('swh:1:rev:0123456789abcdef0123456789abcdef01234567').
        repository_commit_author('Alice').

:- end_object.

The library distinguishes between creators and originator using two predicates: