-
Notifications
You must be signed in to change notification settings - Fork 6
/
TODO
1078 lines (999 loc) · 52.2 KB
/
TODO
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
LOTS TO WORK ON
---------------
Languages are complicated...
-----------------------------------------------------------------------------
NEW ISSUES
These are new issues identified but not entered into the outstanding bug list
-----------------------------------------------------------------------------
Priority Issues (Fix These First)
---------------------------------
- ongoing major rework
- conversion of error message to give additional context
- messages in present or past tense not both
- search for appropriate remedies
- qp() - quiet mode capitalize first - and subjectNotes in err()
- bash compatibility audit
- coverage tests of recent changes
- an exception was raised that, when it finally was received at the
top level, had lost the message. This occurred in the washed_blocked
script. It may be difficult to reproduce and determine the cause.
- upgrade SDL
- need to upgrade to 2.0
- need to fix pointer issues to SDL/OpenGL structures
- proper error messages should be provided on unavailable
functions
- exceptions are not propogating in wash_blocked SSDS script to the
main program exception handler. exceptions.exception_info is empty.
- test for pragma restriction( no_prompt_history )...may be difficult
- universal typeless loses its properties when a custom type or subtype
is derived from it
- ??? especially on Raspian Linux. scanner.communications updated but there
may be other references.
- check shell dollar expansion escaping for security
- ubuntu container failing because l10n constants are not defined (they
are defined in a regular ubuntu install)
- in `find ... \; ;` it becomes ; ; - is this correct?
- memory leak tests - check to make sure that resources are being cleared
- check the end-of-block usage checks and error messages
- check each of the SDLC modes
- review non-block tests
- tests for ada 95 and strings package csv_field, csv_replace, field, is_slashed_date, is_typo_of, mktemp, split, to_base64, to_escaped, to_hexadecimal_digits, to_json
- negative tests for l10n package
- box <> allowed in case when conditions needs negative tests
- doubly linked lists parameters tests needed
- ada vectors
- complete extended subprograms (if time)
- tests - subtypes, arrays (out param), universals
- append/prepend to a vector (Ada naming convention) vs. an Element - mine usage and ada conflicts with each other (I think Ada is probably wrong.)
- check handling of vectors of vectors, maps of maps, etc.
- check enumerated vector index (it's a "TODO")
- can I simulate a cursor for the wrong vector, raising an exception like ada?
- "?" and vector for quick table display?
- multi-case
- case in negative tests, type cast, refactor out idents with PareAssignment
- static case and support multi-case
- should <> box be replaced with *, since it's a standard and box does not
otherwise exist in SparForte?
- <> box statement negative tests
- business process block that only supports case in (do this after vectors)
- with separate policy, with separate configuration, with separate process in addition to normal with separate to load such things from non-standard locations
- with separate policy, with separate configuration, with separate process in addition to normal with separate
- modernizing and securing console messages
- checking error display rewrite
- security testing
- I should write tests that validate we're escaping
- the error pointer arithmetic in getCommandLine assumes a 195
character for UTF-8 but this may not always be true. UTF-8 character
counting should be more accurate
- review toEscape use for foreign characters
- the general need of better handling of variants of unbounded
strings and ambiguity over string functions
- UTF-8 handling needs to be rethought to support multibyte
characters
- templates
- templates that are not for HTTP
- check btree/hash_io get next mark the variable as written
with the constant check
- investigate "return value" (result_value_str) vs world.adb "return result for" and ensure they are consistent throughout sparforte.
- affirms report the error location in the affirm but loses context for
where in the code the affirm was triggered
- pragma todo
- these do not appear in help output when in include files
- ada hash map support
- creating cursors as out parameter on hashed_maps.find
- check handling of universal types and hashed_maps
- should insert be converted to insert and mark
- arrays of containers
- array elements of vectors / doubly / hashed_maps and their cursors and
handling in the various package subprograms
- if cannot be done, at least provide an appropriate error when it is attempted
- errors should support err_previous
- logs package - whether or not something should be escallated
to an "error" severity based on appearence of common stop words
in the message (SecTor)
- perhaps an option for adding stop words for different languages
or a set of pre-defined stop words
- better expected token messages
- ada95 solution recommendations. these might benefit from the better expected messages
- declaration locations, useful on declared but not used errors...where was it declared?
- type checking does not have the advanced error messages
- replace all uses of deprecated expect()
- how can design mode be improved to assist with producing design diagrams? translating
things into design diagrams is a costly part of design.
- graphviz / .dot generation?
- refactor source code treasury index page
- record field identifiers erros in a record definition are reported as
"shell words" for string or numeric literals but should not be. record
type declarations have nothing to do will the Bourne shell features.
- check on use of gen parameter functions vs. numeric in dht package
- in out parameters for built-in subprograms should use references
- check for TODO's
- Beader: that variables with same spelling but different cases should be an error
- provision script should search for the EPEL RPM version, not be hard-coded
- templates
- templates that are not for HTTP
- procedure vs function
- check detection for return value and procedures: an enclosing function
could fool a procedure call into thinking a return statement can have
a return value (which never gets used). We'll need to do some redesign
work to solve this.
- bug
- ^-^ In primes, the end of the statement expects ';' where primes is
a variable in assignment...is incorrect. At least, it should be
"in primes assigment". It is difficult to tell you are in an
assignment, as the procedures are designed.
- bug: logging is showing duplicate lines?
- cd should better distinguish between AdaScript and shell parameters.
the ~ normally does not expand when in double quotes but it may
expand anyway because old_cd() does not distinguish if the parameters
are shell-style.
- on errors of identifiers, display declaration line with the comment
- get_line and GNU readline autocomplete options from a user's array
- SparForte should scan for hard-coded passwords and encrypted secrets
- shell ulimit built-in
- include an option to timeout a script if it runs too long
- separate subprograms need parameter verification like other forward
specifications, or the two should be harmonized to work the same way
- locations (on declared but not used errors)
- how can design mode be improved to assist with design diagrams? perhaps
a simple left-justified tree of the program like the shell tree command
showing the program components and design notes or documentation? One
of the problem with design is keeping the documentation up-to-date.
- redesign source code treasury index page
- update examples with recent changes to SparForte (e.g. affirm clauses)
- update REPL on website
- check pascal's changes for supporting graphic environments
- unifying the language I/O and do not rely on Ada.Text_IO.
- fix some of the issues with opengl support
- shell source code review
- fix signal handling
- add ctrl-c to pause / fg / bg commmands to SparForte, and maybe job control?
- shell parser rewrite
- ls("-l") | wc -l does not work (legacy compiler issue) but the
opposite works.
- updating adascript shell commands to correspond with bourne shell changes.
- anything to be done?
- completions
- drill-down on empty directories probably not working
- fazing out ada.text_io for SparForte's functions to eliminate device
errors.
- manual test cases - can HTML be embedded as CDATA in junit xml?
- incomplete casting tests
- Research: for web to be secure, you can output raw strings to the console.
Can this be enforced in templates?
- SQL security
- LIKE requires parsing to understand the quote context. A quoted
string following a LIKE must be escaped differently.
- check %, \, _, [ must be escaped, but it depends on the engine
- postgresql is more complicated
- has "SIMILAR TO" (regex)
- has ~ regex operators
- Fix: testing validator project I noticed
- under some conditions, the breakout prompt my have end-of-file and be
interpreted as a return to resume execution. I have not identified what
those conditions are.
* Verify: waitToReveal sometimes throws an unexpected exception
- Verify: raise in one of my exception handlers in SSDS did not function properly...
investigate what happened.
- the new type qualifiers system and renaming
- Verify: disabling qualifiers when tests are underway and special regression
tests for the same. (tests)
- Research: should subprogram parameters allow qualifiers?
- Research: affirm blocks
- Research: test if HTML escaping can be implemented in an affirm block
- Research: should affirm blocks have an expression short-form?
- Research: should affirm blocks have storage specifications?
- Research: move DoContracts to parser_aux?
- Research: constant limited?
- New: copy of aggregates and renamings
- New: copying arrays
- New: copying records
- New: full copy of arrays and records
- New: document new keyword copying
- Research: was wasWritten obsolete with writtenByThread?
- Verify: the affect of renamings?
- Verify: this probably need to be run-time
- unstructured scripts
- Docs: additional examples to be added to automated tests
- Refactor: static expressions
- Refactor: in out parameters should return references
- why are in out parameters not references? e.g. in mysqlm and dbm, should
arrays of database connections be possible?
- Change: csv support
- Change: csv_replace - single quote, cr+lf ending
- Research: enforcing strong types and/or contracts
- Research: should import require contracts rather than custom type?
- unsorted/misc
- mysql.prepare function not implemented (proc is)
- Verify: check that x : arraytype := (x) works correctly, both with specs
and normal declaration.
- Verify: finish manual test pragmas
- Change: generally, we need to identify built-in types. It's not enough that
they are descended from universals. We need to understand what a
base type is. That is, the difference from a standard package type.
- Verify: an early return from the main program doesn't pull the final block,
even if the template isn't parsed.
- Fix: control-c is propogating to all child processes when it shouldn't
- check SIGPIPE handling also
- Research: btree_io.cursor should have the key type assigned when declared. Why did
I choose not to? What's the reason?
- Research: pragma risk_tolerance(amt) or pragma optimize( reliability )
- perhaps optimize is too simplistic: these need to be ranked/rated
(like pragma emphasize/deemphasize).
- forcing static side-effect checking
- Research: spell checking comments (as Windows does?) must whitelist all
identifiers. See /usr/include/aspell.h for interface to spell checker.
- Verify: a variable not declared is said to be declared but not used (this_run_on in
ssds project) - could not duplicate in simple test
- Research: is close_on_exec useful?
- SDL 2.0
- requires major rewrites, no backwards compatibility
- http://wiki.libsdl.org/MigrationGuide
Annoyances / Bugs with Workarounds / Updates
--------------------------------------------
- less command issues
- e.g. less a file. The arrow keys work. TERM is correct.
- eg. run spar then less a file. The arrow keys do not work. TERM is
correct.
- but the MORE command does work.
- tput reset does not help
- I don't change the Linux tty settings unless I do an inkey()
- I am not certain of the cause
- "unable to open script file ' /usr/bin/lesspipe src/parser.adb' : file not found" error on less during an interactive session?
- less seems to run spar after it starts.
- when displaying error message in templates, using comments may not
be enough to stop injecting bad data...perhaps, for example, the
error happens in q quoted string. It is necessary to escape the
error message as appropriate to the context of the template
document
- check json escaping with templates - json has no comments
so special chars must be escaped
- colour does not always switch back to the correct colour (i.e. bright
white may revert to dim white after showing help index)
- it may be impossible but setting the colour to bright what by default
may be a partial solution
- cache the prompt script byte code to speed up prompt drawing
- embedded sql - returning sql select in % (as JSON?) or by `..`?
- constant spec negative tests
- array constant specifications
- array foo referencing another foo during initialization (confirm)
- likewise records
- design
- design affinities - should work on branches of the file include tree
- handling confidential/PII data
- pragma secure_mode
- all data types assumed to have secure data
- pragma public( var ) or similar to whitelist it
- output channels must be whitelisted to use confidential data types
- should this be generalized so there can be different sets of data
and related channels?
- add annotate/categories to example programs representing the example groupings
they belong to
- attaching comments to declarations so the comments can be parsed and displayed
by the language. This is to make configuration and debugging easier.
- problem extracting byte code for blocks (copying whole lines)
- doubly linked lists ought to automatically JSON encode aggregates, like
btree_io does.?
- if you bungle "end record", the fields remain declared
=> type r is record i : integer; end x;
(error)
=> type r is record i : integer; end record;
^ already declared r.i
- the search with same name problem
procedure p is
x : integer := 5;
procedure put_x is
begin
? x;
end put_x;
procedure inner is
x : string := "inner";
begin
put_x;
-- puts "inner", not 5, as there is a new x that overshadows the
-- x of the definition. Would "overriding" help? Or change when/how
-- identifiers are handled at compile time.
end inner;
end outer;
- btree_io/hash_io
- negative test btree_io.replace with cursor
- negative test to ensure subprogram exceptions are not lost to parent
- json decode backslash good regression tests
- relative paths not working with bdb environments...research
- option to throw an exception on missing values (including replace, get, add (existing value)
- memcache/memcache.highread
- update design to use new resource system
- memecache.new_cluster and sister function cannot return a value
if resource using types are limited
- exceptions
- what are semantics of throwing an exception in a subscript `...`
- exceptions that propogate to the top aren't formatted properly in the
Apache log (single chars means single lines)
- should create a report on process resources using getrusage(2). Also will
need this for memory leak tests (though there are command line ways of
doing this).
- pragmas
- can't declare two licenses or software_models. This is a problem for a
redistributable library
- check double pragma import - test case
- unit testing and teamwork
- restricted shell tests
- xUnit support for tests (pragma test_result - output in JUNIT format?)
- records
- if constant records/arrays are allowed,they should have static expressions
during declaration assignments.
- strings
- some string functions have string, not universal_string, parameters, which
means parameters often must be typecast. Probably they should be universal
types.
- strings.index is pretty useless without a position paramter. Can we enhance
it?
- strings functions could be improved. (request by CY)
- dir ops
- can we add a parameter to disable returning "." and "..", which require
special handling in the majority of cases (because they are not needed)?
- graphics and sound
- SDL - hardware accelleration not working with ...why not?
- SDL needs to be upgraded for version 2.0
- type system
- constant records are permitted but the fields are variables...the fields should all be constants
- build system
- David B wants me to bring back SparForte shared library
- shared library calling mechanism and integration with other languages
- procedures can't return values is a run-time check, but should be a
compile-time check. Do we need to record the type of current block in a
scanner variable so the parser has a context to know what is allowed?
Lua's approach to being called by another language:
http://queue.acm.org/detail.cfm?id=1983083
Java uses JNI
http://en.wikipedia.org/wiki/Java_Native_Interface
http://home.pacifier.com/~mmead/jni/cs510ajp/example_details.html
http://download.oracle.com/javase/6/docs/technotes/guides/jni/spec/intro.html#wp9502
- you can call java from c using standard calls
- search for a class, load a method, run it
- http://en.wikipedia.org/wiki/Java_Native_Interface
- http://www.ibm.com/developerworks/java/library/j-jni/index.html
- business shell, though, only imports variables right now
- shell
- substring substitutions not implemented yet: ${#}, ${%}
- windows size change is not refreshing the terminal settings?
- unsorted/misc
- err_tokenize doesn't indent properly (e.g. s := `xxx - missing backquote)
- spitbol support
- http://www.dmitry-kazakov.de/match/match.htm
- text_io's get requires a file but shouldn't, or docs should be updated
- case..is doesn't accept an array element like a(i)
- control-z handling - fork, send a sleep signal and reset scanner
- get_line on an out mode file gives bad file descriptor but needs a better
error message
- function f(p), p should not be 'already exists' if there is a p in scope
- change pegasock to use bdb format exceptions with filename in message?
- check pragma block with @
- @ for a(x) gives an unexpected exception
- Apache doesn't allow command paramenters for running CGI scripts. There
should be an easy way to set the SDLC mode configuration without command
parameters or hard-coding in the shebang.
- Ada-compatible space in front of numbers should be pragma ada_95 because
it's annoying throwback to line printers...but every conversion of a
number would have to take into account adding/removing a space.
- verify type checking not in executable parts so is done at compile-time
- after running one of my scripts, the less command doesn't work
properly, suggesting that some characteristic of the terminal
was not restored properly
- in some edge cases, you can invoke procedures before they are declared.
As Spar reads the code, it treats the procedure call as a shell
command (unless no_external_commands is specified). This is caught in
test mode, but should be caught in development mode but how do you
do that? Perhaps a list of all simple shell commands executed and
compare new procedures against those names (CY).
Nice to Haves / Missing Functionality
-------------------------------------
- strings.uuid - UUID support
- https://datatracker.ietf.org/doc/html/rfc4122.html
- restrictions on loading
- a pragma that prevents a script from loading when certain
criteria is not met such as
- memory
- disk space
- a system that identifies deprecated or vulnerable packages
and refuses to load them
- foreach
- in PHP, foreach returns a pointer to the items, not a copy.
- Java-style monitor
- a restricted shell should prohibit certain Linux command names like "nc"
(netcat) due to security, reading /etc/passwd, etc.
- programming-by-contract
- optimizations - mark places in type tree where we know there's no need to
search further for contracts.
- overriding renamings
- require overriding on renamings of same identifier name but in different scope?
- this requires a new function to check for pre-exisiting names in a different
scope. It will need to apply to all variable declarations.
- maybe just elsif identifiers( token ).kind = new_t or identifiers( token ).deleted then
- in python,files are opened like a declaration so they close automatically
at end-of-block. Can I do something similar?
- refactor
- parser_tio globals should be put in a separate package, or a different
package, to help reduce circular dependencies
- memcache/memcache.highread
- update functionality to handle records, arrays, etc. like btree_io
- element as an alias for "get" in memcache, etc.
- generic types
- subtypes of generic types
- user-defined packages
- should packages support versioning (e.g. Composer/Cargo/NPM). Should
the language deal with expected versions with configuration block
pragmas? Should I deal with this at all?
- package specifications should be renames, not forwards, since they
can have their qualities modified on export (abstract, limited, constant)
.. can that work?
- should there be an option to reload a package on a filesystem change? or
is this not the responsibility of the programming language? that is,
is it a service that needs to be stopped and restarted by an orchestration
program, in a controlled way if there is a cluster with the script?
- should loadable files have keyword/tag requirements to denote architectural
concerns
- i.e. tag a file is compatible with containers/jails, or not horizontally
scalable, not public facing, etc.
- affirms can be thought of as a specific case of "triggers" on a variable.
Are their other triggers that can be defined?
- pragmas
- distinguish types of pragmas, to later separate by block or context
- a pragma to check for the version of SparForte? Is it a doc pragma,
executable or both?
- pragma no_bourne_shell
- pragma no_universal_types
- pragma import( rest, function, "url" )
- define something to be called by REST protocol. (What to do about HTTPS?)
- pragma restriction is too restrictive. If the goal is to migrate
designs, we need levels of restrictions. For example, pragma
pending_restriction( x ), similar to pragma deprecated, which is
an error if x is used in the design phase only, and a warning in
the development phase.
- a way for archictural exceptions to be recorded, audited...i.e. with
team member that OK'ed it.
- pragma depreciated should be a list, not a string.
- review and improve help command reports for producing system audit reports. Are they complete? Usable? Any rsh restrictions needed? For example, we need a software_model report.
- while we want to default to security, we also want not to be overly restrictive with pragma restriction in general. We should probably default to secure and add exceptions...how would i code that?
- probably need a security pragma and not relying on rsh = security
- should disallow access to certain files or directories like /etc/password by
default, unless security pragma allows otherwise. This is similar to Java's
Security Manager.
- while URL's can be aliased, paste-bin URLs should not appear in strings.
However, should we be doing this type of malware filtering?
- pragma deprecated is designed for scripts, but there is no way to deprecate
subprograms, types, etc. In general, I need to expand end-of-life
and migration features.
- teams package should be redesigned so team members can be more easily
used with pragmas (that is, team member info should be available at
syntax-check time)
- user role blocks
- configuration/policy/project <name> ... is separate (not with separate, which isn't
as specific)
- more separation of concerns
- with configuration
- with policy
- with project
- project block
- QA concerns?
- some way to determine if a configuration/policy/project should have been loaded.
perhaps an architectural pragma for same.
- unit testing and teamwork
- "status board" generation option for oustanding/in-progress work
- burndown charts option?
- review Test concept...what other requirements are missing?
- tinyserve
- close tinyserve if open
- complete tinyserve package
- epoll_ Linux commands and threads to scale
- see libuv
- see node.js talk https://www.youtube.com/watch?v=P9csgxBgaZ8&t=1186
- strings package
- blocks should probably be inside isExecutingCommand if's
- os package
- process id
- record constant specifications
- case of record specifcation for foo referencing an older foo variable
during assignment of initial values
- types and expressions
- type is new (record type) not yet implemented.
- private qualifier means copy-only on assignment...but aggregates
currently cannot be assigned to or copied so private hasn't been
implemented yet.
- return arrays and records in expressions (requires records revamp)
-- in mode records should be supported (but first require records
(in expressions.
- allow users to create their own universal types
- record system refactor (in prep for aggregate expressions)
- thoughts on user-defined universals
- some features are looking for root storage types, but these are currently
equivalent to the built-in universals.
- since aggregates have no common structure, the type contained in a
universal variable should be the type of the value being assigned. This
is, in essence, polymorphism.
- should variables change type automatically or be declared as polymorphic?
- should the notion of extension be reversed? In Ada, types are about
applying restrictions. Would it make sense to have the root type to be
the broadest type. e.g. "type ... withOUT record x : integer..." to
make storage items hidden/off-limits as opposed to adding new fields?
- templates
- need template package to set return HTTP status
- strings
- more validation functions
- build system
- dynamic loadable built-in packages
- fuzz testing (i.e. oss fuzz) - testing for vulnerabilities with random data
- memory leak testing
- packages
- new vector or game math package (quads, etc).
- how can we enhance packages? Should a "service" be a collection of packages?
- unsorted/misc
- The GPS IDE needs a .gpr project file to build SparForte, but I am using
standard C Makefiles.
- should using too many built-in types in a formal script produce a style error?
- support for literals in different bases
- syntax check on templates, -e commands, policies, profiles
- update dynamic_hash_table functionality to handle records, arrays, etc. like btree_io
- standardize get_first as first, etc.
- safety check that a file cannot include itself
- redundancy and ways of handing command line option
- enums.last is slow...should be updated for namespaces to improve speed
- built-in cache - memory or disk?
- redesign is_writable, etc. so works better.
- raise [when]
- infinite loop detection - when variables in loop expression are not assigned
to - this may be tricky to implement
- new examples
- example program of ramdisk cache
- GitHub readme.md "badges" (see also shields)
- you need to be able to point at Jenkins. A URL to the shields.io site
containing an embedded URL to your Jenkins to get the data for the
badge
- http://shields.io/
- example - https://github.com/seiyria/c
- arrays of files / files in records are not implemented but are possible
- update FirstFileParam, etc., to work with references
- wasWritten on arrays and records
- rewrite references to .value to look use utility functions
- change or alias for consistency: set -> assign, get -> element
- with include doesn't work on the command because it is loaded at syntax check
time and the command line has no syntax check...but it would be good to load
libraries at the command line so can I come up with a strategy to make it work?
- libraries to load neutral (i.e. non-sf) config file formats?
- got a "s already declared" when using s as a function parameter and
s is declared in the outer scope but shouldn't be an error
- the formal parameters are declared in the same scope as the subprogram
name. The block is used to destroy the actual, usuable parameters
during the syntax check. Moving the block only destroys the formal
parameters.
- not sure if SparForte has an existing mechanism for this
New Unique Concepts
-------------------
- research
- continue learning Rust - https://www.rust-lang.org
- revisit Go - https://golang.org/
- checkout Indris - https://www.idris-lang.org
- check out D - https://dlang.org/
- checkout Erlang for ideas
- what can be done to promote better, easier, more detailed error messages?
- SELinux-like ability to control who access what.
- for any function, restrict it to a list of parent functions which
may call it.
- for any command, restrict it to a list of parent functions which
may call it.
- objects more complicated but not an issue now.
- have an option for open access
- how to you lock the list and enforce it?
- % functionality should be extended and made usable in more contexts
- chould % chain objects methods? That is, % equals @ + first param?
- parallel blocks
- ability to track code meant to be used in pairs (e.g. defining two
procedures, one must appear first, one must appear last, both should
be used in the enclosing block)
- writing code
- embedded SQL or
- generally, features to allow a program to construct programs safely
in another language (e.g. SQL, shell or other), safeguarding from
code injection or other issues.
- for PostreSQL, SELECT ... INTO var FROM... SparForte could use a
similar approach to read results into its variables.
- sofware model + archecture
- allow architects to apply architecture policy to groups of software by the
software model system. Explore what needs to be involved. should the
software model be exposed through System? Currently pragmas are applied
directly to the current program, rather than triggered by pragma
software_model and applied through some kind of architecture system.
- units of measure
- units of measure should be able to be changed dynamically at run-time
- units.get_unit_of_measure / units.set_unit_of_measure
- units of measure should be defined as a type (not unlike an exception)
- a unit of measure should be related to a universal type (string/numeric)
- define a standard record type for units with singular/plural/etc.
- e.g. kilometers : unit_of_measure of universal_numeric := ("km", "kms");
- allow the standard record type to be extended by subtype (providing
alternate spellings but compatible) or new types. Allow the creation
of unit hierarchies. e.g. null (root) units, currencies (abstract),
dollars (english canadian) and subtype dollars (french canadian)
- if not a record, functions can be in the units package to get the
singular and plura values.
- this requires derived records to be implemented
- e.g. distance : integer in feet := 0;
(where feet.singular := "foot", feet.plural := "feet")
- a unit of measure should be able to be constant (unchanging at run-time)
- e.g. distance : integer in constant feet := 0;
(where feet.singular := "foot", feet.plural := "feet")
- can units be applied to strings. e.g. x : title in spanish or
x : title in europe_region. Affecting concatenation.
- should multiple units be allowed?
- Is this a special case of multiple inherance, where x belongs to multiple
hierarches? Should it be generalized? I'm thinking generalizing it with
this way adds confusion.
- naming convention
- what are the naming standards of functions. e.g. sin(), to_sin(), sin_of()?
- type system
- extending enums to strings and number sets
- what about users creating their own universal types?
- progamming by contract features - we have functions, so we can do them
but can we do it elegantly rather than as an add-on to the existing
syntax?
- the similar types problem
- Classes/Objects partially, but do not completely, eliminate the problem
of using similar types together (notably, factory classes as a workaround
for "new" only able to produce one type of object). With the Ada-based
strong typing system, we need a better way to define similar types,
ensuring the these concepts are not limited to objects but can be used
throughout the language
- basic extensibility of aggregates
- arrays and records should be part of the core typing system, so that they
can be easily extended. A record type, for example, shouldn't need "tagged"
to be extended. An array type should be able to be extended with
new bounds (as the element type can be separately extensible). 'class
should not be necessary if we can trace subtypes back to originating parent
types. (None of this should require objects, which
are separate features to be introduced later.)
- privacy should probably not use a "private" package section, but be a
keyword in declarations.
- abstract should be usable anywhere to create a type that is not intended
to have a variable created of that type.
- would syntax trees help? https://en.wikipedia.org/wiki/Abstract_syntax_tree
- relations
- business rules should have their own block as programmers may not be the
one updating these rules.
- object-oriented rules (having data attached to rules)
- the executable part of the when should not allow if or case statements
- each relation starts a recursive search
- investigate: SQL is very similar to rules pattern matching. Can this be leveraged
as SparForte understands SQL?
- reach relation requires
- guard conditions (dependencies needed for a relation)
- weights
- state data
- timeout?
- the scheduler must pattern match appropriate rules in the agenda,
the table of valid relations that can be considered next
- is it more like a grammar (flat) or prolog (recursion)?
- other issues
- how does the boolean shortcut become a fact?
- how do relations function in a restricted shell
- what is the rule conflict detection and resolution strategy
- examples:
In its simplest form, we need a block for business
users to enter options. We would like to limit what
is visible to the business user.
options business_settings(i, j, k : integer) is
tax_rate : constant float := 13.5;
end business_settings;
An options block may only contain constants.
The main purpose, though, is to provide a place to
hold business rules.
relation Male(X) return boolean is
-- a relation is essentially a list of case/when
begin
when X = ken =>
return true;
when others =>
return false;
end Male;
relation Male(X) return true when X = ken;
-- maybe one liners
relation Love(X,Y) return boolean is
when others =>
return Male(X) and not Male(Y);
end Love;
Relations require namespacing or all relations will
fire.
-------------------------------------------------------------------------------
KNOWN ISSUES/IDEAS
-----------------------------------------------------------------------------
- some of these issue may have been addressed but not removed from this list
so check if they are still a problem
ISSUES (SparForte Environment)
* build system (SparForte Environment)
* regression test suite (SparForte Environemnt)
- break up good test into lesser tests (just too many for debugging
when there's a new error in the middle after massive changes)
- should test in-line for with ada and shell statements
- test upper ASCII escaped characters
- new string functions: neg tests
- for loops no longer confused by older vars of same name - neg test
- test suite test for var existence after declare block end, array & itself,
array casts, array subtypes, array default assignments, cmdline redirect &
restricted shells, -e, in / not in operator, unchecked_import tests in
test suite
- command line redirection tests in testsuite
- files.is_executable, files.is_readable, files.is_writable,
files.last_modified need negative tests
- tests for large numbers of open/close to make sure we don't run out
file descriptors because of improper closures
- changes to allow for "i : integer := i" not tested for arrays...that is,
values being assigned to arrays probably can't contain the same name as
the array. See ParseDeclarationPart for how to handle this.
- dir_separator, change_dir, remove_dir, get_current_dir, dir_name,
base_name, file_extension, file_name, format_pathname, expand_path & test
- enum package neg tests
- is separate tests
* sample programs
- update the sample programs for subprograms
- in morph.bush example, a single newline is output when Ada is shutting
down. Is something flushed or what??...BUT a short sample script doesn't
have this behaviour. Is this still an issue?
- random numbers
https://github.com/adrianhoe/adamt19937
http://adrianhoe.com/adrianhoe/projects/adamt19937/
- benchmarks
- http://benchmarksgame.alioth.debian.org/
- shell examples
- http://comp.eonworks.com/scripts/scripts.html
- http://www.shelldorado.com/scripts/categories.html
- http://www.linuxlots.com/~dunne/scripts.html [broken?]
ISSUES (AdaScript)
* latest
- SOCK_NONBLOCK - obsolete in Linux, must be replaced
- rpmlint complains about gethostbyname (IP4-specific) -> getaddrinfo
* terminal control character escaping isn't working on readline prompt
- bold is turned off temporarily on prompt
* general syntax (AdaScript Issues)
- implement scientific notation numeric literals
- implement overloadable enumerateds
- implement attributes (will need to change byte code compiler)
- do not allow declarations between begin..end in a begin block
- a range could be a new class. That would allow arrays.range and a general
parseRange
- enumerateds should be upper-case, if this doesn't conflict with type-
sensitivity
- vim syntax - $$ doesn't work
- unreachable code error doesn't indent token hilight properly
- case cases are not checked for identical cases but should be.
- cases should support ranges but don't yet.
- should last output (%) be assignable?
* assignments
- naturals and positives compatibility (intTypesOK) not handled at
assignment...is this fixed?
- when declaring variables, should the type be optional when a value
is assigned (so that the type of the value is used, like a command line
auto declaration)? This is how the Go language does it.
* pragmas
- should there be a pragma that runs after every command (as in
the special trap for BASH)?
- dual license support for pragma license?
- pragma restriction( no_unextended_types ); -- variables must use
user-defined types derived from standard ones?
- additional safety features for pragma import/export?
* pen package (AdaScript Issues)
- pen package fails on AMD/Linux
- pen package fails on FreeBSD with SDL/SVGALIB (interfers with Spar
keyboard/mouse/display functions)
- deferred picture load
- locking issues
- null_rect, all_rect
- SDL/OpenGL binding
* database packages (AdaScript Issues)
- select statements should be pipeline-able (probably fails because the
child process closes database socket when the APQ library quits)
- db.schema can result in an error error
- db.users and related information procedures should be builtin commands
so they can be pipelined (ie. so "| less" can be used)
- turning off formatting in pipelines or redirection (especially SQL
commands which are unusable in wide layout format)
- \ at end of line will cause an error on SQL statements
- a database connection pool
- use ligda (GNU data access) for portable data needs?
* numerics
- complete complex numbers - depends on complex types in expressions but expressions do not currently return aggregate values. A resource type cannot be used in expressions either because it is a limited type.
* Text_IO package (AdaScript issues)
- enumerated subtypes - put_line / ? do not print the correct enum item
- set input/output/error cannot be redirected to an file_type in an array
- get_line doesn't strip ASCII.CR like I thought
- should "?" should trim strings?
- close with no filename could close all open user files (ala BASIC,
convenient for scripts)
- output numbers with alternative bases
- Allow standard output, etc. to be closed. (We dup them anyway.)
- Does scanner reset cause Current_Output/etc. to be double dup()'ed
- line count for a file doesn't work if put_line doesn't include the file
variable or if it's a built-in file (standard_output, current_output,
etc.)
- managing files like types, by negotiating and have spar provide a
recommended handle. This would make the language more cloud-ready.
e.g. type <filehandle> for <type> range <1..num_records>... to
return a file handle on a device that meets these size requirements,
whether in memory, on a hard drive, etc. Similarily, specify if it needs
to be fast, indexed, etc. The architect could specify the options.
* TCP/IP client sockets
- "file /= eof_t" is wrong: standard_input could be specified explicitly
- linux socket calls in bush_linux
- set_output, etc. redirection for sockets
- optimize fd - don't need to pull it out with stringField for every DoGet
- rate limiting (set transfer speed per second)
* command_line package (AdaScript issues)
- command_line.argument() cannot be used in open...get an error. Expects
a type not a keyword...why?
- implement gnat command_line
* enumerated types
- enumerateds are declare as constants of the enumerated type BUT if the
user declares a constant of the enumerated type (a rare occurrence) it
will be treated as an item of the enumerated type instead of a constant
so there needs to be a symbol table flag to identify enumerated items.
* sound package (AdaScript issues)
- sound.mute, sound.unmute
- Wavplay doesn't recover gracefully from errors...need to reset defaults
especially after an error
* strings package (AdaScript issues)
- strings.replace_match/glob
- strings.cvs - comma separated values - 2, 3, "hello", ... fields
- strings.pcre_replace
* files package (AdaScript Issues)
- should it handle ~?
- should restricted shell affect?
* System package (AdaScript Issues)
- System_Name should be enumerated
* OS package
- export variables are not exported before a os.system(). Should they be?
- os.unrestricted_system vs. restricted system? or restricted backquotes
and unrestricted backquotes?
* Pen package
- TTF (True-type Fonts)
/* Initialize the TTF library */
if ( TTF_Init() < 0 ) {
fprintf(stderr, "Couldn't initialize TTF: %s\n",SDL_GetError());
SDL_Quit();
return(2);
}
/* Open the font file with the requested point size */
font = TTF_OpenFont(argv[0], ptsize);
if ( font == NULL ) {
fprintf(stderr, "Couldn't load %d pt font from %s: %s\n",
ptsize, argv[0], SDL_GetError());
cleanup(2);
}
TTF_SetFontStyle(font, renderstyle);
TTF_SetFontOutline(font, outline);
TTF_SetFontKerning(font, kerning);
TTF_SetFontHinting(font, hinting);
TTF_CloseFont(font);
Basically two main functions:
text = TTF_RenderText_Solid(font, string, *forecol);
text = TTF_RenderText_Shaded(font, string, *forecol, *backcol)
text = TTF_RenderText_Blended(TTF_Font *font, const char *text, SDL_Color fg);
There are other functions to get font information, do UTF-8 or set features.
* template issues (AdaScript Issues)
- line numbering in templates - Text_IO skips blank lines. Template
scripts are missing blank lines, and throws line numbers off as a
result. May have to go with sequential I/O or UNIX file reading.
* subprograms (AdaScript Issues)
- parseFunction/ProcedureCallSemicolon requires rewriting parseGeneralStatement (that is, not one expect( ; ) for all general statements)
- expressions should be able to return records and arrays
- functions should be able to return records and arrays
- forward procedures broken (commented out in tests) - params are broke
when expecting forward subprogram
* command types (AdaScript Issues)
- can command types be implemented using appropriate pragmas
instead of a special type (ie. pragma command (strvar) );?
- command vars should be &-able with backquotes.
* Ada package bindings
- thick binding to: Gnat.Os_Lib
- binding to: Byte_IO (sequential)
- aggregates (AdaScript Issues)
- arrays probably won't work as parameters to user-defined subprograms
- errors when expecting scalars
- assigning records to records
- unsetting records
- string should be an array type, but they are not arrays in the bush sense
- ideally, unbounded_strings should not be a subtype of universal strings
for compatibility with Ada 95. As a result, an unbounded_string typecast
shouldn't work but it does in AdaScript.
- unconstrained arrays and forced initialization
- if array return values are implemented, arrays should be initialized with
array expression value.
* ZMQ support (new package)
- see https://github.com/persan/zeromq-Ada
ISSUES (Bourne Shell)
- redirections (Shell Issues)
- advanced job control (control-Z, fg, bg, etc.)
- job control (Shell Issues)
- check sig child flag after every general statement (already done?)
- single user mode detection, disabling job control
- SIGHUP handler: SIGHUP should be broadcast to all children like BASH
- other shell issues (Shell Issues)
- whitespacing after :-, etc. is permitted in Bourne shell but is an error in SparForte - e.g. ${HOME:- x } is permitted in Bash
- SHELL variable doesn't always initialize to spar command path. It doesn't handle ../
- collating order with file globbing and locales
- remove dependency on Ada.Command_Line.Environment -- not supported in Windows GNAT
- an error terminates all commands in an interactive semi-colon list, but
it should continue on for POSIX compatibility. Is this resolvable?
- because terminal attributes are toggled on and off, slow systems
sometimes echo characters during input, throwing off the display
- prompt script: final cr being ignored because it users compileandrun