[Toss-devel] Imperative Rule Representation
Status: Beta
Brought to you by:
lukaszkaiser
|
From: Lukasz K. <luk...@gm...> - 2012-07-22 21:48:42
|
Hi. I recently learned about YAGI from the paper below, http://uoa.academia.edu/StavrosVassos/Papers/1674325/Action-Based_Imperative_Programming_with_YAGI and I looked at our rules in Toss and started thinking that it could be more intuitive to represent directly what needs to be added to and removed from relations, instead of having these pairs of structures as we do now. For example, in Tic-Tac-Toe instead of the current RULE Cross: [a | P:1 {} | - ] -> [a | P (a) | - ] emb Q, P pre not WinQ() we could just write RULE Cross(a): +P(a) pre not P(a) and not Q(a) and not WinQ() Or maybe even use "action" instead of "rule"? This should be really easy to implement as our compiled rule representation basically is just this: what to remove, what to add, and pre. Maybe we should also have "new(e)" and "del(e)" to add new elements and delete some of them? What do you think about it? (Lukasz: is this what you have been suggesting to me for some time? I hope you are not angry that I need so much time to grow up to your advise!) Best! Lukasz |