Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Production actions: buffer vs. module #176

Open
asmaloney opened this issue Jun 8, 2022 · 0 comments
Open

Production actions: buffer vs. module #176

asmaloney opened this issue Jun 8, 2022 · 0 comments
Labels
enhancement New feature or request language amod language changes

Comments

@asmaloney
Copy link
Owner

asmaloney commented Jun 8, 2022

There are several actions which can be taken in productions:

  • buffer modification
    • =goal>
    • maps to set
    • A buffer modification action is used to change the slot values of a chunk in a buffer. This is done directly by the production and works the same for every buffer (the buffer’s module is not involved in the process).

  • buffer overwrite
    • @goal>
    • map to new overwrite statement?
    • A buffer overwrite action is used to replace the contents of a buffer without clearing it first. As with the buffer modification and buffer clearing actions, this is performed directly by the production without notifying the buffer’s module. The chunk which was in the buffer is essentially lost when this action occurs.

  • buffer clearings
    • -goal>
    • maps to clear
    • A buffer clearing action is used to remove a chunk from a buffer. As with buffer modification actions, this is done directly by the production without consulting the buffer’s module. However, modules may be monitoring for buffer clearing events and perform some action whenever a buffer is cleared (their own buffer or any other). Once the action completes the buffer will be empty.

  • module requests
    • +retrieval>
    • maps to recall (but maybe this is specific to retrieval and we need a general form + other specific versions?)
    • the production asks a module to perform some action. Syntactically, a request can be specified using any slots and values for any buffer. Semantically, what a request actually does is specific to the module. Some modules may not even accept requests through their buffers, or may have a more restrictive syntax than the general syntax available in the production (for example only allowing a slot to be specified once in the request). Thus, to know what can be requested, how it needs to be specified, and how that will then be processed one needs to know the details of the modules. A syntactically correct production may make semantically invalid requests which would typically generate warnings at run time from the module receiving the request.

  • modification requests
    • *imaginal>
    • map to new module_set statement?
    • A modification request is similar to both the module request and buffer modification actions, and it is another way for a production to ask a module to perform some action. The differences between a modification request and a module request are that a modification request does not include an implicit clearing of the buffer and it is restricted to the same specification style as a buffer modification (no slot modifiers are allowed, no request parameters are accepted, and the buffer to which this request is made must have been used in a buffer test on the production’s LHS). As with a request, what the module does in response to a modification request is entirely up to the module.

Some operate on buffers directly, some operate on them through calls to the module. I don't know if the python versions make this distinction - needs investigation.

amod currently does not support all of these, so I need to review the language and add some statements.

@asmaloney asmaloney added enhancement New feature or request language amod language changes labels Jun 8, 2022
@asmaloney asmaloney changed the title buffer vs. module requests Production actions: buffer vs. module Jun 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request language amod language changes
Projects
None yet
Development

No branches or pull requests

1 participant