syntax.pl -- kLog syntax

This module provides syntactic extensions to Prolog for declaring signatures. Most of the functionalities in this module are implemented via term_expansion/2.

History
see git log
author
- Paolo Frasconi
To be done
- Safety checks, assumption checks, performance tuning
domain_traits(?TraitsSpec, ?TraitsVal) is det
Query domain traits. TraitsSpec is one of:
domain_traits is det
List on the standard output all the domain traits and signature traits for all signatures.
domain_traits(+Stream) is det
List on output Stream all the domain traits and signature traits for all signatures.
signature_traits(?Name, ?TraitsSpec, ?TraitsVal) is det
Query signature traits. Name is the signature name. TraitsSpec is one of:
id_position(+S, -Position) is semidet
If S is the name of a valid entity signature, unify Position with the position of the identifier in the argument list. Otherwise fail.
extract_properties(+Functor, +Args, -Properties) is semidet
If Functor is the name of a valid signature whose arity matches the length of the list Args, then unify Properties with the list of items in Args that appear at positions of property type. Otherwise fail.
extract_identifiers(+Functor, +Args, -IDs) is semidet
If Functor is the name of a valid signature whose arity matches the length of the list Args, then unify IDs with the list of items in Args that appear at positions of identifier type. Otherwise fail.
extract_references(+S, -Refs) is semidet
If s is the name of a valid signature, then unify Refs with the subsequence of entity types referenced by S but >self< is replaced by S. If a type is referred to multiple times, it appears multiple time in Refs.
is_kernel_point(+Functor, -YesNo) is semidet
If Functor is the name of a valid signature then unify YesNo with 'yes' iff the signature has declared a neighborhood method. All graph vertices expanded from this signature will be used as center points for the kernel calculation.