Tags » AWB

Operation-semantics implementation - recursion and evaluation

I’ve been struggling while implementing simple semantics. Here is my code:

isRewritable:=(Or]=!=oneStepRewrite,e==={}]);
(* !!!this is what is obviously wrong!!!
oneStepRewrite[x] := {};
oneStepRewrite := {};*)

(* Derivative Number *)
oneStepRewrite]:={0};
(* Symbol - "x" *)
oneStepRewrite]:={1};
(* Addition - "plus" *)
oneStepRewrite] := {e};
oneStepRewrite] := {e};
oneStepRewrite] := {n + m};
oneStepRewrite] := Join[
   Map&, oneStepRewrite[e]],
   Map&, oneStepRewrite[f]]
 ];

(* Times *)
oneStepRewrite] := {e};
oneStepRewrite] := {e};
oneStepRewrite] := {0};
oneStepRewrite] := {0};
oneStepRewrite] := {n * m};
oneStepRewrite] := Join[
   Map&, oneStepRewrite[e]],
   Map&, oneStepRewrite[f]] 
];

(* Derivation - "derivative" *)
oneStepRewrite]] := {plus, derivative[f]]};
oneStepRewrite]] := {plus], times, f]]};

(* Lists Mapping *)
oneStepRewrite := Union&, l]]];
… 236 more words

Join the VDoodle stream for $27

Corporates are paying hundreds of dollars for animated white board/video doodles, but with this new software you can do it yourself in a few minutes for an upfront cost of just $27. 65 more words

Arts

Around the world politics

EWN posted an appropriate cartoon in response to the claims made about Jacob Zuma accepting bribes. France allegedly paid the South African president in money along with clothes and accommodation and in return he would protect the French arms. 98 more words