LogicEngine is a fast and efficient Logic Simulator.
LogicEngine has been implemented in Perl, Python and Javascript.
For the browser it optionally supports ATM modules or alternatively creates a global variable called "LogicEngine". Note that the simulator itself runs in a web worker and does not impact responsiveness.
<script>
var pub,sub;
requirejs(["LogicEngine"], function(engine){
pub = engine.publish;
sub = engine.subscribe;
sub( "ready",function() {
pub({ topic : "check" });
});
});
</script>
<script src="./LogicEngine.js">
//creates LogicEngine global variable
<script?
var pub = LogicEngine.publish,
sub = LogicEngine.subscribe;
sub( "ready",function() {
pub({ topic : "check" });
});
});
</script>
In addition node.js is supported. Here the simulator runs in a child process and does not block the event loop. It brings well behaved number crunching to node.js
var engine = require('./LogicEngine');
var subscribe = engine.subscribe,
publish = engine.publish;