
What Declarative Languages Are (2013) - tel
https://semantic-domain.blogspot.com/2013/07/what-declarative-languages-are.html
======
crazypython
> In particular, note the appearance of an existential quantifier in the
> premises of the sequential composition and Kleene star cases, and note the
> nondeterministic choice of a branch in the alternation case. So read as a
> logic program, this semantics is not well-moded.

Is this saying that you cannot mechanically convert a "declarative language"
into a program? Or is it saying it may allow multiple choices? If so, how is
it not included in the Curry-Howard correspondence?

------
hyperpallium
The latex isn't rendering for me. Pasting it into
[https://math.stackexchange.com/questions/ask](https://math.stackexchange.com/questions/ask)
is one online solution.

In the example, membership in a language already implies existence, doesn't
it? So why is the (crucial) existential quantifier needed?

What does "moded" mean (as in "well-moded")?

~~~
empath75
I do enjoy ‘simple explanations’ that depend on you having a masters degree to
understand.

[https://www.w3.org/People/Massimo/papers/fpca95.pdf](https://www.w3.org/People/Massimo/papers/fpca95.pdf)

Explained in that paper. I don’t think I’m qualified to give a tl;dr;

~~~
hyperpallium
From abstract of an earlier paper co-authored by Reddy

> A mode of a predicate designates some of its parameters to be input and the
> others to be output. ... indefinite modes... in which a resolution
> interpreter yields answers with free variables.
> [https://www.tib.eu/en/search/id/tema-
> archive%3ATEMAE84100273...](https://www.tib.eu/en/search/id/tema-
> archive%3ATEMAE84100273082/Transformation-of-logic-programs-into-
> functional/)

Sounds like well-moded means: for given inputs, you get a definite answer,
rather than something to be further computed around (like high school algebra
with more than one unknown). Fits the context here.

------
marcosdumay
What is a trivial existential quantifier and what property identifies them?

~~~
empath75
I’m not sure what a trivial existential quantifier is, but an existential
quantifier is the statement ‘there exists’, usually written ∃.

~~~
marcosdumay
The 'for all' statement is also an existential quantifier, as is the 'this one
value' statement implicit on the imperative statements.

The entire meat of the article depends on this concept of "non-trivial"
quantifier.

~~~
disconcision
From the comments, it seems likely that the author doesn't have a precise
definition of non-trivial. But the framework still feels potentially useful as
a way to precisely parameterize disagreements about whether or not a given
semantics is declarative.

That said, I'm also having some trouble with the concept. Take for example the
rule: there exists x such that succ(x) = y ⊢ dec(y) = x. If we're used to
operational semantics which include pattern matching, this feels trivial. But
otherwise we have to be clever to avoid exhaustive search.

I'm a bit out of my depth here, but it sort-of feels like 'non-trivial' here
means 'I can't immediately/uniquely produce a corresponding well-moded
operational semantics'. Whether this lends any clarity might be a matter of
taste...

