
Attempto Controlled English - solarkraft
https://en.wikipedia.org/wiki/Attempto_Controlled_English
======
svat
Starting in about the 11th century, philosophers in India of the Navya-Nyāya
school adopted a similar artificial dialect of Sanskrit, to make their
arguments precise. Of course there was no computer implementation backing the
formalization, but the goal was similar: to have a language that remains a
subset of natural language and (somewhat) intelligible to a typical educated
person, yet is a formal language with unambiguous meanings. A good description
of this language is in a couple of papers by Ganeri [1].

For example (taken from [2]), instead of saying the straightforward “Caitra
goes to the village”, if you wished to be _really_ precise you might say
“There is an activity which leads to a connection-activity which has as Agent
no one other than Caitra, specified by singularity, [which] is taking place in
the present and which has as Object something not different from ‘village’.”
(Sounds a bit less unnatural and also a bit less confusing in Sanskrit.)

> [Attempto Controlled English] can serve as knowledge representation…

It is not clear to me when this project started, but there was a 1985 article
pointing out the Navya-Nyāya/“Shastric Sanskrit” language as an example of
something that is both (somewhat) a natural language and (somewhat) usable for
knowledge representation [2]. In its own way that article became, in popular
culture in some circles in India, the source of various unfounded memes about
Sanskrit being good for computers, or more absurd claims
([https://news.ycombinator.com/item?id=14295285](https://news.ycombinator.com/item?id=14295285)).

[1]:
[http://www.columbia.edu/itc/mealac/pollock/sks/papers/Ganeri...](http://www.columbia.edu/itc/mealac/pollock/sks/papers/Ganeri\(Matilal%20vol\).pdf)
(can't find a link to the second paper now)

[2]:
[https://www.aaai.org/ojs/index.php/aimagazine/article/view/4...](https://www.aaai.org/ojs/index.php/aimagazine/article/view/466)

~~~
vinceguidry
I believe Latin was still being used for theological discourse in Europe well
into the 1700s for that same reason, precision. Something nice about a dead
language is the meanings of the words don't have a way to change from under
you.

~~~
schoen
Latin is still perfectly capable of every kind of ambiguity that other natural
languages are. For example, I once wrote the sentence

Quisque aliquid habet quod occultet

for a t-shirt.

While the intended meaning is 'everybody has something to hide', in a
different context one could imagine that the subject of "occultet" is someone
else previously referred to. For example, if we had just been talking about
Moxie Marlinspike, we could conceivably read this sentence as 'everybody has
something for him [Moxie] to hide'. (Like, all of us users out here have got
different things that Moxie can help each of us to protect.)

There's also a famous joke "malo malo malo malo malo" ('I prefer (being) a bad
man in a bad situation to (being) an apple in an apple tree'). I'm sure we can
proliferate examples of ambiguous Latin to match every other natural language.

A cool disambiguation feature in Latin is the distinction between the
possessive pronouns "eius" and "suus", where "suus" is used when referring to
possessions of the grammatical subject of the sentence and "eius" when
referring to someone _else 's_ possessions. While English can specify the
former ("his/her/its own"), it doesn't have a straightforward way to show that
the possessor is _not_ the subject of the sentence.

You can see the contrast between eius and suus in the text of the Magnificat

[https://en.wikipedia.org/wiki/Magnificat#Text](https://en.wikipedia.org/wiki/Magnificat#Text)

where "ancillae suae" ('his handmaiden') occurs in a sentence whose
grammatical subject is God, but "nomen eius" ('his name') in a sentence whose
grammatical subject is the name. And sure enough, there is an actual
disambiguation between the subject of a sentence and someone else later on:

Suscepit Israel, puerum suum, recordatus misericordiae suae, sicut locutus est
ad patres nostros, Abraham et semini eius in saecula.

He [God] has taken up Israel, his [God's] servant, remembering his [God's]
mercy, as he [God] said to our ancestors, Abraham and his [Abraham's] seed
forever.

In this case "his mercy" and "his seed" refer to God's mercy but Abraham's
seed, but there is no referential ambiguity about that in the Latin because
one is "misericordiae suae" and the other is "semini eius".

~~~
simonebrunozzi
You remind me of the famous "I vitelli dei romani sono belli" [0], which:

1) Is correct Latin

2) Sounds Italian, not Latin

3) In Italian it would mean "God's veals are beautiful"

4) In Latin it actually means "Go, Vitellio, to the sound of war (made by) the
roman God"

[0]:
[https://it.wikipedia.org/wiki/I_vitelli_dei_romani_sono_bell...](https://it.wikipedia.org/wiki/I_vitelli_dei_romani_sono_belli)
(didn't find an English version of it)

~~~
lone-commenter
3) Actually it means "Romans' calfs are beautiful".

~~~
schoen
4) The "Vitelli" in Latin would be the vocative of the name "Vitellius" rather
than "Vitellio".

Cool sentence -- I had never heard of it before!

The Latin etymological equivalent of the Italian sentence would be "illi
vitelli de illis Romanis sunt belli", which uses "de" in a way that's
unidiomatic for ancient Latin (where it only means something like "from", not
"of" in the sense of "belonging to").

------
grenoire
The meat and potatoes of course is the parser created for this language:
[https://github.com/Attempto/APE](https://github.com/Attempto/APE)

This is the primary benefit for heavily structuring the sentences. It
effectively turns into a programming language with its own form of definitions
and statements. My question is: Can we make it Turing-complete by means of
recursive sentences? Maybe by using the sentences that redefine proper nouns?

~~~
posterboy
you are being nothing but evil

------
mmastrac
Has anyone attempto'd to combine this with state machines in a way that you
could specify rules in an english-like way, with a computer checking that
you've resolved all ambiguities?

For example, a system that starts and stops based on observing parts of
another system, but also allowing a user to input explicit start/stop commands
would require additional rules:

    
    
      The system is stopped if the subsystem is in state A.
      The system is started if the subsystem is not in state A.
      The system is stopped if the user sets the stop flag.
      The system is started if the user unsets the stop flag.
    
      Error: ambiguous state if subsystem not in state A and user sets the stop flag.
    

There's some real value here in allowing non-programmers to work through all
the edge cases of a system, while simultaneously adding tools to convert
standard English to ACE (eg: identifying ambiguous English and asking them to
rewrite pronouns or split sentences up).

~~~
johnfactorial
Have you seen Cucumber? [https://cucumber.io/docs](https://cucumber.io/docs)
It's a system that attempts to enable specifications for a software product to
be written in a way that can be parsed by an automated testing framework.

In theory, you carefully say what you want the software to do in given
scenarios, human developers understand the spec as-is, and automated tests can
read and execute the spec as-is as a test.

I have no professional experience with it because all the docs make it look
like something I would run from: lots of in-code scaffolding and talking like
a computer just to get the same job done. But maybe you'll like it.

~~~
rgoulter
FWIW, the "specifications can be tested" is nothing magical. It binds
statements of the Cucumber spec to snippets of code using regular expressions.
(The effect is about the same as titles given to blocks of code in Ruby's
RSpec).

The "it's not code" part of Cucumber is that the test document is something
that a non-programmer won't freak out at manipulating. (But a developer would
still have to make sure the code snippets bind to the statements, so...).

Still, I like it. I really like the suggested tactics discussed in
Specification By Example [https://gojko.net/books/specification-by-
example/](https://gojko.net/books/specification-by-example/)

------
deckar01
This reminds me of when my team started code reviewing feature documentation.
The text was going to have to be read hundreds of times and understanding it
would be critical for QA to function properly. A common problem we ran into
was sentences that were hard to understand without reading them multiple times
due to small connective parts of speech being omitted. It intuitively felt
wrong, but it was not immediately obvious why. After researching it a little
every case seemed to boil down to resolving ambiguity. English is filled with
ambiguous words that can be multiple parts of speech. These seemingly
unnecessary pieces of syntax are actually really efficient at hinting what
part of speech will come next so that the context is immediately understood.

------
mxcrossb
Wikipedia articles like this bug me. It is a well written introduction to the
project, but why is that on the Wikipedia? Put that on your own website! I
wish more people would follow wikipedia’s very clean and easy style.

This is of course why the article can’t follow wikipedia’s citation rules. And
also all the references just link to articles by one group, so the article
can’t give you any real context. Is this a serious, notable work? Or is
someone just boosting their search rankings with a Wikipedia link?

~~~
throwaway744678
This would have been cooler if they had written the page in the language
itself (going meta, here)

~~~
avmich
More appropriate would be to have English Wikipedia translated wholesale to
ACE. In that one the article about ACE would be naturally in ACE.

~~~
throwaway744678
Sounds great, let's go and fork Wikipedia.

------
lopmotr
This sounds kind of like the simplified English used on aeroplanes [1] except
more formal and less for humans to write. That leads to signs like "no step"
instead of "don't stand on this".

[1]
[https://en.wikipedia.org/wiki/Simplified_Technical_English](https://en.wikipedia.org/wiki/Simplified_Technical_English)

------
glenneroo
Finally I understand why all those years of Google searches for documentation
about ACE (ADAPTIVE Communication Environment)[1] have been so painful. To
make matters worse, versioning was very close - Attempto is at version 6.7
while the programming ACE is at 6.5.

[1]:
[http://download.dre.vanderbilt.edu/](http://download.dre.vanderbilt.edu/)

~~~
avmich
A friend of mine, who worked with Verilog a lot, was expressing some anger
about extension .v on the Internet (Github?) mostly related to Coq, not
Verilog. Oh well...

------
dlojudice
As I'm getting older I feel the need to make the code as readable as possible
[1] to a point where non-programmers would be able to read it, especially in
complex business rules enviroments (ex: finance, insurance, health, etc).

The quote "the limits of my language are the limits of my world" [2] shows
when we try expressing these business rules in high-level programing languages
like C, C#, Javascript. There are (a significant) parts of my code where I
wish to not be limited by the syntax of the language.

DSLs helps, but usually takes a disproportionate effort to implement.

Would be great see more natural languages embedded on our day to day
programing language.

[1]
[https://twitter.com/ianmiell/status/1144154072217522176?s=19](https://twitter.com/ianmiell/status/1144154072217522176?s=19)
[2] [https://www.quora.com/What-did-Ludwig-Wittgenstein-mean-
by-t...](https://www.quora.com/What-did-Ludwig-Wittgenstein-mean-by-the-
limits-of-my-language-are-the-limits-of-my-world?share=1)

------
parentheses
"A girl had no name"

Jaqen H'ghar spoke ACE

------
carapace
FWIW, I thought it might be something like E-Prime but instead it's a little
bit like Loglan, eh?

[https://en.wikipedia.org/wiki/E-Prime](https://en.wikipedia.org/wiki/E-Prime)

[https://en.wikipedia.org/wiki/Loglan](https://en.wikipedia.org/wiki/Loglan)

------
Animats
Bell Labs did something like this, called "FASE", in 1969.[1] Didn't go
anywhere; way too early.

[1]
[http://digitalcollections.library.cmu.edu/awweb/awarchive?ty...](http://digitalcollections.library.cmu.edu/awweb/awarchive?type=file&item=361607)

------
Koshkin
The idea is similar to one behind the Structured English QUEry Language we all
know and love.

~~~
auggierose
Only in as much that the idea is similar to most programming languages ...

------
rthomas6
Can you define new nouns and verbs? AKA objects and functions? Imagine being
able to have the specification, documentation, and actual code implementation
all be the same thing!

~~~
dragonwriter
> Can you define new nouns and verbs?

There is defined syntax for variables, but they are expressly nouns
exclusively.

------
airstrike
To be honest, I'm a bit disappointed this article isn't written in ACE

Or maybe "To be honest, I do not like that the Wikipedia editors chose not to
write this article in ACE"

~~~
TremendousJudge
Isn't it? The "Overview" section doesn't read like standard English at all. I
thought it may be ACE

~~~
pierrec
It's not. Take this sentence: " _ACE construction rules require that each noun
be introduced by a determiner (a, every, no, some, at least 5, ...)._ "

The sentence does not follow the rule it describes, since "rules" does not
have a determiner. It might be worth a try, but I suspect ACE would make the
article awkward and harder to read.

------
jgalt212
English: The Good Parts

[http://shop.oreilly.com/product/9780596517748.do](http://shop.oreilly.com/product/9780596517748.do)

------
tunesmith
If fact databases were written in this language, wouldn't it make NLP much
easier? To allow machines to more easily query fact databases and infer new
facts?

~~~
capableweb
It's basically what Datomic (and other Datalog inspired tools) do, checkout
[https://docs.datomic.com/on-
prem/architecture.html](https://docs.datomic.com/on-prem/architecture.html)

~~~
avmich
From what I see Datomic isn't written with anything resembling natural
language - not anywhere nearly ACE.

Can you give good examples to the contrary?

~~~
capableweb
I was replying especially to the "easily query fact databases " and less about
the general post about ACE. I could imagine though that you could take ACE
syntax and transform it into Datalog/Datomic queries quite easily.

------
droithomme
This seems similar to Applescript. Someone wants to make a precise language
that looks like English and can be read and written by non-programmers.
Ultimately you get the reading part, sort of, but writing is harder. You end
up with very subtle and precise rules in the grammar which are not as easily
inferred correctly as with many common programming languages. Just writing
sentences that you think should be correct won't work. You need to fully
understand the programming language. So you're back at requiring programmers
to work with it.

~~~
iainmerrick
It might be great to have tool-assisted writing, where you write naturally and
the computer says “do you mean: [pedantic unambiguous version]”.

The main risk would be people blindly accepting corrections that actually
change the meaning -- just like any other autocorrection system. I’m not sure
how to mitigate against that.

------
joaojeronimo
Newspeak!

~~~
trhway
Actually legalese comes to mind. Therein and hereto ... I mean the same
purported goal to disambiguate and precisely specify. Because of complexity of
the result it is hard to say whether that goal is achieved or not :)

