HiLog: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
BG19bot (talk | contribs)
m WP:CHECKWIKI error fix for #61. Punctuation goes before References. Do general fixes if a problem exists. - using AWB (9916)
OAbot (talk | contribs)
m Open access bot: doi updated in citation with #oabot.
 
(15 intermediate revisions by 13 users not shown)
Line 1: Line 1:
'''HiLog''' is a programming [[logic]] with higher-order syntax, which allows arbitrary terms to appear in predicate and function positions. However, the [[model theory]] of HiLog is first-order. Although syntactically HiLog strictly extends [[first order logic]], HiLog can be embedded into this logic.
'''HiLog''' is a programming [[logic]] with higher-order syntax, which allows arbitrary terms to appear in predicate and function positions.<ref name="hilog-jlp">{{cite journal |last1=Chen |first1=Weidong |last2=Kifer |first2=Michael |last3=Warren |first3=David S. |date=February 1993 |title=HiLog: A foundation for higher-order logic programming |journal=[[Journal of Logic Programming]] |volume=15 |issue=3 |pages=187–230 |doi=10.1016/0743-1066(93)90039-J|doi-access=free }}</ref> However, the [[model theory]] of HiLog is first-order. Although syntactically HiLog strictly extends [[first order logic]], HiLog can be embedded into this logic.


HiLog was first described in 1989.<ref>{{cite conference |last1=Chen |first1=Weidong |last2=Kifer |first2=Michael |last3=Warren |first3=David S. |date=1989 |title=HiLog: a first order semantics for higher-order logic programming constructs |book-title=Logic programming: Proceedings of the North American conference, 1989 |publisher=MIT Press |isbn=0262620642 |oclc=1153667751}}</ref> It was later extended in the direction of [[many-sorted logic]].<ref>{{cite book |last1=Chen |first1=Weidong |last2=Kifer |first2=Michael |date=1995 |chapter=Sorted HiLog: sorts in higher-order logic data languages |editor1-last=Gottlob |editor1-first=Georg |editor2-last=Vardi |editor2-first=Moshe Y. |title=Database theory—ICDT '95: 5th International Conference, Prague, Czech Republic, January 11–13, 1995: proceedings |series=Lecture notes in computer science |volume=893 |publisher=Springer |pages=252–265 |isbn=9780387589077 |oclc=31740400 |doi=10.1007/3-540-58907-4_20}}</ref>
HiLog is described in detail in
<ref name="hilog-jlp">
W. Chen, M. Kifer and D.S. Warren (1993), [http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.52.7860 ''HiLog: A Foundation for Higher-Order Logic Programming'']. Journal of Logic Programming, 1993.
</ref>
.<ref>
W. Chen, M. Kifer and D.S. Warren (1989), [http://citeseerx.ist.psu.edu/showciting?cid=2016805 ''HiLog: A first order semantics for higher-order logic programming constructs'']. Proc. North American Logic Programming Conference, 1989.
</ref>
It was later extended in the direction of [[many-sorted logic]] in.<ref>
W. Chen and M. Kifer (1994), [http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.56.4332 ''Sorted HiLog: Sorts in Higher-Order Logic Data Languages'']. Int’l Conference on Database Theory, Springer Lecture Notes in Computer Science #893.
</ref>
Other contributions to the theory of HiLog include
<ref>
K.A. Ross (1994), [http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.55.2148 ''On Negation in HiLog'']. Journal of Logic Programming, 1994.
</ref>
.<ref>
J. de Bruijn and S. Heymans (2008), [http://www.kr.tuwien.ac.at/staff/bruijn/priv/publications/frames-predicates-fi.pdf ''On the Relationship between Description Logic-based and F-Logic-based Ontologies'']. Fundamenta Informaticae 82:3, 2008, pp. 213-236.
</ref>


The [[XSB|XSB System]] parses HiLog syntax, but the integration of HiLog into XSB is only partial. In particular, HiLog is not integrated with the XSB module system. A full implementation of HiLog is available in the [[Flora-2|Flora-2 system]].
The [[XSB]] system parses HiLog syntax, but the integration of HiLog into XSB is only partial. In particular, HiLog is not integrated with the XSB module system. A full implementation of HiLog is available in the [[Flora-2]] system.


In,<ref name="hilog-jlp"/> it has been shown that HiLog can be embedded into [[first-order logic]] through a fairly simple transformation. For instance, <tt>p(X)(Y,Z(V)(W))</tt> gets embedded as the following first-order term:
It has been shown that HiLog can be embedded into [[first-order logic]] through a fairly simple transformation.<ref name="hilog-jlp"/> For instance, <code>p(X)(Y,Z(V)(W))</code> gets embedded as the following first-order term: <code>apply(p(X),Y,apply(apply(Z,V),W))</code>.<ref name="hilog-jlp"/>


The [[Rule Interchange Format#FLD|Framework for Logic-Based Dialects]] (RIF-FLD) of the [[Rule Interchange Format]] (RIF) is largely based on the ideas underlying HiLog and [[F-logic]].<ref>{{cite book |last=Kifer |first=Michael |date=2008 |chapter=Rule interchange format: the framework |editor1-last=Calvanese |editor1-first=Diego |editor2-last=Lausen |editor2-first=Georg |title=Web reasoning and rule systems: second international conference, RR 2008, Karlsruhe, Germany, October 31–November 1, 2008: proceedings |series=Lecture notes in computer science |volume=5341 |publisher=Springer |pages=1–11 |isbn=9783540887362 |oclc=262884460 |doi=10.1007/978-3-540-88737-9_1 }}</ref>
apply(p(X),Y,apply(apply(Z,V),W))

Details can be found in.<ref name="hilog-jlp"/>

The [[Rule Interchange Format#FLD|Framework for Logic-Based Dialects]] (RIF-FLD) of the [[Rule Interchange Format]] (RIF) is largely based on the ideas underlying HiLog and [[F-logic]].


== Examples ==
== Examples ==


In all the examples, below, capitalized symbols denote variables and the comma denotes [[logical conjunction]], as in most [[logic programming]] languages. The first and the second examples show that variables can appear in predicate positions. Predicates can even be complex terms, such as <tt>closure(P)</tt> or <tt>maplist(F)</tt> below. The third example shows that variables can also appear in place of atomic formulas, while the fourth example illustrates the use of variables in place of function symbols. The first example defines a generic transitive closure operator, which can be applied to an arbitrary binary predicate. The second example is similar. It defines a [[LISP]]-like mapping operator, which applies to an arbitrary binary predicate. The third example shows that the [[Prolog]] meta-predicate <tt>call/1</tt> can be expressed in HiLog in a natural way and without the use of extra-logical features. The last example defines a predicate that traverses arbitrary binary trees represented as [[Term (logic)|first-order term]]s.
In all the examples below, capitalized symbols denote variables and the comma denotes [[logical conjunction]], as in most [[logic programming]] languages. The first and the second examples show that variables can appear in predicate positions. Predicates can even be complex terms, such as <code>closure(P)</code> or <code>maplist(F)</code> below. The third example shows that variables can also appear in place of atomic formulas, while the fourth example illustrates the use of variables in place of function symbols. The first example defines a generic [[transitive closure]] operator, which can be applied to an arbitrary binary predicate. The second example is similar. It defines a [[LISP]]-like mapping operator, which applies to an arbitrary binary predicate. The third example shows that the [[Prolog]] meta-predicate <code>call/1</code> can be expressed in HiLog in a natural way and without the use of extra-logical features. The last example defines a predicate that traverses arbitrary binary trees represented as [[Term (logic)|first-order term]]s.
<source lang="prolog">
<syntaxhighlight lang="prolog">
closure(P)(X,Y) <- P(X,Y).
closure(P)(X,Y) <- P(X,Y).
closure(P)(X,Y) <- P(X,Z), closure(P)(Z,Y).
closure(P)(X,Y) <- P(X,Z), closure(P)(Z,Y).


maplist(F)([],[]).
maplist(F)([],[]).
maplist(F)([X|R],[Y|Z]) <- F(X,Y), maplist(F)(R,Z).
maplist(F)([X|R],[Y|Z]) <- F(X,Y), maplist(F)(R,Z).


call(X) <- X.
call(X) <- X.


traverse(X(L,R)) <- traverse(L), traverse(R).
traverse(X(L,R)) <- traverse(L), traverse(R).
</syntaxhighlight>
</source>


==References==
==References==
{{reflist}}
{{reflist}}

==Further reading==
* {{cite journal |last=Ross |first=Kenneth A. |date=January 1994 |title=On negation in HiLog |journal=[[Journal of Logic Programming]] |volume=18 |issue=1 |pages=27–53 |doi=10.1016/0743-1066(94)90040-X |doi-access= }}
* {{cite journal |last1=Bruijn |first1=Jos |last2=Heymans |first2=Stijn |date=January 2008 |title=On the relationship between description logic-based and F-logic-based ontologies |journal=[[Fundamenta Informaticae]] |volume=82 |issue=3 |pages=213–236 |url=https://content.iospress.com/articles/fundamenta-informaticae/fi82-3-02 }}


[[Category:Logic programming languages]]
[[Category:Logic programming languages]]

Latest revision as of 08:43, 18 August 2023

HiLog is a programming logic with higher-order syntax, which allows arbitrary terms to appear in predicate and function positions.[1] However, the model theory of HiLog is first-order. Although syntactically HiLog strictly extends first order logic, HiLog can be embedded into this logic.

HiLog was first described in 1989.[2] It was later extended in the direction of many-sorted logic.[3]

The XSB system parses HiLog syntax, but the integration of HiLog into XSB is only partial. In particular, HiLog is not integrated with the XSB module system. A full implementation of HiLog is available in the Flora-2 system.

It has been shown that HiLog can be embedded into first-order logic through a fairly simple transformation.[1] For instance, p(X)(Y,Z(V)(W)) gets embedded as the following first-order term: apply(p(X),Y,apply(apply(Z,V),W)).[1]

The Framework for Logic-Based Dialects (RIF-FLD) of the Rule Interchange Format (RIF) is largely based on the ideas underlying HiLog and F-logic.[4]

Examples[edit]

In all the examples below, capitalized symbols denote variables and the comma denotes logical conjunction, as in most logic programming languages. The first and the second examples show that variables can appear in predicate positions. Predicates can even be complex terms, such as closure(P) or maplist(F) below. The third example shows that variables can also appear in place of atomic formulas, while the fourth example illustrates the use of variables in place of function symbols. The first example defines a generic transitive closure operator, which can be applied to an arbitrary binary predicate. The second example is similar. It defines a LISP-like mapping operator, which applies to an arbitrary binary predicate. The third example shows that the Prolog meta-predicate call/1 can be expressed in HiLog in a natural way and without the use of extra-logical features. The last example defines a predicate that traverses arbitrary binary trees represented as first-order terms.

closure(P)(X,Y) <- P(X,Y).
closure(P)(X,Y) <- P(X,Z), closure(P)(Z,Y).

maplist(F)([],[]).
maplist(F)([X|R],[Y|Z]) <- F(X,Y), maplist(F)(R,Z).

call(X) <- X.

traverse(X(L,R)) <- traverse(L), traverse(R).

References[edit]

  1. ^ a b c Chen, Weidong; Kifer, Michael; Warren, David S. (February 1993). "HiLog: A foundation for higher-order logic programming". Journal of Logic Programming. 15 (3): 187–230. doi:10.1016/0743-1066(93)90039-J.
  2. ^ Chen, Weidong; Kifer, Michael; Warren, David S. (1989). "HiLog: a first order semantics for higher-order logic programming constructs". Logic programming: Proceedings of the North American conference, 1989. MIT Press. ISBN 0262620642. OCLC 1153667751.
  3. ^ Chen, Weidong; Kifer, Michael (1995). "Sorted HiLog: sorts in higher-order logic data languages". In Gottlob, Georg; Vardi, Moshe Y. (eds.). Database theory—ICDT '95: 5th International Conference, Prague, Czech Republic, January 11–13, 1995: proceedings. Lecture notes in computer science. Vol. 893. Springer. pp. 252–265. doi:10.1007/3-540-58907-4_20. ISBN 9780387589077. OCLC 31740400.
  4. ^ Kifer, Michael (2008). "Rule interchange format: the framework". In Calvanese, Diego; Lausen, Georg (eds.). Web reasoning and rule systems: second international conference, RR 2008, Karlsruhe, Germany, October 31–November 1, 2008: proceedings. Lecture notes in computer science. Vol. 5341. Springer. pp. 1–11. doi:10.1007/978-3-540-88737-9_1. ISBN 9783540887362. OCLC 262884460.

Further reading[edit]