Circumscription (logic): Difference between revisions

From formulasearchengine
Jump to navigation Jump to search
en>Addbot
m Bot: Migrating 1 interwiki links, now provided by Wikidata on d:q5121755
en>SimonMorgan
mNo edit summary
 
Line 1: Line 1:
{{No footnotes|date=August 2010}}
Myrtle Benny is how I'm called and I really feel comfortable when individuals use the complete name. He used to be unemployed but now he is a meter reader. [http://Www.Thebody.com/h/list-of-curable-stds.html California] is exactly where I've usually been residing and  [http://indianrajneet.com/groups/best-strategies-for-keeping-candida-albicans-from-increasing/ std home test] I  at home std test love each  std  [http://essexsinglesnights.co.uk/groups/cures-for-any-candida-tips-to-use-now/ mouse click the next page] home test day residing here. The thing she adores most is body building and now she is attempting to [http://Www.Aahealth.org/programs/comm-diseases/hiv-aids/hotlines earn cash] with it.<br><br>at home std testing Feel free to visit my site ... home std test [[http://www.aseandate.com/index.php?m=member_profile&p=profile&id=13345213 you can try here]]
In [[computer science]], '''higher-order abstract syntax''' (abbreviated '''HOAS''') is a technique for the representation of [[abstract syntax trees]] for languages with variable [[name binding|binders]].
 
==Relation to first-order abstract syntax==
 
An abstract syntax tree is ''abstract'' because it is a [[mathematical object]] that has certain structure by its very nature. For instance, in ''[[first-order abstract syntax]]'' (''FOAS'') trees, as commonly used in [[compiler]]s, the tree structure implies the subexpression relation, meaning that no parentheses are required to disambiguate programs (as they are in the [[concrete syntax]]). HOAS exposes additional structure: the relationship between variables and their binding sites. In FOAS representations, a variable is typically represented with an identifier, with the relation between binding site and use being indicated by using the ''same'' identifier. With HOAS, there is no name for the variable; each use of the variable refers directly to the binding site.
 
There are a number of reasons why this technique is useful. First, it makes the binding structure of a program explicit: just as there is no need to explain operator precedence in a FOAS representation, there is no need to have the rules of binding and scope at hand to interpret a HOAS representation. Second, programs that are
[[lambda calculus|alpha-equivalent]] (differing only in the names of bound variables) have identical representations in HOAS, which can make equivalence checking more efficient. <!-- other uses? -->
 
==Implementation==
 
One mathematical object that could be used to implement HOAS is a [[graph (mathematics)|graph]] where variables are associated with their binding sites via [[edge (graph theory)|edges]]. Another popular way to implement HOAS (in, for example, compilers) is with [[de Bruijn index|de Bruijn indices]].
 
==Use in logical frameworks==
In the domain of [[logical framework]]s, the term higher-order abstract syntax is usually used to refer to a specific representation that uses the binders of the [[metalanguage|meta-language]] to encode the binding structure of the [[object language]].
 
For instance, the logical framework [[LF (logical framework)|LF]] has a λ-construct, which has arrow
(→) type. A first-order encoding of an object language construct <code>let</code> would be (using [[Twelf]]
syntax):
 
exp : type.
var : type.
v : var -> exp.
let : exp -> var -> exp -> exp.
 
Here, <code>exp</code> is the family of object language expressions. The family <code>var</code> is the representation of variables (implemented perhaps as natural numbers, which is not shown); the constant <code>v</code> witnesses the fact that variables are expressions. The constant <code>let</code> is an expression that takes three arguments: an expression (that is being bound), a variable (that it is bound to) and another expression (that the variable is bound within).
 
The [[canonical form|canonical]] HOAS representation of the same object language would be:
 
exp : type.
let : exp -> (exp -> exp) -> exp.
 
In this representation, object level variables do not appear explicitly. The constant <code>let</code> takes an expression (that is being bound) and a meta-level function <code>exp</code> → <code>exp</code>
(the body of the let). This function is the ''higher-order'' part: an expression with a free variable is
represented as an expression with ''holes'' that are filled in by the meta-level function when applied. As a concrete example, we would construct the object level expression
 
let x = 1 + 2
in x + 3
 
(assuming the natural constructors for numbers and addition) using the HOAS signature above as
 
  let (plus 1 2) ([y] plus y 3)
 
where <code>[y] e</code> is Twelf's syntax for the function <math>\lambda y.e</math>.
 
This specific representation has advantages beyond the ones above: for one, by reusing the meta-level notion of binding, the encoding enjoys properties such as type-preserving ''substitution'' without the need to define/prove them. In this way using HOAS can drastically reduce the amount of [[boilerplate code]] having to do with binding in an encoding.
 
Higher-order abstract syntax is generally only applicable when object language variables can be understood as variables in the mathematical sense (that is, as stand-ins for arbitrary members of some domain). This is often, but not always, the case: for instance, there are no advantages to be gained from a HOAS encoding of [[scope (programming)#Dynamic scoping|dynamic scope]] as it appears in some dialects of [[Lisp programming language|Lisp]] because dynamically scoped variables do not act like mathematical variables.
<!-- to-do: history? -->
 
== See also ==
* [[Generalized algebraic data type]]
* [[Parametric higher-order abstract syntax]] (PHOAS)
 
== References ==
 
* {{cite conference
| author = Dale Miller and Gopalan Nadathur
| year = 1987
| title = A Logic Programming Approach to Manipulating Formulas and Programs
| url = http://www.lix.polytechnique.fr/Labo/Dale.Miller/papers/slp87.pdf
| booktitle = IEEE Symposium on Logic Programming
| pages = 379–388
}}
* {{cite conference
| author = [[Frank Pfenning]], Conal Elliott
| year = 1988
| title = Higher-order abstract syntax
| url = http://www.cs.cmu.edu/~fp/papers/pldi88.pdf
| booktitle = Proceedings of the [[Association for Computing Machinery|ACM]] [[SIGPLAN]] [[PLDI]] '88
| pages = 199–208
| doi = 10.1145/53990.54010
| id = ISBN 0-89791-269-1
}}
* {{cite journal
| author = J. Despeyroux, A. Felty, A. Hirschowitz
| year = 1995
| title = Higher-Order Abstract Syntax in Coq
| url = http://www.site.uottawa.ca/~afelty/dist/tlca95.ps
| journal = [[Lecture Notes in Computer Science]]
| volume = 902
| pages = 124–138
| id = ISBN 3-540-59048-X
| doi = 10.1007/BFb0014049
}}
* {{cite conference
| author = Martin Hofmann
| year = 1999
| title = Semantical analysis of higher-order abstract syntax
| url = http://www.tcs.informatik.uni-muenchen.de/~mhofmann/lics99hoas.ps.gz
| booktitle = 14th Annual [[IEEE Symposium on Logic in Computer Science]]
| pages = 204
| id = ISBN 0-7695-0158-3
}}
* {{cite conference
| author = Dale Miller
| year = 2000
| title = Abstract Syntax for Variable Binders: An Overview
| url = http://www.lix.polytechnique.fr/Labo/Dale.Miller/papers/ltrees.pdf
| booktitle = Computational Logic - {CL} 2000
| pages = 239–253
}}
* {{cite conference
| author = Eli Barzilay, Stuart Allen
| title = Reflecting Higher-Order Abstract Syntax in Nuprl
| url = http://www.barzilay.org/misc/hoas-paper.pdf
| booktitle = [[Theorem Proving in Higher-Order Logics]] 2002
| year = 2002
| pages = 23–32
| id = ISBN 3-540-44039-9
}}
* {{cite conference
| author = Eli Barzilay
| year = 2006
| title = A Self-Hosting Evaluator using HOAS
| url = http://scheme2006.cs.uchicago.edu/15-barzilay.pdf
| booktitle = [[International Conference on Functional Programming|ICFP]] Workshop on Scheme and Functional Programming 2006
}}
 
{{DEFAULTSORT:Higher-Order Abstract Syntax}}
[[Category:Type theory]]
[[Category:Logic programming]]
[[Category:Dependently typed programming]]
[[Category:Programming language theory]]

Latest revision as of 23:19, 15 July 2014

Myrtle Benny is how I'm called and I really feel comfortable when individuals use the complete name. He used to be unemployed but now he is a meter reader. California is exactly where I've usually been residing and std home test I at home std test love each std mouse click the next page home test day residing here. The thing she adores most is body building and now she is attempting to earn cash with it.

at home std testing Feel free to visit my site ... home std test [you can try here]