Thank you for the pointers. I will look at Linda and Playground.

I was mainly wondering about the form. Is expressing the behavior of the
objects as a grammar describing different sequence of events interleaved
with semantic actions was a good idea or not, and was it tried before?

Thanks,
Benoit


On Mon, Mar 19, 2012 at 1:40 PM, Alan Kay <[email protected]> wrote:

> Hi Benoit
>
> This is basically what "publish and subscribe" schemes are all about.
> Linda is a simple "coordination protocol" for organizing such loose
> couplings. There are sketches of such mechanisms in most of the STEPS
> reports ....
>
> Spreadsheets are simple versions of this
>
> The Playground language for the Vivarium project was set up like this
>
> For real scaling, one would like to move to more general semantic
> descriptions of "what is needed" and "what is supplied" ...
>
> Cheers,
>
> Alan
>
>   ------------------------------
> *From:* Benoît Fleury <[email protected]>
> *To:* Fundamentals of New Computing <[email protected]>
> *Sent:* Monday, March 19, 2012 1:10 PM
> *Subject:* [fonc] Naive question
>
> Hi,
>
> I was wondering if there is any language out there that lets you describe
> the behavior of an "object" as a grammar.
>
> An object would receive a stream of events. The rules of the grammar
> describe the sequence of events the object can respond to. The "semantic
> actions" inside these rules can change the internal state of the object or
> emit other events.
>
> We don't want the objects to send message to each other. A bus-like
> structure would collect events and dispatch them to all interested objects.
> To avoid pushing an event to all objects, the "bus" would ask first to all
> objects what kind of event they're waiting for. These events are the
> possible alternatives in the object's grammar based on the current internal
> state of the object.
>
> It's different from object-oriented programming since objects don't talk
> directly to each other.
>
> A few questions the come up when thinking about this:
>  - do we want backtracking? probably not, if the semantic actions are
> different, it might be awkward or impossible to undo them. If the semantic
> actions are the same in the grammar, we might want to do some factoring to
> remove repeated semantic actions.
>  - how to represent time? Do all objects need to share the same clock? Do
> we have to send "tick" events to all objects?
>  - should we allow the parallel execution of multiple scenarios for the
> same object? What does it make more complex in the design of the object's
> behavior? What does it make simpler?
>
> If we assume an object receive a tick event to represent time, and using a
> syntax similar to ometa, we could write a simplistic behavior of an ant
> this way:
>
> # the ant find food when there is a food event raised and the ant's
> position is in the area of the food
> # food indicates an event of type "food", the question mark starts a
> semantic predicate
> findFood    = food ?(this.position.inRect(food.area))
>
> # similar rule to find the nest
> findNest     = nest ?(this.position.inRect(nest.area))
>
> # at every step, the ant move
> move         = tick (=> move 1 unit in current direction (or pick random
> direction if no direction))
>
> # the gatherFood scenario can then be described as finding food then
> finding the nest
> gatherFood = findFood (=> pick up food, change direction to nest)
>                     findNest (=> drop food, change direction to food
> source)
>
> There is probably a lot of thing missing and not thought through.
>
> But I was just wondering if you know a language to do this kind of things?
>
> Thanks,
> Benoit.
>
> _______________________________________________
> fonc mailing list
> [email protected]
> http://vpri.org/mailman/listinfo/fonc
>
>
>
> _______________________________________________
> fonc mailing list
> [email protected]
> http://vpri.org/mailman/listinfo/fonc
>
>
_______________________________________________
fonc mailing list
[email protected]
http://vpri.org/mailman/listinfo/fonc

Reply via email to