2
votes
Datatypes and number representaton
Let us do 8-bit numbers, it's less writing.
The left-most bit is not the sign. It contributes $-128$ to the value. More precisely, here are the values of the bits, where bit 0 is the right-most one ...
2
votes
Can you verify the end of a function declaration through syntax analysis?
Nope,
PROCEDURE P;
BEGIN
END Q;
is syntactically valid. A BNF description cannot express the equality of the identifiers.
2
votes
Can you verify the end of a function declaration through syntax analysis?
It depends on what is meant by a syntax analyzer.
Generally, in computer science, different people often mean different things by the same term, so always consult the definition you were given.
It is ...
1
vote
Datatypes and number representaton
You may notice that the smallest value (negative) has a larger mantissa by one unit than the largest value (positive), and in total there are $2^{16}$ distinct values. These are sure signs that the ...
1
vote
Accepted
Is there any formalization of GADTs implemented in OCaml?
The first work that talks about formalizing seems to be:
Xi, Hongwei, Chiyan Chen, and Gang Chen. “Guarded Recursive Datatype Constructors.” In Proceedings of the 30th ACM SIGPLAN-SIGACT Symposium on ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
programming-languages × 976type-theory × 118
compilers × 93
functional-programming × 87
terminology × 73
semantics × 68
language-design × 51
object-oriented × 45
formal-languages × 41
lambda-calculus × 41
computability × 38
reference-request × 38
logic × 35
algorithms × 33
types-and-programming-languages × 33
turing-completeness × 31
type-checking × 31
formal-grammars × 28
typing × 25
history × 24
turing-machines × 22
syntax × 20
polymorphisms × 20
software-engineering × 18
type-inference × 18