gdl-app
objectgendlThis object serves as the driver for the build process for GDL runtime applications. There is also an undocumented function called make-gdl-app; in order to perform a runtime build process, simply make an instance of this object with the appropriate input values, and invoke (the make!) on it, or call make-gdl-app with the same arguments as the input-slot you give to this object.
Note that for very large applications, including all the application fasls in (the application-fasls) list can cause the Lisp heap to blow up fatally during the build. This is because Allegro CL turns off global garbage collecting during the load of the standard list of application fasls. For these cases, the suggested workaround is to include explicit "load" statements for your application fasls in the :post-load-form argument in the generate-application-args list, as in the second example below.
Examples
(in-package :gdl-user)
(make-gdl-app :application-name "moon-shot" :destination-directory "/tmp/moon-shot/"
:overwrite? t :application-fasls (list "/fasl-home/booster-rocket.fasl"
"/fasl-home/lunar-module.fasl"))
(make-gdl-app :application-name "moon-shot" :destination-directory "/tmp/moon-shot/"
:overwrite? t :generate-application-args
(list :post-load-form '(progn (load "/fasl-home/booster-rocket.fasl")
(load "/fasl-home/lunar-module.fasl"))))
Messages (64 documented, 115 total)
GDL Instance. In an element of a sequence, this is the container object which holds all elements.
List of Symbols. Lists all the superclasses of the type of this object.
List of pathnames. This list should contain the pre-compiled fasls for your GDL application, in correct load order. These can be produced, for example, by calling genworks:cl-lite with the :create-fasl? keyword argument set to t. If you are using the ASDF build management system, note that ASDF3 is now capable of producing a single fasl file for your application including its ASDF/Quicklisp dependencies, using
(asdf:operate 'asdf:monolithic-compile-bundle-op :your-application-system-name)
(asdf:output-file 'asdf:monolithic-compile-bundle-op :your-application-system-name)
See the ASDF documentation for details.
String. The name which will be used for your application's executable and dxl file. Defaults to "gdl-test-runtime".
List of GDL Instances. All objects from the :objects specification, including elements of sequences as flat lists.
List of GDL Instances. All objects from the :objects specification, including elements of sequences as flat lists.
Pathname. Indicates the directory to be created or overwritten for producing the runtime distribution. Defaults to a directory called (the application-name) in the system temporary directory, returned by (glisp:temporary-folder).
List of Symbols. Lists the direct superclasses of the type of this object.
Plist. Returns the :documentation plist which has been specified the
specific part type of this instance.
Boolean. For elements of sequences, T iff there is no previous element.
GDL Instance. Using this instance as the root, follow the reference chain represented by the given path. :arguments (path "List of Symbols or Pairs of Symbol and Integer")
String. The contents of this string will be copied to a file gdlinit.cl and placed in the destination-directory. Default is empty string.
Plist of arguments suitable for Allegro CL's generate-application function. These args will be passed to the internal call to generate-application. This list of arguments will take precedence over individual inputs that you pass to make:gdl-app --- for example if you pass a :lisp-heap-size as an input to this object as well as including it on the :generate-application-args, the one on the :generate-application-args will take effect.
List of GDL Instances. All objects from the :hidden-objects specification, including elements of sequences as flat lists.
Boolean. Indicates whether the object should effectively be a hidden-object even if specified in :objects. Default is nil.
Boolean. Indicates whether the SSL support libraries will be copied into the runtime. Applies only to MS Windows platform. Default is nil.
Boolean. Indicates whether to include the Swank slime editor server in the generated runtime. Defaults to nil.
Integer. Sequential index number for elements of a sequence, NIL for singular objects.
Boolean. For elements of sequences, T iff there is no next element.
Boolean. T if this object has no children, NIL otherwise.
List of GDL Objects. A Collection of the leaf nodes of the given object.
List of GDL Objects. A Collection of the leaf nodes of the given object.
Number. The size of the reserved space which will be requested from the OS when the produced application starts up. Defaults to 800000000 (eight hundred million) bytes.
Void. Does the application build and creates or replaces (the destination-directory) .
String. This is synonymous with slot-documentation
List of Keyword Symbols. Returns the messages (slots, objects, and functions) of this object, according to the filtering criteria as specified by the arguments.
:&key ((category :all) "Keyword. Either :all or the individual category of
messages to be returned. This can be one of:
:computed-slots
:settable-computed-slots
:required-input-slots
:optional-input-slots
:defaulted-input-slots
:query-slots
:functions
:objects
:quantified-objects
:hidden-objects
:quantified-hidden-objects
"
(message-type :global) "Keyword Symbol, :local or :global. Indicates whether to return messages
only from the local specific part type, or from all superclasses (mixins) as well."
(return-category? nil) "Boolean. Indicates whether or not the category of each message should be
returned before each message in the returned list."
(base-part-type nil) "Symbol naming a GDL Part Type. Indicates a "base" part from which no messages
should be returned, nor should messages be returned from superclasses (mixins) of this base part. If NIL (the default),
messages are considered from all superclasses."
(sort-order :unsorted) "Keyword Symbol. One of: :unsorted, :by-category, or
:by-name."
(filter :normal) "Function Object of two arguments or :normal. If a function object,
applies this function to each returned category and message keyword, and filters out all pairs for which
the function returns NIL. If :normal (the default), then no filtering is done.")
List of Symbols. Returns the names of the immediate superclasses of this object.
:&key ((local? t) "Boolean. Indicates whether to give only direct mixins or all mixins from the entire inheritance hierarchy.")
Keyword symbol. The part's simple name, derived from its object specification in the parent or from the type name if this is the root instance.
Number. The amount of default initial newspace in the generated image. Defaults to make:newspace.
GDL Instance. For elements of sequences, returns the next part in the sequence.
Number. The amount of default initial oldspace in the generated image. Defaults to make:oldspace
Function which should take one argument and return
nonnil if that directory is confirmed to be a
valid candidate for deletion. Defaults to nil
Boolean. Indicates whether a build will overwrite
a previously existing destination directory. To use
this, you also need to specify a
overwrite-validation-function, which should take
one argument and return nonnil if that directory
is confirmed to be a valid candidate for deletion.
Defaults to nil.
GDL Instance. The parent of this object, or NIL if this is the root object.
Pathname or string naming a directory. The location of patches for the runtime build. Defaults to patches-root-dir-default.
Lisp expression. This form will be evaluated after the loading of application-fasls is complete. Defaults to nil.
Lisp Function of zero arguments. This function will be run after the build is finished.
Lisp expression. This form will be evaluated before the loading of application-fasls begins, but after the GDL runtime modules are loaded. Defaults to nil.
Lisp Function of zero arguments. This function will be run before the build is begun.
GDL Instance. For elements of sequences, returns the previous part in the sequence.
Boolean. Indicates whether the build should create a PLL, so-called Purified Lisp Library file. This separates string and code-vector constants into a separate file and can save space in the Lisp heap. Defaults to t.
Lambda expression with empty argument list or symbol naming a function with no arguments. This will be run when the runtime application starts up. The alternative to using this to achieve initializations is to put expressions in a gdlinit.cl or .gdlinit.cl in the application directory or user home directory. Defaults to nil.
Void. Restores all settable-slots in this instance to their default values.
Multiple Values: Total root-paths affected and total slots
affected. Reverts any "remembered" bashed slots, starting from the
root, to their default values. Note that any call to set-slot! or
set-slots! or any use of web form-controls will result in
"remembered values". Note that there is a :remember? keyword
argument to set-slot! which defaults to t but if you specify it as
nil, you can bash values without having them "remembered" and such
slots would not be affected by this function.
NIL. Restores the value of the given slot to its default, thus "undoing" any forcibly set value in the slot. Any dependent slots in the tree will respond accordingly when they are next demanded. Note that the slot must be specified as a keyword symbol (i.e. prepended with a colon (":")), otherwise it will be evaluated as a variable according to normal Lisp functional evaluation rules. :arguments (slot "Keyword Symbol") :key (force? "Boolean. Specify as t if you want to force non-settable slots to recompute (e.g. reading from databases or external files). Defaults to nil.")
nil. Restores the value of the given slots to their defaults, thus "undoing" any forcibly set values in the slots. Any dependent slots in the tree will respond accordingly when they are next demanded. Note that the slots must be specified as keyword symbols (i.e. prepended with colons (":")), otherwise they will be evaluated as variables according to normal Lisp functional evaluation rules.
:arguments (slots "List of Keyword Symbols")
:&key ((force? force-restore-slot-default?) "Boolean. Indicates whether the slot values should be unbound, regardless of whether it had actually been bashed previously.")
Void. Restores all settable-slots in this instance, and recursively in all descendant instances, to their default values.
GDL Instance. The root-level node in this object's "tree" (instance hierarchy).
List of Symbols or of Pairs of Symbol and Integer. Indicates the path through
the instance hierarchy from the root to this object. Can be used in conjunction with
the follow-root-path GDL function to return the actual instance.
List of Symbols or of Pairs of Symbol and Integer. Indicates the path through
the instance hierarchy from the local root to this object. Can be used in conjunction with
the follow-root-path GDL function to return the actual instance.
Boolean. T iff this part has NIL as its parent and therefore is the root node.
List of GDL Instances. All objects from the :objects specification, including elements of sequences as flat lists. Any children which throw errors come back as a plist with error information
List of GDL Instances. All objects from the :hidden-objects specification, including elements of sequences as flat lists. Any children which throw errors come back as a plist with error information
NIL. Forcibly sets the value of the given slot to the given value. The slot must be defined
as :settable for this to work properly. Any dependent slots in the tree will
respond accordingly when they are next demanded. Note that the slot must be specified as a keyword
symbol (i.e. prepended with a colon (":")), otherwise it will be evaluated as a variable according
to normal Lisp functional evaluation rules.
Note also that this must not be called (either directly or indirectly) from within the body of a Gendl computed-slot. The caching and dependency tracking mechanism in Gendl will not work properly if this is called from the body of a computed-slot, and furthermore a runtime error will be generated.
:arguments (slot "Keyword Symbol" value "Lisp Object. (e.g. Number, String, List, etc.)")
:&key ((remember? t) "Boolean. Determines whether to save in current version-tree." (warn-on-non-toplevel? t) "Boolean. Determines whether to warn if this is called from the body of a cached slot." )
NIL. Forcibly sets the value of the given slots to the given values. The slots must be defined
as :settable for this to work properly. Any dependent slots in the tree will
respond accordingly when they are next demanded. Note that the slots must be specified as a keyword
symbols (i.e. prepended with a colon (":")), otherwise they will be evaluated as variables according
to normal Lisp functional evaluation rules.
:arguments (slots-and-values "Plist. Contains alternating slots and values to which they are to be set."
warn-on-non-toplevel? "Boolean. Indicates whether a warning should be issued for calling from inside the body of a cached slot. Default is t.")
Plist of Symbols and Strings. Returns the part types and slot documentation which has been specified for the given slot, from most specific to least specific in the CLOS inheritance order. Note that the slot must be specified as a keyword symbol (i.e. prepended with a colon (":")), otherwise it will be evaluated as a variable according to normal Lisp functional evaluation rules. :arguments (slot "Keyword Symbol. Names the slot for which documentation is being requested.")
Body of GDL code, in list form.
:arguments (slot "Keyword Symbol. Names the slot for which documentation is being requested.")
Keyword symbol. Describes the current status of the requested slot:
:unbound: it has never been demanded.:invalidated: it was demanded at some point, but something it depends on has been modified since; it is currently unbound and will be re-evaluated on next demand.:evaluated: it has been demanded and it is currently bound to the default value based on the code.:set: (for :settable slots only, which includes all required :input-slots) it has been modified and is currently bound to the value to which it was explicitly set.:toplevel: (for root-level object only) its value was passed into the root-level object as a toplevel input at the time of object instantiation.
String or List of Strings. Determines how the name of objects of this type will be printed in most places. This defaults to the name-for-display (generally the part's name as specified in its parent), followed by an index number if the part is an element of a sequence.
Void. Sets giving slot to its boolean opposite. &args (slot "Keyword symbol. Name of the slot as a keyword symbol.")
Symbol. The GDL Type of this object.
Void. Uncaches all cached data in slots and objects throughout the instance tree from this node, forcing all code to run again the next time values are demanded. This is useful for updating an existing model or part of an existing model after making changes and recompiling/reloading the code of the underlying definitions. Any set (modified) slot values will, however, be preserved by the update.
List of GDL Instances. Additional objects to display in Tatu tree. Typically this would be a subset of hidden-children. Defaults to NIL.
Void. Writes a file containing the toplevel inputs and modified settable-slots starting from the root of the
current instance. Typically this file can be read back into the system using the read-snapshot function.
:&key ((filename "/tmp/snap.gdl") "String or pathname. The target file to be written." (root-paths-to-ignore nil) "List of root-paths or nil. Any objects with matching root-path will be ignored for the snapshot write." )