Go to the first, previous, next, last section, table of contents.
Author(s): Göran Smedbäck.
Version: 1.10#7 (2006/4/26, 19:22:13 CEST)
Version of last change: 1.9#173 (2003/12/4, 17:47:16 CET)
This module offers a dynamic tree structured dictionary a bit combined with predicates that gives it the useability to be the dictionary for the parser.
- Library usage:
:- use_module(library(dictionary_tree)).
- Exports:
- Predicates:
create_dictionaries/1
,
is_dictionaries/1
,
get_definition_dictionary/2
,
get_prototype_dictionary/2
,
dictionary_insert/5
,
dictionary_lookup/5
,
merge_tree/2
.
- Other modules used:
- System library modules:
aggregates
,
dynamic
,
iso_misc
,
iso_byte_char
,
iso_incomplete
,
operators
,
read
,
write
,
lists
,
provrml/internal_types
.
- PREDICATE: create_dictionaries/1:
-
Usage: create_dictionaries(-Dictionary)
- Description: Returns a dictionary. A general name was used if the user would like to change the code to include more dictionaries.
- Call and exit should be compatible with:
-Dictionary
is a dictionary.
(internal_types:dictionary/1
)
- PREDICATE: is_dictionaries/1:
-
Usage: is_dictionaries(?Dictionary)
- Description: Is the argument a dictionary is solved by this predicate.
- Call and exit should be compatible with:
?Dictionary
is a dictionary.
(internal_types:dictionary/1
)
- PREDICATE: get_definition_dictionary/2:
-
Usage: get_definition_dictionary(+Dictionary, -Tree)
- Description: Returns the definition dictionary (for the moment there is only one dictionary), which is a tree representation.
- Call and exit should be compatible with:
+Dictionary
is a dictionary.
(internal_types:dictionary/1
)
-Tree
is a tree structure.
(internal_types:tree/1
)
- PREDICATE: get_prototype_dictionary/2:
-
Usage: get_prototype_dictionary(+Dictionary, -Tree)
- Description: Returns the prototype dictionary (for the moment there is only one dictionary), which is a tree representation.
- Call and exit should be compatible with:
+Dictionary
is a dictionary.
(internal_types:dictionary/1
)
-Tree
is a tree structure.
(internal_types:tree/1
)
- PREDICATE: dictionary_insert/5:
-
Usage: dictionary_insert(+Key, +Type, +Field, +Dictionary, ?Info)
- Description: The predicate will search for the place for the Key and return Info, if the element inserted had a post before (same key value) multiple else new. The dictionary is dynamic and do not need output because of using unbinded variables.
- Call and exit should be compatible with:
+Key
is an atom.
(basic_props:atm/1
)
+Type
is an atom.
(basic_props:atm/1
)
+Field
is any term.
(basic_props:term/1
)
+Dictionary
is a tree structure.
(internal_types:tree/1
)
?Info
is an atom.
(basic_props:atm/1
)
- PREDICATE: dictionary_lookup/5:
-
Usage: dictionary_lookup(+Key, ?Type, ?Field, +Dictionary, -Info)
- Description: The predicate will search for the Key and return Info;defined or undefined accordingly. If defined the fields will be filled as well. The predicate do not insert the element.
- Call and exit should be compatible with:
+Key
is an atom.
(basic_props:atm/1
)
?Type
is an atom.
(basic_props:atm/1
)
?Field
is any term.
(basic_props:term/1
)
+Dictionary
is a dictionary.
(internal_types:dictionary/1
)
-Info
is an atom.
(basic_props:atm/1
)
- PREDICATE: merge_tree/2:
-
Usage: merge_tree(+Tree, +Tree)
- Description: The predicate can be used for adding a tree dictionary to another one (the second). It will remove equal posts but posts with a slight difference will be inserted. The resulting tree will be the second tree.
- Call and exit should be compatible with:
+Tree
is a tree structure.
(internal_types:tree/1
)
+Tree
is a tree structure.
(internal_types:tree/1
)
Go to the first, previous, next, last section, table of contents.