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 ...
Andrej Bauer's user avatar
  • 29.9k
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.
Yves Daoust's user avatar
  • 10.3k
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 ...
reinierpost's user avatar
  • 5,349
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 ...
Yves Daoust's user avatar
  • 10.3k
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 ...
Apoorv's user avatar
  • 659

Only top scored, non community-wiki answers of a minimum length are eligible