请输入您要查询的百科知识:

 

词条 Many-sorted logic
释义

  1. Example

  2. Algebraization

  3. Order-sorted logic

  4. See also

  5. References

  6. External links

{{technical|date=July 2013}}

Many-sorted logic can reflect formally our intention not to handle the universe as a homogeneous collection of objects, but to partition it in a way that is similar to types in typeful programming. Both functional and assertive "parts of speech" in the language of the logic reflect this typeful partitioning of the universe, even on the syntax level: substitution and argument passing can be done only accordingly, respecting the "sorts".

There are more ways to formalize the intention mentioned above; a many-sorted logic is any package of information which fulfills it. In most cases, the following are given:

  • a set of sorts, S
  • an appropriate generalization of the notion of signature to be able to handle the additional information that comes with the sorts.

The domain of discourse of any structure of that signature is then fragmented into disjoint subsets, one for every sort.

Example

When reasoning about biological organisms, it is useful to distinguish two sorts: and . While a function makes sense, a similar function usually does not. Many-sorted logic allows one to have terms like , but to discard terms like as syntactically ill-formed.

Algebraization

The algebraization of many-sorted logic is explained in an article by Caleiro and Gonçalves,[1] which generalizes abstract algebraic logic to the many-sorted case, but can also be used as introductory material.

Order-sorted logic

While many-sorted logic requires two distinct sorts to have disjoint universe sets, order-sorted logic allows one sort to be declared a subsort of another sort , usually by writing or similar syntax. In the above example, it is desirable to declare

,

,

,

,

,

,

and so on.

Wherever a term of some sort is required, a term of any subsort of may be supplied instead. For example, assuming a function declaration , and a constant declaration , the term is perfectly valid and has the sort . In order to supply the information that the mother of a dog is a dog in turn, another declaration may be issued; this is called function overloading, similar to overloading in programming languages.

Order-sorted logic can be translated into unsorted logic, using a unary predicate for each sort , and an axiom for each subsort declaration . The reverse approach was successful in automated theorem proving: in 1985, Christoph Walther could solve a then benchmark problem by translating it into order-sorted logic, thereby boiling it down an order of magnitude, as many unary predicates turned into sorts.[2]

In order to incorporate order-sorted logic into a clause-based automated theorem prover, a corresponding order-sorted unification algorithm is necessary, which requires for any two declared sorts their intersection to be declared, too: if and are variables of sort and , respectively, the equation has the solution , where .

Smolka generalized order-sorted logic to allow for parametric polymorphism.

[3][4]

In his framework, subsort declarations are propagated to complex type expressions.

As a programming example, a parametric sort may be declared (with being a type parameter as in a C++ template), and from a subsort declaration the relation is automatically inferred, meaning that each list of integers is also a list of floats.

Schmidt-Schauß generalized order-sorted logic to allow for term declarations.[5]

As an example, assuming subsort declarations and , a term declaration like allows to declare a property of integer addition that could not be expressed by ordinary overloading.

See also

{{Portal|Logic}}
  • Categorical logic
  • Many-sorted first-order logic#Many-sorted logic

References

1. ^{{cite book| author=Carlos Caleiro, Ricardo Gonçalves| chapter=On the algebraization of many-sorted logics| title=Proc. 18th int. conf. on Recent trends in algebraic development techniques (WADT)| year=2006| volume=| pages=21–36| publisher=Springer| editor=| series=| isbn=978-3-540-71997-7| url=http://sqig.math.ist.utl.pt/pub/CaleiroC/06-CG-manysorted.pdf}}
2. ^{{cite journal|first1=Christoph|last1=Walther|title=A Mechanical Solution of Schubert's Steamroller by Many-Sorted Resolution|journal=Artif. Intell.|volume=26|number=2|pages=217–224|url=http://www.inferenzsysteme.informatik.tu-darmstadt.de/media/is/publikationen/Schuberts_Steamroller_by_Many-Sorted_Resolution-AIJ-25-2-1985.pdf|year=1985|doi=10.1016/0004-3702(85)90029-3}}
3. ^{{cite conference|first1=Gert|last1=Smolka|title=Logic Programming with Polymorphically Order-Sorted Types|booktitle=Int. Workshop Algebraic and Logic Programming|publisher=Springer|series=LNCS|volume=343|pages=53–70|date=Nov 1988}}
4. ^{{citation|first1=Gert|last1=Smolka|title=Logic Programming over Polymorphically Order-Sorted Types|publisher=Univ. Kaiserslautern, Germany|date=May 1989}}
5. ^{{cite book|first1=Manfred|last1=Schmidt-Schauß|title=Computational Aspects of an Order-Sorted Logic with Term Declarations|publisher=Springer|series=LNAI|volume=395|date=Apr 1988}}

Early papers on many-sorted logic include:

  • {{cite journal| author=Wang, Hao| title=Logic of many-sorted theories| journal=Journal of Symbolic Logic| year=1952| volume=17| pages=105–116| doi=10.2307/2266241}}, collected in the author's Computation, Logic, Philosophy. A Collection of Essays, Beijing: Science Press; Dordrecht: Kluwer Academic, 1990.
  • {{cite journal| author=Gilmore, P.C.| title=An addition to "Logic of many-sorted theories"| journal=Compositio Mathematica| year=1958| volume=13| pages=277–281| url=http://archive.numdam.org/article/CM_1956-1958__13__277_0.pdf}}
  • {{cite journal| author=A. Oberschelp| title=Untersuchungen zur mehrsortigen Quantorenlogik| journal=Mathematische Annalen| year=1962| volume=145| number=4| pages=297–333| url=http://gdz.sub.uni-goettingen.de/index.php?id=11&L=4&PPN=GDZPPN002289989&L=1| doi=10.1007/bf01396685}}
  • {{cite journal| author=F. Jeffry Pelletier| title=Sortal Quantification and Restricted Quantification| journal=Philosophical Studies| year=1972| volume=23| pages=400–404| url=https://www.sfu.ca/~jeffpell/papers/SortalRestrQuant.pdf| doi=10.1007/bf00355532}}

External links

  • "Many-sorted Logic", the first chapter in [https://web.archive.org/web/20070608182648/http://react.cs.uni-sb.de/~zarba/notes.html Lecture Notes on Decision Procedures] by [https://web.archive.org/web/20070102043747/http://react.cs.uni-sb.de/~zarba/ Calogero G. Zarba]

1 : Systems of formal logic

随便看

 

开放百科全书收录14589846条英语、德语、日语等多语种百科知识,基本涵盖了大多数领域的百科知识,是一部内容自由、开放的电子版国际百科全书。

 

Copyright © 2023 OENC.NET All Rights Reserved
京ICP备2021023879号 更新时间:2024/9/24 11:32:49