1 (defpackage #:clnl (:use :common-lisp)
2 (:export :run :boot :run-commands :run-reporter)
6 The entry point for general purpose clnl startup, as well as
7 the place that ties all the parts together into a cohesive whole."))
9 (defpackage #:clnl-parser
15 All the code to convert the list of tokens coming from the lexer
16 into an ast that can be transpiled later."))
18 (defpackage #:clnl-random
21 (:export #:export #:set-seed #:next-int #:next-double)
23 "Wrapper around mt19937.
25 mt19937 implements a merseinne twister that must be adapted a little in
26 order to match the implementation in the main NetLogo codebase which tries
27 to match how java.util.Random works. Turtles, all the way down."))
29 (defpackage #:clnl-transpiler
31 (:export :transpile-commands :transpile-reporter)
35 The transpiler is responsible for taking an ast and turning it into valid CL code
36 targeting the nvm. Here is where start to care about commands versus reporters
37 and ensuring that things are in the right place. The reason we wait until here
38 is because we want to allow someone else to play with the AST before handing it off
39 to us. For instance, the command center wants to add \"show\" to reporters, and
40 the users dictate based on entry point whether they are expecting a command
41 or a reporter. So monitors can say \"hey, transpile this reporter\" and we'll check
42 to make sure it actually is.
44 Furthermore, the lisp code that any netlogo code would be transpiled to should
45 use exported symbols, such that anyone writing NetLogo code in lisp could use
46 the nvm in the same way that comes out of this transpiler
47 All the code to convert the list of tokens coming from the lexer
48 into an ast that can be transpiled later."))
50 (defpackage #:clnl-nvm
52 (:export :export-world :create-world :current-state
53 ; API as used by transpiled NetLogo programs
63 NetLogo Virtual Machine: the simulation engine."))
65 (defpackage #:clnl-lexer
71 The primary code responsible for tokenizing NetLogo code."))
73 (defpackage #:clnl-interface
75 (:export :run :export-view)
79 The NetLogo view interface using opengl. This is responsible for taking the
80 current state of the enging and displaying it. Will not house any interface
83 (defpackage #:clnl-cli
84 (:use :common-lisp :cl-charms/low-level)
89 The main NetLogo interface for interacting with the program. Since CLNL is
90 a command line interface program with a view for display purposes only, this
91 is where all the features that the traditional NetLogo UI lives."))