Repository navigation
Expand file tree
/
Copy pathissues.txt
More file actions
75 lines (56 loc) · 2.99 KB
/
Copy pathissues.txt
File metadata and controls
75 lines (56 loc) · 2.99 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
x={
rel win(board)
case
some(col in math.range(0,2))
debug(col)
case
true
piece!=' '
}
//Parse error at 4:4: Unexpected token (expected NEWLINE)
//only occur on case+table container
function + for mechanics
sp.start(16,{
update=update
draw=draw
},state)
//Parse error at 28:6: Expected term
in tree.ls: [Tree] still written [fc_Tree]
---solved---
Core IR is not yet a backend boundary: expressions, fields, indexes, tables, and arithmetic are still lowered during Prolog emission.
Name resolution still infers bindings from spelling during capture analysis instead of marking references local/captured/global/builtin.
Protocol method bodies support opt-in debug postconditions on typed views, as described below.
V2 imported constructors/protocols await the multi-file interface resolver; `new T` currently proves `T.new` only for visible table definitions.
`some` semantics: `some(value in collection) goal` is an existential iterator.
It tries `goal` for every collection item and succeeds once for every matching
item; it fails only when no item matches. It does not carry loop state or
produce a loop-result value. Thus a successful `some` program evaluated with
no requested exports returns `[]`, which means success with no bindings, not
failure. Use `for` when iteration must carry state forward.
- Implemented: known incompatible `is` tests (such as move is Number) and
missing fields in known literal tables now report static errors.
Protocol behavioral checking is restored for debug mode (`cosmos -d -l program`,
or `nb_setval(cosmos_debug_contracts,true)` in Prolog). `o is Moving` checks
interface/type conformance only, in every mode. Calls through typed protocol
views check protocol bodies after successful execution in debug mode only.
Bodies run once on copied arguments/captures; failure raises
cosmos_protocol_behavior, exceptions propagate, and external effects remain.
`rel read(Out Number result) true` is accepted and its condition always passes.
`Relation Number read` remains the body-free type-declaration form.
Still on hold: stronger behavioral verification, effect isolation, and checks
of failed executions or all behavioral alternatives. Structural `is`
conformance must remain separate from per-call behavioral checking.
Remaining interface limitation: runtime conformance checks field types and
method arity, but does not inspect closure parameter type/mode annotations;
those signatures are compared statically only for known method definitions.
Error messages:
- cosmos -l test5
> false
update=object.update //'field X does not exist in table T' existence Error
- t = { 'new'=new }
Parse error at 27:2: Unexpected token (expected ID) //'new is a reserved token'
Implemented: malformed bare `new` expressions report that `new` is a reserved
keyword for `new Type(...)`, at the offending token. Quoted 'new' field keys
and named constructor methods remain valid.
- dependency on src/ and canvas/
error message when program returns false, currently nothing is said, do try-catch on main/1