1,691,725 research outputs found
Document number: N4024 Date: 2014-05-22 Project:
Reply-to: Nat Goodspeed ( nat at lindenlab dot com) Oliver Kowalke (oliver dot kowalke at gmail dot com) Distinguishing coroutines and fiber
Programming in logic without logic programming
In previous work, we proposed a logic-based framework in which computation is
the execution of actions in an attempt to make reactive rules of the form if
antecedent then consequent true in a canonical model of a logic program
determined by an initial state, sequence of events, and the resulting sequence
of subsequent states. In this model-theoretic semantics, reactive rules are the
driving force, and logic programs play only a supporting role.
In the canonical model, states, actions and other events are represented with
timestamps. But in the operational semantics, for the sake of efficiency,
timestamps are omitted and only the current state is maintained. State
transitions are performed reactively by executing actions to make the
consequents of rules true whenever the antecedents become true. This
operational semantics is sound, but incomplete. It cannot make reactive rules
true by preventing their antecedents from becoming true, or by proactively
making their consequents true before their antecedents become true.
In this paper, we characterize the notion of reactive model, and prove that
the operational semantics can generate all and only such models. In order to
focus on the main issues, we omit the logic programming component of the
framework.Comment: Under consideration in Theory and Practice of Logic Programming
(TPLP
Extending snBench to Support a Graphical Programming Interface for a Sensor Network Tasking Language (STEP)
The purpose of this project is the creation of a graphical "programming" interface for a sensor network tasking language called STEP. The graphical interface allows the user to specify a program execution graphically from an extensible pallet of functionalities and save the results as a properly formatted STEP file. Moreover, the software is able to load a file in STEP format and convert it into the corresponding graphical representation. During both phases a type-checker is running on the background to ensure that both the graphical representation and the STEP file are syntactically correct. This project has been motivated by the Sensorium project at Boston University. In this technical report we present the basic features of the software, the process that has been followed during the design and implementation. Finally, we describe the approach used to test and validate our software
Constraint Programming viewed as Rule-based Programming
We study here a natural situation when constraint programming can be entirely
reduced to rule-based programming. To this end we explain first how one can
compute on constraint satisfaction problems using rules represented by simple
first-order formulas. Then we consider constraint satisfaction problems that
are based on predefined, explicitly given constraints. To solve them we first
derive rules from these explicitly given constraints and limit the computation
process to a repeated application of these rules, combined with labeling.We
consider here two types of rules. The first type, that we call equality rules,
leads to a new notion of local consistency, called {\em rule consistency} that
turns out to be weaker than arc consistency for constraints of arbitrary arity
(called hyper-arc consistency in \cite{MS98b}). For Boolean constraints rule
consistency coincides with the closure under the well-known propagation rules
for Boolean constraints. The second type of rules, that we call membership
rules, yields a rule-based characterization of arc consistency. To show
feasibility of this rule-based approach to constraint programming we show how
both types of rules can be automatically generated, as {\tt CHR} rules of
\cite{fruhwirth-constraint-95}. This yields an implementation of this approach
to programming by means of constraint logic programming. We illustrate the
usefulness of this approach to constraint programming by discussing various
examples, including Boolean constraints, two typical examples of many valued
logics, constraints dealing with Waltz's language for describing polyhedral
scenes, and Allen's qualitative approach to temporal logic.Comment: 39 pages. To appear in Theory and Practice of Logic Programming
Journa
Polymonadic Programming
Monads are a popular tool for the working functional programmer to structure
effectful computations. This paper presents polymonads, a generalization of
monads. Polymonads give the familiar monadic bind the more general type forall
a,b. L a -> (a -> M b) -> N b, to compose computations with three different
kinds of effects, rather than just one. Polymonads subsume monads and
parameterized monads, and can express other constructions, including precise
type-and-effect systems and information flow tracking; more generally,
polymonads correspond to Tate's productoid semantic model. We show how to equip
a core language (called lambda-PM) with syntactic support for programming with
polymonads. Type inference and elaboration in lambda-PM allows programmers to
write polymonadic code directly in an ML-like syntax--our algorithms compute
principal types and produce elaborated programs wherein the binds appear
explicitly. Furthermore, we prove that the elaboration is coherent: no matter
which (type-correct) binds are chosen, the elaborated program's semantics will
be the same. Pleasingly, the inferred types are easy to read: the polymonad
laws justify (sometimes dramatic) simplifications, but with no effect on a
type's generality.Comment: In Proceedings MSFP 2014, arXiv:1406.153
- …