Merge pull request #5697 from k9mail/demo_backend

Add "demo" backend
This commit is contained in:
cketti 2021-09-28 15:28:35 +02:00 committed by GitHub
commit 799917d5b8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
31 changed files with 1025 additions and 1 deletions

View file

@ -13,6 +13,7 @@ dependencies {
implementation project(":backend:imap")
implementation project(":backend:pop3")
implementation project(":backend:webdav")
debugImplementation project(":backend:demo")
implementation "androidx.appcompat:appcompat:${versions.androidxAppCompat}"
implementation "androidx.core:core-ktx:${versions.androidxCore}"

View file

@ -0,0 +1,12 @@
package app.k9mail.dev
import org.koin.core.module.Module
import org.koin.core.scope.Scope
fun Scope.developmentBackends() = mapOf(
"demo" to get<DemoBackendFactory>()
)
fun Module.developmentModuleAdditions() {
single { DemoBackendFactory(backendStorageFactory = get()) }
}

View file

@ -0,0 +1,14 @@
package app.k9mail.dev
import app.k9mail.backend.demo.DemoBackend
import com.fsck.k9.Account
import com.fsck.k9.backend.BackendFactory
import com.fsck.k9.backend.api.Backend
import com.fsck.k9.mailstore.K9BackendStorageFactory
class DemoBackendFactory(private val backendStorageFactory: K9BackendStorageFactory) : BackendFactory {
override fun createBackend(account: Account): Backend {
val backendStorage = backendStorageFactory.createBackendStorage(account)
return DemoBackend(backendStorage)
}
}

View file

@ -1,5 +1,7 @@
package com.fsck.k9.backends
import app.k9mail.dev.developmentBackends
import app.k9mail.dev.developmentModuleAdditions
import com.fsck.k9.backend.BackendManager
import com.fsck.k9.backend.imap.BackendIdleRefreshManager
import com.fsck.k9.backend.imap.SystemAlarmManager
@ -13,7 +15,7 @@ val backendsModule = module {
"imap" to get<ImapBackendFactory>(),
"pop3" to get<Pop3BackendFactory>(),
"webdav" to get<WebDavBackendFactory>()
)
) + developmentBackends()
)
}
single {
@ -30,4 +32,6 @@ val backendsModule = module {
single<IdleRefreshManager> { BackendIdleRefreshManager(alarmManager = get()) }
single { Pop3BackendFactory(get(), get()) }
single { WebDavBackendFactory(get(), get(), get()) }
developmentModuleAdditions()
}

View file

@ -0,0 +1,9 @@
package app.k9mail.dev
import com.fsck.k9.backend.BackendFactory
import org.koin.core.module.Module
import org.koin.core.scope.Scope
fun Scope.developmentBackends() = emptyMap<String, BackendFactory>()
fun Module.developmentModuleAdditions() = Unit

View file

@ -0,0 +1,27 @@
package com.fsck.k9.ui.settings
import com.fsck.k9.mail.AuthType
import com.fsck.k9.mail.ConnectionSecurity
import com.fsck.k9.mail.ServerSettings
import com.fsck.k9.ui.ConnectionSettings
object ExtraAccountDiscovery {
@JvmStatic
fun discover(email: String): ConnectionSettings? {
return if (email.endsWith("@k9mail.example")) {
val serverSettings = ServerSettings(
type = "demo",
host = "irrelevant",
port = 23,
connectionSecurity = ConnectionSecurity.SSL_TLS_REQUIRED,
authenticationType = AuthType.AUTOMATIC,
username = "irrelevant",
password = "irrelevant",
clientCertificateAlias = null
)
ConnectionSettings(incoming = serverSettings, outgoing = serverSettings)
} else {
null
}
}
}

View file

@ -20,6 +20,7 @@ class AccountCreator(private val preferences: Preferences, private val resources
Protocols.IMAP -> DeletePolicy.ON_DELETE
Protocols.POP3 -> DeletePolicy.NEVER
Protocols.WEBDAV -> DeletePolicy.ON_DELETE
"demo" -> DeletePolicy.ON_DELETE
else -> throw AssertionError("Unhandled case: $type")
}
}

View file

@ -32,6 +32,7 @@ import com.fsck.k9.mail.ServerSettings;
import com.fsck.k9.mailstore.SpecialLocalFoldersCreator;
import com.fsck.k9.ui.R;
import com.fsck.k9.ui.ConnectionSettings;
import com.fsck.k9.ui.settings.ExtraAccountDiscovery;
import com.fsck.k9.view.ClientCertificateSpinner;
import com.fsck.k9.view.ClientCertificateSpinner.OnClientCertificateChangedListener;
import com.google.android.material.textfield.TextInputEditText;
@ -280,6 +281,12 @@ public class AccountSetupBasics extends K9Activity
String email = mEmailView.getText().toString();
ConnectionSettings extraConnectionSettings = ExtraAccountDiscovery.discover(email);
if (extraConnectionSettings != null) {
finishAutoSetup(extraConnectionSettings);
return;
}
ConnectionSettings connectionSettings = providersXmlDiscoveryDiscover(email, DiscoveryTarget.INCOMING_AND_OUTGOING);
if (connectionSettings != null) {
finishAutoSetup(connectionSettings);

View file

@ -0,0 +1,8 @@
package com.fsck.k9.ui.settings
import com.fsck.k9.ui.ConnectionSettings
object ExtraAccountDiscovery {
@JvmStatic
fun discover(email: String): ConnectionSettings? = null
}

50
backend/demo/build.gradle Normal file
View file

@ -0,0 +1,50 @@
apply plugin: 'com.android.library'
apply plugin: 'org.jetbrains.kotlin.android'
apply plugin: 'kotlin-kapt'
if (rootProject.testCoverage) {
apply plugin: 'jacoco'
}
dependencies {
api project(":backend:api")
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:${versions.kotlinCoroutines}"
implementation "com.jakewharton.timber:timber:${versions.timber}"
implementation "com.squareup.moshi:moshi:${versions.moshi}"
kapt "com.squareup.moshi:moshi-kotlin-codegen:${versions.moshi}"
testImplementation project(":mail:testing")
testImplementation "junit:junit:${versions.junit}"
testImplementation "org.mockito:mockito-core:${versions.mockito}"
testImplementation "com.google.truth:truth:${versions.truth}"
}
android {
compileSdkVersion buildConfig.compileSdk
buildToolsVersion buildConfig.buildTools
defaultConfig {
minSdkVersion buildConfig.minSdk
}
buildTypes {
debug {
testCoverageEnabled rootProject.testCoverage
}
}
lintOptions {
abortOnError false
lintConfig file("$rootProject.projectDir/config/lint/lint.xml")
}
compileOptions {
sourceCompatibility javaVersion
targetCompatibility javaVersion
}
kotlinOptions {
jvmTarget = kotlinJvmVersion
}
}

View file

@ -0,0 +1,2 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest package="app.k9mail.backend.demo" />

View file

@ -0,0 +1,211 @@
package app.k9mail.backend.demo
import com.fsck.k9.backend.api.Backend
import com.fsck.k9.backend.api.BackendFolder.MoreMessages
import com.fsck.k9.backend.api.BackendPusher
import com.fsck.k9.backend.api.BackendPusherCallback
import com.fsck.k9.backend.api.BackendStorage
import com.fsck.k9.backend.api.FolderInfo
import com.fsck.k9.backend.api.SyncConfig
import com.fsck.k9.backend.api.SyncListener
import com.fsck.k9.backend.api.updateFolders
import com.fsck.k9.mail.BodyFactory
import com.fsck.k9.mail.Flag
import com.fsck.k9.mail.FolderType
import com.fsck.k9.mail.Message
import com.fsck.k9.mail.MessageDownloadState
import com.fsck.k9.mail.Part
import com.fsck.k9.mail.internet.MimeMessage
import com.squareup.moshi.Moshi
import com.squareup.moshi.adapter
import java.io.ByteArrayInputStream
import java.io.ByteArrayOutputStream
import java.io.InputStream
import java.util.UUID
import okio.buffer
import okio.source
class DemoBackend(private val backendStorage: BackendStorage) : Backend {
private val messageStoreInfo by lazy { readMessageStoreInfo() }
override val supportsFlags: Boolean = true
override val supportsExpunge: Boolean = false
override val supportsMove: Boolean = true
override val supportsCopy: Boolean = true
override val supportsUpload: Boolean = true
override val supportsTrashFolder: Boolean = true
override val supportsSearchByDate: Boolean = false
override val isPushCapable: Boolean = false
override val isDeleteMoveToTrash: Boolean = true
override fun refreshFolderList() {
val localFolderServerIds = backendStorage.getFolderServerIds().toSet()
backendStorage.updateFolders {
val remoteFolderServerIds = messageStoreInfo.keys
val foldersServerIdsToCreate = remoteFolderServerIds - localFolderServerIds
val foldersToCreate = foldersServerIdsToCreate.mapNotNull { folderServerId ->
messageStoreInfo[folderServerId]?.let { folderData ->
FolderInfo(folderServerId, folderData.name, folderData.type)
}
}
createFolders(foldersToCreate)
val folderServerIdsToRemove = (localFolderServerIds - remoteFolderServerIds).toList()
deleteFolders(folderServerIdsToRemove)
}
}
override fun sync(folderServerId: String, syncConfig: SyncConfig, listener: SyncListener) {
listener.syncStarted(folderServerId)
val folderData = messageStoreInfo[folderServerId]
if (folderData == null) {
listener.syncFailed(folderServerId, "Folder $folderServerId doesn't exist", null)
return
}
val backendFolder = backendStorage.getFolder(folderServerId)
val localMessageServerIds = backendFolder.getMessageServerIds()
if (localMessageServerIds.isNotEmpty()) {
listener.syncFinished(folderServerId)
return
}
for (messageServerId in folderData.messageServerIds) {
val message = loadMessage(folderServerId, messageServerId)
backendFolder.saveMessage(message, MessageDownloadState.FULL)
listener.syncNewMessage(folderServerId, messageServerId, isOldMessage = false)
}
backendFolder.setMoreMessages(MoreMessages.FALSE)
listener.syncFinished(folderServerId)
}
override fun downloadMessage(syncConfig: SyncConfig, folderServerId: String, messageServerId: String) {
throw UnsupportedOperationException("not implemented")
}
override fun downloadMessageStructure(folderServerId: String, messageServerId: String) {
throw UnsupportedOperationException("not implemented")
}
override fun downloadCompleteMessage(folderServerId: String, messageServerId: String) {
throw UnsupportedOperationException("not implemented")
}
override fun setFlag(folderServerId: String, messageServerIds: List<String>, flag: Flag, newState: Boolean) = Unit
override fun markAllAsRead(folderServerId: String) = Unit
override fun expunge(folderServerId: String) {
throw UnsupportedOperationException("not implemented")
}
override fun expungeMessages(folderServerId: String, messageServerIds: List<String>) {
throw UnsupportedOperationException("not implemented")
}
override fun deleteMessages(folderServerId: String, messageServerIds: List<String>) = Unit
override fun deleteAllMessages(folderServerId: String) = Unit
override fun moveMessages(
sourceFolderServerId: String,
targetFolderServerId: String,
messageServerIds: List<String>
): Map<String, String> {
// We do just enough to simulate a successful operation on the server.
return messageServerIds.associateWith { createNewServerId() }
}
override fun moveMessagesAndMarkAsRead(
sourceFolderServerId: String,
targetFolderServerId: String,
messageServerIds: List<String>
): Map<String, String> {
// We do just enough to simulate a successful operation on the server.
return messageServerIds.associateWith { createNewServerId() }
}
override fun copyMessages(
sourceFolderServerId: String,
targetFolderServerId: String,
messageServerIds: List<String>
): Map<String, String> {
// We do just enough to simulate a successful operation on the server.
return messageServerIds.associateWith { createNewServerId() }
}
override fun search(
folderServerId: String,
query: String?,
requiredFlags: Set<Flag>?,
forbiddenFlags: Set<Flag>?,
performFullTextSearch: Boolean
): List<String> {
throw UnsupportedOperationException("not implemented")
}
override fun fetchPart(folderServerId: String, messageServerId: String, part: Part, bodyFactory: BodyFactory) {
throw UnsupportedOperationException("not implemented")
}
override fun findByMessageId(folderServerId: String, messageId: String): String? {
throw UnsupportedOperationException("not implemented")
}
override fun uploadMessage(folderServerId: String, message: Message): String {
return createNewServerId()
}
override fun checkIncomingServerSettings() = Unit
override fun checkOutgoingServerSettings() = Unit
override fun sendMessage(message: Message) {
val inboxServerId = messageStoreInfo.filterValues { it.type == FolderType.INBOX }.keys.first()
val backendFolder = backendStorage.getFolder(inboxServerId)
val newMessage = message.copy(uid = createNewServerId())
backendFolder.saveMessage(newMessage, MessageDownloadState.FULL)
}
override fun createPusher(callback: BackendPusherCallback): BackendPusher {
throw UnsupportedOperationException("not implemented")
}
private fun createNewServerId() = UUID.randomUUID().toString()
private fun Message.copy(uid: String): MimeMessage {
val outputStream = ByteArrayOutputStream()
writeTo(outputStream)
val inputStream = ByteArrayInputStream(outputStream.toByteArray())
return MimeMessage.parseMimeMessage(inputStream, false).apply {
this.uid = uid
}
}
@OptIn(ExperimentalStdlibApi::class)
private fun readMessageStoreInfo(): MessageStoreInfo {
return getResourceAsStream("/contents.json").source().buffer().use { bufferedSource ->
val moshi = Moshi.Builder().build()
val adapter = moshi.adapter<MessageStoreInfo>()
adapter.fromJson(bufferedSource)
} ?: error("Couldn't read message store info")
}
private fun loadMessage(folderServerId: String, messageServerId: String): Message {
return getResourceAsStream("/$folderServerId/$messageServerId.eml").use { inputStream ->
MimeMessage.parseMimeMessage(inputStream, false).apply {
uid = messageServerId
}
}
}
private fun getResourceAsStream(name: String): InputStream {
return DemoBackend::class.java.getResourceAsStream(name) ?: error("Resource '$name' not found")
}
}

View file

@ -0,0 +1,13 @@
package app.k9mail.backend.demo
import com.fsck.k9.mail.FolderType
import com.squareup.moshi.JsonClass
typealias MessageStoreInfo = Map<String, FolderData>
@JsonClass(generateAdapter = true)
data class FolderData(
val name: String,
val type: FolderType,
val messageServerIds: List<String>
)

View file

@ -0,0 +1,53 @@
{
"inbox": {
"name": "Inbox",
"type": "INBOX",
"messageServerIds": ["intro"]
},
"trash": {
"name": "Trash",
"type": "TRASH",
"messageServerIds": []
},
"drafts": {
"name": "Drafts",
"type": "DRAFTS",
"messageServerIds": []
},
"sent": {
"name": "Sent",
"type": "SENT",
"messageServerIds": []
},
"archive": {
"name": "Archive",
"type": "ARCHIVE",
"messageServerIds": []
},
"spam": {
"name": "Spam",
"type": "SPAM",
"messageServerIds": []
},
"turing": {
"name": "Turing Awards",
"type": "REGULAR",
"messageServerIds": [
"turing_award_1966",
"turing_award_1967",
"turing_award_1968",
"turing_award_1970",
"turing_award_1971",
"turing_award_1972",
"turing_award_1975",
"turing_award_1977",
"turing_award_1978",
"turing_award_1979",
"turing_award_1981",
"turing_award_1983",
"turing_award_1987",
"turing_award_1991",
"turing_award_1996"
]
}
}

View file

@ -0,0 +1,9 @@
MIME-Version: 1.0
From: "cketti" <cketti@k9mail.example>
Date: Thu, 23 Sep 2021 23:42:00 +0200
Message-ID: <hello-1-2-3@k9mail.example>
Subject: Welcome to K-9 Mail
To: User <user@k9mail.example>
Content-Type: text/plain; charset=UTF-8
Congratulations, you have managed to set up K-9 Mail's demo account. Have fun exploring the app.

View file

@ -0,0 +1,84 @@
MIME-Version: 1.0
From: "Alan J. Perlis" <alan.perlis@example.com>
Date: Sat, 01 Jan 1966 12:00:00 -0400
Message-ID: <turing1966@cketti.de>
Subject: The Synthesis of Algorithmic Systems
To: Alan Turing <alan@turing.example>
Content-Type: multipart/alternative; boundary=047d7b450b100959e604d85a5320
--047d7b450b100959e604d85a5320
Content-Type: text/plain; charset=UTF-8
Both knowledge and wisdom extend man's reach. Knowledge led to computers,
wisdom to chopsticks. Unfortunately our association is overinvolved with
the former. The latter will have to wait for a more sublime day.
On what does and will the fame of Turing rest? That he proved a theorem
showing that for a general computing device--later dubbed a "Turing
machine"--there existed functions which it could not compute? I doubt it.
More likely it rests on the model he invented and employed: his formal
mechanism.
This model has captured the imagination and mobilized the thoughts of a
generation of scientists. It has provided a basis for arguments leading to
theories. His model has proved so useful that its generated activity has
been distributed not only in mathematics, but through several technologies
as well. The arguments that have been employed are not always formal and
the consequent creations not all abstract.
Indeed a most fruitful consequence of the Turing machine has been with the
creation, study and computation of functions which are computable, i.e., in
computer programming. This is not surprising since computers can compute so
much more than we yet know how to specify.
I am sure that all will agree that this model has been enormously valuable.
History will forgive me for not devoting any attention in this lecture to
the effect which Turing had on the development of the general-purpose
digital computer, which has further accelerated our involvement with the
theory and practice of computation.
Since the appearance of Turing's model there have, of course, been others
which have concerned and benefited us in computing. I think, however, that
only one has had an effect as great as Turing's: the formal mechanism
called ALGOL Many will immediately disagree, pointing out that too few of
us have understood it or used it.
While such has, unhappily, been the case, it is not the point. The impulse
given by ALGOL to the development of research in computer science is
relevant while the number of adherents is not. ALGOL, too, has mobilized
our thoughts and has provided us with a basis for our arguments.
--047d7b450b100959e604d85a5320
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><div>Both knowledge and wisdom extend man&#39;s reach. Kno=
wledge led to computers, wisdom to chopsticks. Unfortunately our associatio=
n is overinvolved with the former. The latter will have to wait for a more =
sublime day.=C2=A0</div>
<div>On what does and will the fame of Turing rest? That he proved a theore=
m showing that for a general computing device--later dubbed a &quot;Turing =
machine&quot;--there existed functions which it could not compute? I doubt =
it. More likely it rests on the model he invented and employed: his formal =
mechanism.=C2=A0</div>
<div>This model has captured the imagination and mobilized the thoughts of =
a generation of scientists. It has provided a basis for arguments leading t=
o theories. His model has proved so useful that its generated activity has =
been distributed not only in mathematics, but through several technologies =
as well. The arguments that have been employed are not always formal and th=
e consequent creations not all abstract.=C2=A0</div>
<div>Indeed a most fruitful consequence of the Turing machine has been with=
the creation, study and computation of functions which are computable, i.e=
., in computer programming. This is not surprising since computers can comp=
ute so much more than we yet know how to specify.=C2=A0</div>
<div>I am sure that all will agree that this model has been enormously valu=
able. History will forgive me for not devoting any attention in this lectur=
e to the effect which Turing had on the development of the general-purpose =
digital computer, which has further accelerated our involvement with the th=
eory and practice of computation.=C2=A0</div>
<div>Since the appearance of Turing&#39;s model there have, of course, been=
others which have concerned and benefited us in computing. I think, howeve=
r, that only one has had an effect as great as Turing&#39;s: the formal mec=
hanism called ALGOL Many will immediately disagree, pointing out that too f=
ew of us have understood it or used it.=C2=A0</div>
<div>While such has, unhappily, been the case, it is not the point. The imp=
ulse given by ALGOL to the development of research in computer science is r=
elevant while the number of adherents is not. ALGOL, too, has mobilized our=
thoughts and has provided us with a basis for our arguments.=C2=A0</div>
</div>
--047d7b450b100959e604d85a5320--

View file

@ -0,0 +1,35 @@
MIME-Version: 1.0
From: "Maurice V. Wilkes" <maurice.wilkes@example.com>
Date: Wed, 30 Aug 1967 12:00:00 -0400
Message-ID: <turing1967@cketti.de>
Subject: Computers Then and Now
To: Alan Turing <alan@turing.example>
Content-Type: multipart/alternative; boundary=047d7b5d9bdd0d571a04d85aec30
--047d7b5d9bdd0d571a04d85aec30
Content-Type: text/plain; charset=UTF-8
I do not imagine that many of the Turing lecturers who will follow me will
be people who were acquainted with Alan Turing. The work on computable
numbers, for which he is famous, was published in 1936 before digital
computers existed. Later he became one of the first of a distinguished
succession of able mathematicians who have made contributions to the
computer field. He was a colorful figure in the early days of digital
computer development in England, and I would find it difficult to speak of
that period without making some references to him.
--047d7b5d9bdd0d571a04d85aec30
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><div>I do not imagine that many of the Turing lecturers wh=
o will follow me will be people who were acquainted with Alan Turing. The w=
ork on computable numbers, for which he is famous, was published in 1936 be=
fore digital computers existed. Later he became one of the first of a disti=
nguished succession of able mathematicians who have made contributions to t=
he computer field. He was a colorful figure in the early days of digital co=
mputer development in England, and I would find it difficult to speak of th=
at period without making some references to him.</div>
</div>
--047d7b5d9bdd0d571a04d85aec30--

View file

@ -0,0 +1,40 @@
MIME-Version: 1.0
From: Richard Hamming <richard.hamming@example.com>
Date: Tue, 27 Aug 1968 12:00:00 -0400
Message-ID: <turing1968@cketti.de>
Subject: One Man's View of Computer Science
To: Alan Turing <alan@turing.example>
Content-Type: multipart/alternative; boundary=089e01227b30f6f60004d85af2ae
--089e01227b30f6f60004d85af2ae
Content-Type: text/plain; charset=UTF-8
Let me begin with a few personal words. When one is notified that he has
been elected the ACM Turing lecturer for the year, he is at first
surprised--especially is the nonacademic person surprised by an ACM award.
After a little while the surprise is replaced by a feeling of pleasure.
Still later comes a feeling of "Why me?" With all that has been done and is
being done in computing, why single out me and my work? Well, I suppose
that it has to happen to someone each year, and this
time I am the lucky person. Anyway, let me thank you for the honor you have
given to me and by inference to the Bell Telephone Laboratories where I
work and which has made possible so much of what I have done.
--089e01227b30f6f60004d85af2ae
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><div>Let me begin with a few personal words. When one is n=
otified that he has been elected the ACM Turing lecturer for the year, he i=
s at first surprised--especially is the nonacademic person surprised by an =
ACM award. After a little while the surprise is replaced by a feeling of pl=
easure. Still later comes a feeling of &quot;Why me?&quot; With all that ha=
s been done and is being done in computing, why single out me and my work? =
Well, I suppose that it has to happen to someone each year, and this=C2=A0<=
/div>
<div>time I am the lucky person. Anyway, let me thank you for the honor you=
have given to me and by inference to the Bell Telephone Laboratories where=
I work and which has made possible so much of what I have done.</div></div=
>
--089e01227b30f6f60004d85af2ae--

View file

@ -0,0 +1,35 @@
MIME-Version: 1.0
From: "James H. Wilkinson" <james.wilkinson@example.com>
Date: Tue, 01 Sep 1970 12:00:00 -0400
Message-ID: <turing1970@cketti.de>
Subject: Some Comments from a Numerical Analyst
To: Alan Turing <alan@turing.example>
Content-Type: multipart/alternative; boundary=047d7b5d9bdd9697d504d85ac65f
--047d7b5d9bdd9697d504d85ac65f
Content-Type: text/plain; charset=UTF-8
When at last I recovered from the feeling of shocked elation at being
invited to give the 1970 Turing Award Lecture, I became aware that I must
indeed prepare an appropriate lecture. There appears to be a tradition that
a Turing Lecturer should decide for himself what is expected from him, and
probably for this reason previous lectures have differed considerably in
style and content. However, it was made quite clear that I was to give an
after-luncheon speech and that I would not have the benefit of an overhead
projector or a blackboard.
--047d7b5d9bdd9697d504d85ac65f
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><div>When at last I recovered from the feeling of shocked =
elation at being invited to give the 1970 Turing Award Lecture, I became aw=
are that I must indeed prepare an appropriate lecture. There appears to be =
a tradition that a Turing Lecturer should decide for himself what is expect=
ed from him, and probably for this reason previous lectures have differed c=
onsiderably in style and content. However, it was made quite clear that I w=
as to give an after-luncheon speech and that I would not have the benefit o=
f an overhead projector or a blackboard.</div>
</div>
--047d7b5d9bdd9697d504d85ac65f--

View file

@ -0,0 +1,32 @@
MIME-Version: 1.0
From: John McCarthy <john.mccarthy@example.com>
Date: Fri, 01 Jan 1971 12:00:00 -0400
Message-ID: <turing1971@cketti.de>
Subject: Generality in Artificial Intelligence
To: Alan Turing <alan@turing.example>
Content-Type: multipart/alternative; boundary=089e01030106b6942904d85ad870
--089e01030106b6942904d85ad870
Content-Type: text/plain; charset=UTF-8
Postscript
My 1971 Turing Award Lecture was entitled "Generality in Artificial
Intelligence." The topic turned out to have been overambitious in that I
discovered that I was unable to put my thoughts on the subject in a
satisfactory written form at that time. It would have been better to have
reviewed previous work rather than attempt something new, but such wasn't
my custom at that time.
--089e01030106b6942904d85ad870
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><div>Postscript</div><div>My 1971 Turing Award Lecture was=
entitled &quot;Generality in Artificial Intelligence.&quot; The topic turn=
ed out to have been overambitious in that I discovered that I was unable to=
put my thoughts on the subject in a satisfactory written form at that time=
. It would have been better to have reviewed previous work rather than atte=
mpt something new, but such wasn&#39;t my custom at that time.</div>
</div>
--089e01030106b6942904d85ad870--

View file

@ -0,0 +1,27 @@
MIME-Version: 1.0
From: "Edsger W. Dijkstra" <edsger.dijkstra@example.com>
Date: Mon, 02 Aug 1972 12:00:00 -0500
Message-ID: <turing1972@cketti.de>
Subject: The Humble Programmer
To: Alan Turing <alan@turing.example>
Content-Type: text/plain; charset=UTF-8; format=flowed
As a result of a long sequence of coincidences I entered the programming
profession officially on the first spring morning of 1952, and as far as
I have been able to trace, I was the first Dutchman to do so in my
country. In retrospect the most amazing thing is the slowness with which,
at least in my part of the world, the programming profession emerged, a
slowness which is now hard to believe. But I am grateful for two vivid
recollections from that period that establish that slowness beyond any
doubt.
After having programmed for some three years, I had a discussion with
van Wijngaarden, who was then my boss at the Mathematical Centre in
Amsterdam - a discussion for which I shall remain grateful to him
as long as I live. The point was that I was supposed to study theoretical
physics at the University of Leiden simultaneously, and as I found the
two activities harder and harder to combine, I had to make up my
mind, either to stop programming and become a real, respectable theoretical
physicist, or to carry my study of physics to a formal completion only,
with a minimum of effort, and to become..., yes what? A programmer?
But was that a respectable profession? After all, what was programming?

View file

@ -0,0 +1,30 @@
MIME-Version: 1.0
From: Allen Newell <allen.newell@example.com>
Cc: Herbert Simon <herbert.simon@example.com>
Date: Mon, 20 Oct 1975 12:00:00 -0500
Message-ID: <turing1975@cketti.de>
Subject: Computer Science as Empirical Inquiry: Symbols and Search
To: Alan Turing <alan@turing.example>
Content-Type: multipart/alternative; boundary=047d7b450b1092035304d85abf33
--047d7b450b1092035304d85abf33
Content-Type: text/plain; charset=UTF-8
Computer science is the study of the phenomena surrounding computers. The
founders of this society understood this very well when they called
themselves the Association for Computing Machinery. The machine---not just
the hardware, but the programmed, living machine--is the organism we study.
--047d7b450b1092035304d85abf33
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">Computer science is the study of the phenomena surrounding=
computers. The founders of this society understood this very well when the=
y called themselves the Association for Computing Machinery. The machine---=
not just the hardware, but the programmed, living machine--is the organism =
we study.<br>
</div>
--047d7b450b1092035304d85abf33--

View file

@ -0,0 +1,39 @@
MIME-Version: 1.0
From: "John W. Backus" <john.backus@example.com>
Date: Mon, 17 Oct 1977 12:00:00 -0700
Message-ID: <turing1977@cketti.de>
Subject: Can Programming Be Liberated from the von Neumann Style? A Functional
Style and Its Algebra of Programs
To: Alan Turing <alan@turing.example>
Content-Type: multipart/alternative; boundary=047d7b5d9bdd8a36e804d85ade47
--047d7b5d9bdd8a36e804d85ade47
Content-Type: text/plain; charset=UTF-8
Conventional programming languages are growing ever more enormous, but not
stronger. Inherent defects at the most basic level cause them to be both
fat and weak: their primitive word-at-a-time style of programming inherited
from their common ancestor--the von Neumann computer, their close coupling
of semantics to state transitions, their division of programming into a
world of expressions and a world of statements, their inability to
effectively use powerful combining forms for building new programs from
existing ones, and their lack of useful mathematical properties for
reasoning about
programs.
--047d7b5d9bdd8a36e804d85ade47
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><div>Conventional programming languages are growing ever m=
ore enormous, but not stronger. Inherent defects at the most basic level ca=
use them to be both fat and weak: their primitive word-at-a-time style of p=
rogramming inherited from their common ancestor--the von Neumann computer, =
their close coupling of semantics to state transitions, their division of p=
rogramming into a world of expressions and a world of statements, their ina=
bility to effectively use powerful combining forms for building new program=
s from existing ones, and their lack of useful mathematical properties for =
reasoning about=C2=A0</div>
<div>programs.</div></div>
--047d7b5d9bdd8a36e804d85ade47--

View file

@ -0,0 +1,36 @@
MIME-Version: 1.0
From: Robert Floyd <robert.floyd@example.com>
Date: Mon, 04 Dec 1978 12:00:00 -0500
Message-ID: <turing1978@cketti.de>
Subject: The Paradigms of Programming
To: Alan Turing <alan@turing.example>
Content-Type: multipart/alternative; boundary=089e0118419206e64304d85af860
--089e0118419206e64304d85af860
Content-Type: text/plain; charset=UTF-8
Today I want to talk about the paradigms of programming, how they affect
our success as designers of computer programs, how they should be taught,
and how they should be embodied in our programming languages.
A familiar example of a paradigm of programming is the technique of
structured programming, which appears to be the dominant paradigm in most
current treatments of programming methodology. Structured programming, as
formulated by Dijkstra, Wirth, and Parnas, among others, consists of two
phases.
--089e0118419206e64304d85af860
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><div>Today I want to talk about the paradigms of programmi=
ng, how they affect our success as designers of computer programs, how they=
should be taught, and how they should be embodied in our programming langu=
ages.=C2=A0</div>
<div>A familiar example of a paradigm of programming is the technique of st=
ructured programming, which appears to be the dominant paradigm in most cur=
rent treatments of programming methodology. Structured programming, as form=
ulated by Dijkstra, Wirth, and Parnas, among others, consists of two phases=
.=C2=A0</div>
</div>
--089e0118419206e64304d85af860--

View file

@ -0,0 +1,33 @@
MIME-Version: 1.0
From: "Kenneth E. Iverson" <kenneth.iverson@example.com>
Date: Mon, 29 Oct 1979 12:00:00 -0500
Message-ID: <turing1979@cketti.de>
Subject: Notation as a Tool of Thought
To: Alan Turing <alan@turing.example>
Content-Type: multipart/alternative; boundary=20cf30549cad76254e04d85ae4df
--20cf30549cad76254e04d85ae4df
Content-Type: text/plain; charset=UTF-8
The importance of nomenclature, notation, and language as tools of thought
has long been recognized. In chemistry and in botany, for example, the
establishment of systems of nomenclature by Lavoisier and Linnaeus did much
to stimulate and to channel later investigation. Concerning language,
George Boole in his Laws off Thought asserted "That language is an
instrument of human reason, and not merely a medium for the expression of
thought, is a truth generally admitted."
--20cf30549cad76254e04d85ae4df
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><div>The importance of nomenclature, notation, and languag=
e as tools of thought has long been recognized. In chemistry and in botany,=
for example, the establishment of systems of nomenclature by Lavoisier and=
Linnaeus did much to stimulate and to channel later investigation. Concern=
ing language, George Boole in his Laws off Thought asserted &quot;That lang=
uage is an instrument of human reason, and not merely a medium for the expr=
ession of thought, is a truth generally admitted.&quot;</div>
</div>
--20cf30549cad76254e04d85ae4df--

View file

@ -0,0 +1,51 @@
MIME-Version: 1.0
From: "Edgar F. Codd" <edgar.codd@example.com>
Date: Wed, 11 Nov 1981 12:00:00 -0800
Message-ID: <turing1981@cketti.de>
Subject: Relational Database: A Practical Foundation for Productivity
To: Alan Turing <alan@turing.example>
Content-Type: multipart/alternative; boundary=047d7bfd026c782f2404d85ab4b8
--047d7bfd026c782f2404d85ab4b8
Content-Type: text/plain; charset=UTF-8
It is well known that the growth in demands from end users for new
applications is outstripping the capability of data processing departments
to implement the corresponding application programs. There are two
complementary approaches to attacking this problem (and both approaches are
needed): one is to put end users into direct touch with the information
stored in computers; the other is to increase the productivity of data
processing professionals in the development of application programs. It is
less well known that a single technology, relational database management,
provides a practical foundation for both approaches. It is explained why
this
is so.
While developing this productivity theme, it is noted that the time has
come to draw a very sharp line between relational and non-relational
database systems, so that the label "relational" will not be used in
misleading ways.
The key to drawing this line is something called a "relational processing
capability."
--047d7bfd026c782f2404d85ab4b8
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><div>It is well known that the growth in demands from end =
users for new applications is outstripping the capability of data processin=
g departments to implement the corresponding application programs. There ar=
e two complementary approaches to attacking this problem (and both approach=
es are needed): one is to put end users into direct touch with the informat=
ion stored in computers; the other is to increase the productivity of data =
processing professionals in the development of application programs. It is =
less well known that a single technology, relational database management, p=
rovides a practical foundation for both approaches. It is explained why thi=
s=C2=A0</div>
<div><div>is so.=C2=A0</div><div>While developing this productivity theme, =
it is noted that the time has come to draw a very sharp line between relati=
onal and non-relational database systems, so that the label &quot;relationa=
l&quot; will not be used in misleading ways.=C2=A0</div>
<div>The key to drawing this line is something called a &quot;relational pr=
ocessing capability.&quot;</div></div></div>
--047d7bfd026c782f2404d85ab4b8--

View file

@ -0,0 +1,46 @@
MIME-Version: 1.0
From: Dennis Ritchie <dennis.ritchie@example.com>
Date: Mon, 24 Oct 1983 12:00:00 -0400
Message-ID: <turing1983@cketti.de>
Subject: Reflections on Software Research
To: Alan Turing <alan@turing.example>
Content-Type: multipart/alternative; boundary=bcaec54fbb2250035a04d85aabcd
--bcaec54fbb2250035a04d85aabcd
Content-Type: text/plain; charset=UTF-8
The UNIX operating system has suddenly become news, but it is not new. It
began in 1969 when Ken Thompson discovered a little-used PDP-7 computer and
set out to fashion a computing environment that he liked, His work soon
attracted me; I joined in the enterprise, though most of the ideas, and
most of the work for that matter, were his. Before long, others from our
group in the research area of AT&T Bell Laboratories were using the system;
Joe Ossanna, Doug Mcllroy, and
Bob Morris were especially enthusiastic critics and contributors, tn 1971,
we acquired a PDP-11, and by the end of that year we were supporting our
first real users: three typists entering patent applications. In 1973, the
system was rewritten in the C language, and in that year, too, it was first
described publicly at the Operating Systems Principles conference; the
resulting paper appeared in Communications of the ACM the next year.
--bcaec54fbb2250035a04d85aabcd
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><div>The UNIX operating system has suddenly become news, b=
ut it is not new. It began in 1969 when Ken Thompson discovered a little-us=
ed PDP-7 computer and set out to fashion a computing environment that he li=
ked, His work soon attracted me; I joined in the enterprise, though most of=
the ideas, and most of the work for that matter, were his. Before long, ot=
hers from our group in the research area of AT&amp;T Bell Laboratories were=
using the system; Joe Ossanna, Doug Mcllroy, and=C2=A0</div>
<div>Bob Morris were especially enthusiastic critics and contributors, tn 1=
971, we acquired a PDP-11, and by the end of that year we were supporting o=
ur first real users: three typists entering patent applications. In 1973, t=
he system was rewritten in the C language, and in that year, too, it was fi=
rst described publicly at the Operating Systems Principles conference; the =
resulting paper appeared in Communications of the ACM the next year.=C2=A0<=
/div>
</div>
--bcaec54fbb2250035a04d85aabcd--

View file

@ -0,0 +1,42 @@
MIME-Version: 1.0
From: John Cocke <john.cocke@example.com>
Date: Mon, 16 Feb 1987 12:00:00 -0600
Message-ID: <turing1987@cketti.de>
Subject: The Search for Performance in Scientific Processors
To: Alan Turing <alan@turing.example>
Content-Type: multipart/alternative; boundary=047d7bfd079665fb2c04d85ad0bc
--047d7bfd079665fb2c04d85ad0bc
Content-Type: text/plain; charset=UTF-8
I am honored and grateful to have been selected to join the ranks of ACM
Turing Award winners. I probably have spent too much of my life thinking
about computers, but I do not regret it a bit. I was fortunate to enter the
field of computing in its infancy and participate in its explosive growth.
The rapid evolution of the underlying technologies in the past 30 years has
not only provided an exciting environment, but has also presented a
constant stream of intellectual challenges to those of us trying to harness
this power and squeeze it to the last ounce. I hasten to say, especially to
the
younger members of the audience, there is no end in sight. As a matter of
fact, I believe the next thirty years will be even more exciting and rich
with challenges.
--047d7bfd079665fb2c04d85ad0bc
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><div>I am honored and grateful to have been selected to jo=
in the ranks of ACM Turing Award winners. I probably have spent too much of=
my life thinking about computers, but I do not regret it a bit. I was fort=
unate to enter the field of computing in its infancy and participate in its=
explosive growth. The rapid evolution of the underlying technologies in th=
e past 30 years has not only provided an exciting environment, but has also=
presented a constant stream of intellectual challenges to those of us tryi=
ng to harness this power and squeeze it to the last ounce. I hasten to say,=
especially to the=C2=A0</div>
<div>younger members of the audience, there is no end in sight. As a matter=
of fact, I believe the next thirty years will be even more exciting and ri=
ch with challenges.=C2=A0</div></div>
--047d7bfd079665fb2c04d85ad0bc--

View file

@ -0,0 +1,44 @@
MIME-Version: 1.0
From: Robin Milner <robin.milner@example.com>
Date: Mon, 18 Nov 1991 12:00:00 -0700
Message-ID: <turing1991@cketti.de>
Subject: Elements of Interaction
To: Alan Turing <alan@turing.example>
Content-Type: multipart/alternative; boundary=047d7b86e6de64aecb04d85affff
--047d7b86e6de64aecb04d85affff
Content-Type: text/plain; charset=UTF-8
I am greatly honored to receive this award, bearing the name of Alan
Turing. Perhaps Turing would be pleased that it should go to someone
educated at his old college, King's College at Cambridge. While there in
1956 I wrote my first computer program; it was on the EDSAC. Of course
EDSAC made history. But I am ashamed to say it did not lure me into
computing, and I ignored computers for four years. In 1960 I thought that
computers might be more peaceful to handle than schoolchildren--I was then
a teacher--so I applied for a job at Ferranti in London, at the time of
Pegasus. I was asked at the interview whether I would like to devote my
life to computers. This daunting notion had never crossed my mind. Well,
here I am still, and I have had the lucky chance to grow alongside computer
science.
--047d7b86e6de64aecb04d85affff
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><div>I am greatly honored to receive this award, bearing t=
he name of Alan Turing. Perhaps Turing would be pleased that it should go t=
o someone educated at his old college, King&#39;s College at Cambridge. Whi=
le there in 1956 I wrote my first computer program; it was on the EDSAC. Of=
course EDSAC made history. But I am ashamed to say it did not lure me into=
computing, and I ignored computers for four years. In 1960 I thought that =
computers might be more peaceful to handle than schoolchildren--I was then =
a teacher--so I applied for a job at Ferranti in London, at the time of=C2=
=A0</div>
<div>Pegasus. I was asked at the interview whether I would like to devote m=
y life to computers. This daunting notion had never crossed my mind. Well, =
here I am still, and I have had the lucky chance to grow alongside computer=
science.</div>
</div>
--047d7b86e6de64aecb04d85affff--

View file

@ -0,0 +1,28 @@
MIME-Version: 1.0
From: Amir Pnueli <amir.pnueli@example.com>
Date: Thu, 15 Feb 1996 12:00:00 -0500
Message-ID: <turing1996@cketti.de>
Subject: Verification Engineering: A Future Profession
To: Alan Turing <alan@turing.example>
Content-Type: multipart/alternative; boundary=bcaec54fbb222acf6704d85aa523
--bcaec54fbb222acf6704d85aa523
Content-Type: text/plain; charset=UTF-8
It is time that formal verification (of both software and hardware systems)
be demoted from an art practiced by the enlightened few to an activity
routinely and mundanely performed by a cadre of Verification Engineers (a
new profession), as a standard part of the system development process.
--bcaec54fbb222acf6704d85aa523
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><div>It is time that formal verification (of both software=
and hardware systems) be demoted from an art practiced by the enlightened =
few to an activity routinely and mundanely performed by a cadre of Verifica=
tion Engineers (a new profession), as a standard part of the system develop=
ment process.</div>
</div>
--bcaec54fbb222acf6704d85aa523--

View file

@ -22,4 +22,5 @@ include ':backend:imap'
include ':backend:pop3'
include ':backend:webdav'
include ':backend:jmap'
include ':backend:demo'
include ':plugins:openpgp-api-lib:openpgp-api'