Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-4041-

High-performance safe software

Name: Anonymous 2014-12-30 13:16

So called "safe languages" are shit because they are slower than C, so you end up giving away performance. How to avoid this performance-security trade off?

Follow seL4's example.
Verify the software through formal mathematical proof using a theorem prover (such as Agda, Coq, Isabelle, etc.). This will assure that the specification of a piece of software has certain properties and, then, that a design (in C) implements a specification correctly. In recent years, it has become possible to apply formal verification directly to the code that implements the software and to show that this code has specific properties.

In other words, you get a C program (high-performance) that is mathematically shown to have no buffer overflows, null pointer exceptions, use-after-free, or anything else you designed in the theorem prover.

Name: Anonymous 2014-12-30 15:22

Nope, C is useless unverifiable shit. To be able to verify it, you have to use a restricted subset of C. Also writing up a proof of imperative shit is very hard and time-consuming.

Name: Anonymous 2014-12-30 15:45

>>2
Prove it.

Name: Anonymous 2014-12-30 16:15

>>3
Prove that it needs proof.

Name: Anonymous 2014-12-30 16:28

>>4
This is offtopic.

Name: Anonymous 2014-12-30 16:32

Name: Anonymous 2014-12-30 16:39

Name: Anonymous 2014-12-30 16:59

>>3
If C could be formally verified, Hongwei Xi wouldn't need to invent a whole new language, ATS, just to eliminate runtime array bounds checks from C.

Name: Anonymous 2014-12-30 17:06

>>8
I agree, on that basis ATS was an unnecessary invention.

Name: Anonymous 2014-12-30 17:20

>>3
It is also the only evolving formally-verified code base of the order of 10 000 lines of code and we report on maintaining it for almost a decade together with its now 480 000 lines of Isabelle proofs and specifications.
See, I told you that verifying C diarrhea is a pain in the ass. The proofs and specifications are 480 times larger than the C shitcode itself! And they probably only prove only the primitive propositions, not algorithm correctness.

Name: Anonymous 2014-12-30 17:46

Also 10,000 lines of C code aren't big enough to be an OS. BSD has 8 million, Linux has 15 million, and Hawking knows how many lines Windows has. So what they claim to have verified is not a general-purpose kernel.

Name: Anonymous 2014-12-30 19:44

>>8
He created ATS just so it was easier for programmers, but it loses performance.

http://cs-people.bu.edu/md/plpv10-danish.pdf

The human resources required for even a relatively small-scale verification are tremendous, as shown by seL4

The seL4 project is based on the family of micro-kernels known as L4 [18]. Recently, a refinement proof was completed [16] that demonstrated the adherence of a high-performance C implementation to a generated executable specification, created from a Haskell prototype, and checked in the Isabelle [21] proof assistant. The Haskell prototype is itself checked against a high-level design. One weakness is that changes made at a high-level can have rippling effects and may require the entire proof to be redone.

If the software you are writing is huge, you have really limited resources and performance isn't an issue, then languages such as ATS may do the job for you.
But there's nothing better than proven-secure C. High-performance and safety. The only trade-off: time spent on the project.

Name: Anonymous 2014-12-30 19:46

lol all these stupid 20 year olds
who the fuck do you think you are, kids? get back to your undergrad class

Name: Anonymous 2014-12-30 19:46

>>11
Microkernels are much smaller than monolithic kernels, idiot.
MINIX 3 has about 6,000 lines of executable kernel code.

Name: Anonymous 2014-12-30 19:47

Also 10,000 lines of C code aren't big enough to be an OS
nigger not know what talking about

Name: Anonymous 2014-12-30 20:41

>>11
I made a monolithic kernel in 8kLoCs.

Name: Anonymous 2014-12-30 21:19

>>16
Bloat

Name: Anonymous 2014-12-30 22:46

write code not proofs

Name: Anonymous 2014-12-30 23:37

I wrote a megalithic kernel in 738329775459637 lines of code.

Name: Anonymous 2014-12-30 23:51

>>16
Your kernel doesn't have a full set of hardware drivers like what you get in Linux or any kBSD. That's where most of the code weight goes to in a full featured monolithic kernel.

Name: Anonymous 2014-12-31 0:01

>>12
The only trade-off: time spent on the project.
Well there you go, as we all know, all programmers have all the time we need to formally prove C code because the binary code is faster oh wait... no, we don't have all that time. We use safe languages because programmer time is more expensive than computer time, it's quicker to deliver software using safe languages. We will use C when it's obvious that we need a strict account for the computer resources we need. The vast majority of application programming on high-powered general-purpose computers do not have such a requirement.

Name: Anonymous 2014-12-31 0:08

>>20
Your body doesn't have AIDS like mine. That's where most of the cell weight goes to in a full featured human body

Name: Anonymous 2014-12-31 0:11

>>21
lol, this is why corporations (capitalism) is harmful to computing progress. Computing (programming a sub-set of) is a communist, military, and individual genius sort of thing.

get fucked retard ahhahahahhahaha, if you cant outdo your computer at arithmetic (in your head of course) then you shouldn't be using it in the first place kiddo

Name: Anonymous 2014-12-31 0:18

>>22
Who are you quoting?

Name: Anonymous 2014-12-31 0:43

>>23
Sure thing buddy. Let off of us as humans, stop all business activity because anonymous considers capitalism to be harmful :^)

Name: Anonymous 2014-12-31 3:09

>>25
Awww man, you are le 4Chan! Le 4Chan! :D XD lol, i roll on floor now

Name: Anonymous 2014-12-31 4:19

>>26
XD XDDDDDD XD XDDDDDDDD

Name: Anonymous 2014-12-31 9:44

>>23
communist, military
individual genius
Contradiction.

Name: Anonymous 2014-12-31 10:02

>>14
Microkernels are not general-purpose OSs, idiot.

>>12
ATS does not lose performance. It is as fast and memory-efficient as C.

Name: Anonymous 2014-12-31 14:42

>>29
That's because a kernel is not a OS.

It is as fast and memory-efficient as C.
Does ATS know that?

Name: Cudder !MhMRSATORI 2015-01-01 6:51

This will assure that the specification of a piece of software has certain properties and, then, that a design (in C) implements a specification correctly.
And how do you prove that the specification is correct, or that the "certain properties" are what you want anyway? What, or who, defines those? Are the requirements correct or wanted? Does this software do what the users really want? Does it not oppress the users? ...? ...? What is the meaning of life?

At some point humans have to make the decisions, not the machines, and there are always going to be idiots to screw things up no matter what, so why don't we stop creating more abstract bullshite that just takes freedom and responsibility away from humans and encourages them to be even more stupid, teach people to think correctly, and take the idiots out back to be shot!

Name: Oswald Mosley 2015-01-01 7:13

>>31
bullshite
take the idiots out back to be shot!
Herr Cudder....

Name: Anonymous 2015-01-01 8:49

I've worked with formal methods in the recent past and software verification is a long ways from being useful.

Hardware verification, however... There is no excuse for buggy processors any-more.

Name: Anonymous 2015-01-01 9:09

Just use Rust.

Name: Anonymous 2015-01-01 10:27

>>31
At some point humans have to make the decisions, not the machines, and there are always going to be idiots to screw things up no matter what

Yes but programming with proofs is an excellent way to improve correctness through redundancy. First you tell the computer what your algorithm is supposed to do, then you actually code the algorithm. Knowing the intension behind your code, the compiler can double-check it and tell you if what you wrote is not exactly what you wanted. Without that proof-of-intension, the compiler has no idea what you're trying to do and so will blindly execute every instruction no matter how erroneous it is.

Name: Anonymous 2015-01-01 11:41

Last time I already tried to prove PHP can do anything when it comes to network protocols by implementing a DNS server. This time I’m doing it again with a server-side implementation of the SSH2 protocol.

You probably know SSH at least by its name. It’s a of secure telnet replacement which also allows many other things such as port forwarding, remote file management (with sftp) and more.

With PHP I could write a fully working SSH server in only 3 days.

https://web.archive.org/web/20140102104411/http://blog.magicaltux.net/2010/06/27/php-can-do-anything-what-about-some-ssh

Name: Anonymous 2015-01-01 14:29

>>33
To support your point (also, nice dubs!):

Some of our proof terms generated by tactics were gigantic (hundreds of megabytes or more) and used to regularly crash the system.

http://www.reddit.com/r/haskell/comments/2o49aw/learn_you_an_agda/cmkv9uy

Name: Anonymous 2015-01-01 14:35

>>36
PHP can do anything

Bootloader or stfu.

Name: Cudder !MhMRSATORI 2015-01-01 15:39

>>35
and tell you if what you wrote is not exactly what you wanted
That doesn't stop you from writing something that you wanted at first, but changed your mind later, etc.

"Are you sure? Are you REALLY sure? Are you sure that you're sure? Are you sure that you're sure that you're sure?" There's no end to this madness.

Name: Anonymous 2015-01-01 16:29

>>39
Yes, programming with proofs is brittle, and not good for changing design goals. And also not 100%-proof. But it still offers more assurance than unproven code. Like, if you prove that your sorting algorithm really sorts, then it will actually and honestly sort.

Name: Anonymous 2015-01-03 2:48

Someone should write a program that can check any arbitrary program to make sure that it is correct.

Name: Anonymous 2015-01-03 12:39

Someone should write a program that can check any arbitrary anus to make sure it is anus.

Name: Anonymous 2015-01-03 13:39

>>41
check_correct () {
grep -q "Rob Pike" $1 && echo correct || echo incorrect
}


>>42
check_anus () {
grep -q "Rob Pike" $1 && echo anus || echo vaginabuttsex
}

Name: Anonymous 2015-01-03 18:52

>>43
check_manliness () {
grep -q "Ted Nugent" $1 && echo man || echo woman
}

Name: Anonymous 2015-01-03 19:15

>>44
You are confused. I hope that doesn't happen often when Ted Nugent is involved, but back to the topic at hand. The "manliness" code test is Knuth's “Man or Boy Test”—http://rosettacode.org/wiki/Man_or_boy_test

Actually, I would like to see the Symta solution to this problem.

Name: Anonymous 2015-01-03 19:48

>>45
Don't you argue with my dbus-4.4, boy.

Name: Anonymous 2015-01-03 20:30

>>46'
>boy

racist opinion discarded

Name: Anonymous 2015-01-03 20:35

>>47
Optimize you are quotes.
Until then, your opinions are discarded.

Name: Anonymous 2015-01-03 22:29

>>48'
>inconsistent grammar

opinion retarded

Name: Anonymous 2015-01-04 10:56

>>49
Optimize you are quotes. I repeat: optimize you are quotes.

Name: Anonymous 2015-01-04 14:13

>>50
You keep saying that, but you don't seem to know what it means. Besides, quote optimization is broken on this board.

Don't change these.
Name: Email:
Entire Thread Thread List