6,243 research outputs found
An Operational Semantics for Declarative Multi-Paradigm Languages1 1This work has been partially supported by CICYT TIC 2001-2705-C03-01, by the MCYT under grants HA2001-0059, HU2001-0019 and HI2000-0161, and by the DFG under grant Ha 2457/1-2.
AbstractPractical declarative multi-paradigm languages combine the main features of functional, logic and concurrent programming (e.g., laziness, sharing, higher-order, logic variables, non-determinism, search strategies). Usually, these languages also include interfaces to external functions as well as to constraint solvers. In this work, we introduce the first formal description of an operational semantics for realistic multi-paradigm languages covering all the aforementioned features in a precise and understandable manner. We also provide a deterministic version of the operational semantics which models search strategies explicitly. This deterministic semantics becomes essential to develop language-specific tools like program tracers, profilers, optimizers, etc. Finally, we extend the deterministic semantics in order to model concurrent computations. An implementation of the complete operational semantics has been undertaken
An Integrated Development Environment for Declarative Multi-Paradigm Programming
In this paper we present CIDER (Curry Integrated Development EnviRonment), an
analysis and programming environment for the declarative multi-paradigm
language Curry. CIDER is a graphical environment to support the development of
Curry programs by providing integrated tools for the analysis and visualization
of programs. CIDER is completely implemented in Curry using libraries for GUI
programming (based on Tcl/Tk) and meta-programming. An important aspect of our
environment is the possible adaptation of the development environment to other
declarative source languages (e.g., Prolog or Haskell) and the extensibility
w.r.t. new analysis methods. To support the latter feature, the lazy evaluation
strategy of the underlying implementation language Curry becomes quite useful.Comment: In A. Kusalik (ed), proceedings of the Eleventh International
Workshop on Logic Programming Environments (WLPE'01), December 1, 2001,
Paphos, Cyprus. cs.PL/011104
A Declarative Semantics for CLP with Qualification and Proximity
Uncertainty in Logic Programming has been investigated during the last
decades, dealing with various extensions of the classical LP paradigm and
different applications. Existing proposals rely on different approaches, such
as clause annotations based on uncertain truth values, qualification values as
a generalization of uncertain truth values, and unification based on proximity
relations. On the other hand, the CLP scheme has established itself as a
powerful extension of LP that supports efficient computation over specialized
domains while keeping a clean declarative semantics. In this paper we propose a
new scheme SQCLP designed as an extension of CLP that supports qualification
values and proximity relations. We show that several previous proposals can be
viewed as particular cases of the new scheme, obtained by partial
instantiation. We present a declarative semantics for SQCLP that is based on
observables, providing fixpoint and proof-theoretical characterizations of
least program models as well as an implementation-independent notion of goal
solutions.Comment: 17 pages, 26th Int'l. Conference on Logic Programming (ICLP'10
Linear-Logic Based Analysis of Constraint Handling Rules with Disjunction
Constraint Handling Rules (CHR) is a declarative committed-choice programming
language with a strong relationship to linear logic. Its generalization CHR
with Disjunction (CHRv) is a multi-paradigm declarative programming language
that allows the embedding of horn programs. We analyse the assets and the
limitations of the classical declarative semantics of CHR before we motivate
and develop a linear-logic declarative semantics for CHR and CHRv. We show how
to apply the linear-logic semantics to decide program properties and to prove
operational equivalence of CHRv programs across the boundaries of language
paradigms
Combining Static and Dynamic Contract Checking for Curry
Static type systems are usually not sufficient to express all requirements on
function calls. Hence, contracts with pre- and postconditions can be used to
express more complex constraints on operations. Contracts can be checked at run
time to ensure that operations are only invoked with reasonable arguments and
return intended results. Although such dynamic contract checking provides more
reliable program execution, it requires execution time and could lead to
program crashes that might be detected with more advanced methods at compile
time. To improve this situation for declarative languages, we present an
approach to combine static and dynamic contract checking for the functional
logic language Curry. Based on a formal model of contract checking for
functional logic programming, we propose an automatic method to verify
contracts at compile time. If a contract is successfully verified, dynamic
checking of it can be omitted. This method decreases execution time without
degrading reliable program execution. In the best case, when all contracts are
statically verified, it provides trust in the software since crashes due to
contract violations cannot occur during program execution.Comment: Pre-proceedings paper presented at the 27th International Symposium
on Logic-Based Program Synthesis and Transformation (LOPSTR 2017), Namur,
Belgium, 10-12 October 2017 (arXiv:1708.07854
- …