A Three-Valued Semantics for Typed Logic Programming
Types in logic programming have focused on conservative approximations of program semantics by regular types, on one hand, and on type systems based on a prescriptive semantics defined for typed programs, on the other. In this paper, we define a new semantics for logic programming, where programs ev...
Main Authors: | , , |
---|---|
Format: | Article |
Language: | English |
Published: |
Open Publishing Association
2019-09-01
|
Series: | Electronic Proceedings in Theoretical Computer Science |
Online Access: | http://arxiv.org/pdf/1909.08232v1 |
id |
doaj-d7aa2cb8a84c4d8cac7053f117dd8d44 |
---|---|
record_format |
Article |
spelling |
doaj-d7aa2cb8a84c4d8cac7053f117dd8d442020-11-25T02:19:32ZengOpen Publishing AssociationElectronic Proceedings in Theoretical Computer Science2075-21802019-09-01306Proc. ICLP 2019365110.4204/EPTCS.306.10:43A Three-Valued Semantics for Typed Logic ProgrammingJoão Barbosa0Mário Florido1Vítor Santos Costa2 Faculty of Science of the University of Porto Faculty of Science of the University of Porto Faculty of Science of the University of Porto Types in logic programming have focused on conservative approximations of program semantics by regular types, on one hand, and on type systems based on a prescriptive semantics defined for typed programs, on the other. In this paper, we define a new semantics for logic programming, where programs evaluate to true, false, and to a new semantic value called wrong, corresponding to a run-time type error. We then have a type language with a separated semantics of types. Finally, we define a type system for logic programming and prove that it is semantically sound with respect to a semantic relation between programs and types where, if a program has a type, then its semantics is not wrong. Our work follows Milner's approach for typed functional languages where the semantics of programs is independent from the semantic of types, and the type system is proved to be sound with respect to a relation between both semantics.http://arxiv.org/pdf/1909.08232v1 |
collection |
DOAJ |
language |
English |
format |
Article |
sources |
DOAJ |
author |
João Barbosa Mário Florido Vítor Santos Costa |
spellingShingle |
João Barbosa Mário Florido Vítor Santos Costa A Three-Valued Semantics for Typed Logic Programming Electronic Proceedings in Theoretical Computer Science |
author_facet |
João Barbosa Mário Florido Vítor Santos Costa |
author_sort |
João Barbosa |
title |
A Three-Valued Semantics for Typed Logic Programming |
title_short |
A Three-Valued Semantics for Typed Logic Programming |
title_full |
A Three-Valued Semantics for Typed Logic Programming |
title_fullStr |
A Three-Valued Semantics for Typed Logic Programming |
title_full_unstemmed |
A Three-Valued Semantics for Typed Logic Programming |
title_sort |
three-valued semantics for typed logic programming |
publisher |
Open Publishing Association |
series |
Electronic Proceedings in Theoretical Computer Science |
issn |
2075-2180 |
publishDate |
2019-09-01 |
description |
Types in logic programming have focused on conservative approximations of program semantics by regular types, on one hand, and on type systems based on a prescriptive semantics defined for typed programs, on the other. In this paper, we define a new semantics for logic programming, where programs evaluate to true, false, and to a new semantic value called wrong, corresponding to a run-time type error. We then have a type language with a separated semantics of types. Finally, we define a type system for logic programming and prove that it is semantically sound with respect to a semantic relation between programs and types where, if a program has a type, then its semantics is not wrong. Our work follows Milner's approach for typed functional languages where the semantics of programs is independent from the semantic of types, and the type system is proved to be sound with respect to a relation between both semantics. |
url |
http://arxiv.org/pdf/1909.08232v1 |
work_keys_str_mv |
AT joaobarbosa athreevaluedsemanticsfortypedlogicprogramming AT marioflorido athreevaluedsemanticsfortypedlogicprogramming AT vitorsantoscosta athreevaluedsemanticsfortypedlogicprogramming AT joaobarbosa threevaluedsemanticsfortypedlogicprogramming AT marioflorido threevaluedsemanticsfortypedlogicprogramming AT vitorsantoscosta threevaluedsemanticsfortypedlogicprogramming |
_version_ |
1724876165785583616 |