Our suite of Ethereum security tools
blog.trailofbits.com
blog.trailofbits.com
I don't know, how about Cobol? I'm serious, that was designed as business language at least.
Serpent and LLL are apparently lower-level than Solidity.
https://steemit.com/ethereum/@balzss/the-many-languages-of-e...
Or someone could add some analysis stages to the solidity compiler since all the information you need is floating around the web in various papers -- actually spent a good part of the last week reading about abstracting abstract machines and static analysis for my next investigative coding project when I quit being lazy.
A lot of dev's avoid dynamic allocation altogether, because of the issues you can face:
* Integer overflow
* Buffer overflow
* Free does not mean freed memory. It means freed memory at some point in the future.
If you want something safe, time-tested and performant for business logic, then something like Ada would be a better fit.
If you don't mind the safety problems, then just about nothing beats out FORTRAN in the numbers game. (Though the memory pitfalls are huge). It was one of COBOL's main competitors, and half of the world's banking infrastructure still runs on it.
https://en.wikipedia.org/wiki/SPARK_(programming_language)
https://www.amazon.com/Building-High-Integrity-Applications-...
Note: The book is designed for people without formal methods background. I can't say how easy or not it will be since I just got it. :)
Are we there yet? 20 Years of Industrial Theorem Proving with SPARK
https://proteancode.com/keynote.pdf
IRONSIDES DNS illustrates it can handle bigger problems
http://ironsides.martincarlisle.com
Frama-C and SPARK both build on Why3 platform with its intermediate language WhyML. Work built on any of these three can usually be ported to the others. So, I'll drop a recent example in Frama-C that's really math heavy with a style amenable to high automation.
The VM should be protected against integer overflows and functions should be protected by default, I don't really get those design choices.
Whatever the original reasons were, it is certainly time for better tooling.
(1 | 0 < 1)
evaluates to False in python as well.Is it evaluated liked (1 | (0 < 1)) or like ((1 | 0) < 1).
C and Javascript have the former order, Java, Ruby, and Python have the latter order.
There is only a single bitwise OR here, and no logical ORs. Whether they are evaluated left to right or right to left makes no difference in the execution of this expression.
Swap it left and right:
(1 > 0 | 1)
And you'll see that C still gives you 1, and Python still gives you False.>we have something that is not False ORed with True
No. We have (in the original Python equation) 1 ORed with 0. That results in 1. Then that resultant 1 is compared ('<') with 1. That comparison results in False .
The difference between Python and C is that in Python '|' has higher precedence than '<', but in C '<' has higher precedence than '|'. Dennis Ritchie admits that this is a mistake in the C language[1]. Python (and Solidity) have corrected that mistake.
The reason that '|' should have higher precedence than '<' is the same reason that '+' should have higher precedence than '<'. Namely, people want to do arithmetic calculations ('|' and '+') then compare the result of those calculations ('<' and '=='). There is essentially no situation where it is useful to have '<' have higher precedence than '|'.
[1] https://stackoverflow.com/questions/4685072/operator-precede...
And because some languages miss a boolean type, you can't deduce if 1 was because of the bitwise or operator or the less-than operator.
Let's take a look at (2 | 0 < 1) instead.
C and JavaScript result in 3.
Ruby and Python return False.
Java throws a compilation error: error: bad operand types for binary operator '|'. first type: int, second type: boolean
Now which of these behaviours is the one that is the universal right one? (Hint: no one, you should always know the rules of the language you program in or if you don't, just throw in some parentheses to be on the safe side)
This is probably one of the most exciting paradigm shifts in recent times, being able to call services / functions that are cryptographically verified is an incredibly powerful tool, and may one day become a standard part of the web stack. There is still a long way to go, but what a time to get involved!
Hell, even in an offensive sense it makes sense. https://anee.me/solving-a-simple-crackme-using-z3-68c55af7f7...
When I'm looking for formally methods, a package.json is a bad sign.