Nevertheless, while bad reviews do make it through, I do think the editors are able to recognise them for what they are.
531 karma · joined September 22, 2009
Nevertheless, while bad reviews do make it through, I do think the editors are able to recognise them for what they are.
One recent successful large-scale verification is the CompCert C compiler. The compiler is verified relative to a formal specification of a large subset of C. This specification is in the order of <2000 lines of Coq code (see http://gallium.inria.fr/~xleroy/publi/Clight.pdf ). So it is an example of a specification that is much smaller than an implementation and that can be verified manually.
Also, there is good evidence that the specification is correct. From https://www.cs.utah.edu/~regehr/papers/pldi11-preprint.pdf :
> The striking thing about our CompCert results is that the middle- end bugs we found in all other compilers are absent. As of early 2011, the under-development version of CompCert is the only compiler we have tested for which Csmith cannot find wrong-code errors. This is not for lack of trying: we have devoted about six CPU-years to the task.
These days, the official OCaml site is quite good: http://ocaml.org/
Optimizing Indirect Memory References with milk
http://dl.acm.org/citation.cfm?id=2967948
(seems to be available without paywall)
Optimizing Indirect Memory References with milk
http://dl.acm.org/citation.cfm?id=2967948
(seems to be available without paywall)
https://en.wikipedia.org/wiki/1997%E2%80%9398_El_Ni%C3%B1o_e...
Maybe this made for a sudden increase, rather than a more gradual one.
If the simple parts are given by machines, then in general there is no canonical way of composing them into a machine for the composed program. You have to construct a new machine from the machines for the parts. An example is the sequential composition of two functions with logarithmic space usage. You cannot just use run one machine after the other, but you have to modify both machines and then build a new machine that contains them in the right way.
Of course, one may use systematic constructions to combine simple machines into more complicated ones. But this amounts to the implementation of a programming model.
That would be an answer for Haskell (though a proper one would refer to fmap), but it does not work like that in OCaml. You do know some OCaml, right?
But if it's so obvious, then you can say how it works for the following concrete example:
module type S = sig
type t
val f: t -> int
end
module F = functor (X: S) -> struct
type s = X.t * X.t
let g x = X.f x + X.f x
end
module A : S = struct
type t = float
let f x = int_of_float x
end
module B : S = struct
type t = int
let f x = 2*x
end
module X = F(A)
module Y = F(B)
How do I get from X to Y by "literally the functor"?The point is: In the ML module system there is no equivalent to fmap: (A -> B) -> (F A -> F B), i.e. the functor action on morphisms. So, functors in Haskell and OCaml are different things. If you want to claim otherwise, you'll have to make an actual argument for it.
If you want to claim a relation between OCaml functors and category-theoretic functors, then you must be able to justify your claims. Saying "functors represent functions from a module to a module. Oh hey, that sounds just like the standard definition of a functor." is just not a convincing argument.
What we have is a functor F, which would be defined as in:
module F =
functor (X: S) -> ....
If you have two modules A and B of signature S, then you can form F(A) and F(B) and these are both modules. Now where are the maps from F(A) to F(B)? Just saying "the functor" does not explain this.> Just repeating a false statement won't make it come true.
Exactly!
http://cs.stackexchange.com/questions/9769/what-is-the-relat...
Functors play very different roles in Haskell and OCaml/ML.
In Haskell, the Functor class is there to implement the functoriality of a type. If F is a functor, then one implements maps of type F A -> F B from given A -> B in a functorial way.
In ML, the term functor was chosen because they are not first-class functions, but "a level up" (much like a functor is a level up from the maps in the category that it operates on). However, if F is an ML functor, then there are no "maps" between the modules F(A) and F(B). The morphism part, which is the essence of a Functor in Haskell, is missing in ML. This is why I think that the functor terminology isn't very good in ML.
Not everything that maps one thing to another is a functor.
> No, it has the same meaning. It does not behave identically because the languages do not have identical designs.
Functors in Haskell and OCaml are different things. Haskell Functors correspond to the category-theoretic notion of a functor (a thing mapping objects to objects and morphisms to morphisms in a reasonable manner). In OCaml and ML, Functors represent parameterized modules. These are not known to correspond to category-theoretic functors in any reasonable way (and there have been proposals for category-theoretic models of the ML module system). I guess the term Functor is a bit of a misnomer in the ML-like languages.
Record update in constructors is statically checked:
type myData = MyData1 of { name : string } | MyData2 of { value : int }
let x = MyData1 { name = "hello" }
(*
* rejected:
* let y = MyData2 { x with value = 0 }
*)
let y = match x with
| MyData1 z -> failwith "todo"
| MyData2 z -> MyData2 { z with value = 0 }
And one can write: match x with
| A | B -> f1
| C -> f2https://en.wikipedia.org/wiki/Parameter_(computer_programmin...
In fact, assigning these numbers was complicated by the fact that there is no central registration data base. They started from all the local data bases and then filtered this data to remove duplicates.
Source: https://de.wikipedia.org/wiki/Steuerliche_Identifikationsnum... (sorry, German only)
"Unlike common belief there is no central administration — except for foreigners (see Central Register of Foreign Nationals (Germany)) — the resident registration is run by 5283 local offices throughout Germany."
For passports, I'd guess that there is a different database.
Remember OS/2 2.x? It could run Windows 3.x binaries, including GUI programs. The result was that noone wrote programs for OS/2. Windows programs would run both on Windows and on OS/2, so why write another one for OS/2?
Why should anyone port Linux programs to Windows now? Just write for Linux and it will work both on Windows and on Linux. So now you actually have more reason to target Linux.
https://ru.wikipedia.org/wiki/Robotron_1715
http://www.old-computers.com/MUSEUM/computer.asp?c=864&s...
To quote Bob Harper: As a consequence, using type classes is, in Greg Morrisett’s term, like steering the Queen Mary: you have to get this hulking mass pointed in the right direction so that the inference mechanism resolves things the way you want it to. [https://existentialtype.wordpress.com/2011/04/16/modules-mat...] (I think this applies most of all if one is using type classes to emulate a module system. For other purposes, type classes are quite nice.)
Maybe Backpack will solve these issues. [http://plv.mpi-sws.org/backpack/]