-
Notifications
You must be signed in to change notification settings - Fork 13
Description
I read the tutorial online (rems-project.github.io/cn-tutorial) and used the exercises.zip file linked there (../getting-started/tutorials), consulting the solutions in src/examples of this repo (which I had to find independently of the online tutorial).
Installation
- The "language server" and "VSCode plugin" links don't work
Basic usage
- The new CN state files differ from the tutorial in having multiple pages. An update and a bit more explanation of state files would help.
Pointers and simple ownership
- At the end of "Resource outputs",
v1should beP - "poinbts" should be points
- "at least as good" doesn't need to be in code font
-
Block"has no meaningful output" but in CN we still writetake X = Block<T>(x)which can be confusing; perhaps clarify thatXis unconstrained or such?
Ownership of compound objects
-
cn verify exercises/transpose2.cgives:
exercises/transpose2.c:19:9: error: Pointerpneeds allocation ID
...
(UB missing short message): UB_CERB004_unspecified__pointer_addThe "needs allocation ID" error message is different than the usual "Missing resource" error we see earlier in the tutorial, and I don't see allocation IDs explained in the tutorial. I'm also wondering what the last line (with "UB missing short message") means?
Arrays and loops
- Reference page is missing the
array_shiftkeyword - Explain what is meant by a "ghost statement"
- Change "quantifier
Q" to "quantifiedQ" or "(universally) quantified variableQ" or such - Regarding
array_load.broken.cprecondition description, "between0andn" should be "between0andn - 1" - Reference page is missing the
extractkeyword - "is split into 1. ... 1. ..."
- Regarding
add_two_array.c, emphasize the need to assumei != j... - ...and perhaps explain that otherwise
split_case i == jis needed and why (perhaps unrelated to the tutorial itself: can the "Out of bounds" error message be improved when thei != jassumption is omitted?)
Defining predicates
- Reference page is missing
ptr_eqkeyword - "are,m"
- More explanation of the "better way" would be helpful
Allocating and deallocating memory
- "Prove a specification" should be "Provide a specification"
-
src/examples/slf_ref_greater.csrc/exercises/slf_ref_greater.csolution should haveP < RnotP <= R
Lists
- Reference page is missing
is_nullkeyword - "below.)" should be "below)."
-
exercises/slf_length_acc.cneeds no additional annotation (?)
Working with external lemmas
-
exercises/slf_sized_stack.cdoes not seem to need toapplyany external lemmas -
OmittingThe problem was using Z3 version 4.8.12: updating it to 4.8.14 (as recommended by the installation instructions for CN) fixed this./*@ unfold Length(...); @*/frompush,pop, ortopin the solution yields an uncaught exception (might want to make this its own issue in the CN repo)
Imperative queues
-
C.nextshould beF.next - Reference page is missing
addr_eqkeyword - Lines using
addr_eqcould use some explanation - "part of
QueuePTR" should be "part ofQueuePtr_At" - "recurive"
- "One thing you might find odd...": I find any return statements odd here. The
push.cexample works without anyreturn. It is thepop.cexample where thereturns cannot be factored out (though it looks like there is a "unified" solution refactoring the code for onereturn) - Reference page is missing
applykeyword - Reference page is missing
alloc_idkeyword - Lines using
alloc_idcould use some explanation - Occurrences of
snocin the main text should beSnocto agree with the code listings - Delete some "simply" and "simple" (these don't seem to add anything and they might make the reader feel bad if it does not seem simple)
- Is there a reason to write "sequence" rather than "list"?
-
InqQueueFBshould beQueueFB -
InqQueueAuxshould beQueueAux - "this has not been shown to be possible": is this out of date (looks like a solution is in the repo:
src/examples/queue/pop_unified.c)? - Commenting out the line in
pop.cusingalloc_idseems not to have any effect
Doubly-linked lists
- "
Imperative Queues" doesn't need to be in code font - "what other are needed": others
- "left left part": delete a "left"
- "'del.prev'": add code font
-
"Dll data structure itself""DlList data structure itself": add code font to Dll
Airport simulation
- The first of the six specification properties has an extra newline so they display as 1, 1, 2, 3, 4, 5
- "
Constantssection above": which section? - Also,
Constantsdoesn't need code font - The "solutions folder" does not seem to be linked anywhere in the online tutorial