diff --git a/Gruntfile.js b/Gruntfile.js index 3fe34cf..04352ad 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -30,7 +30,7 @@ module.exports = function (grunt) { '<%= pkg.homepage ? "* " + pkg.homepage + "\\n" : "" %>' + '* Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author %>;' + ' Licensed <%= pkg.license %> */\n', - report: 'gzip' + report: 'min' }, min: { files: { diff --git a/benchmark/waltzDb/benchmark.js b/benchmark/waltzDb/benchmark.js index 47e2f14..2546e99 100644 --- a/benchmark/waltzDb/benchmark.js +++ b/benchmark/waltzDb/benchmark.js @@ -2,8 +2,9 @@ var data = require("./data"), nools = require("../../index"); -var flow = nools.compile(__dirname + "/waltzDb.nools"); -var items = data.load(flow).waltzdb8; +var flow = nools.compile(__dirname + "/waltzDb.nools") + .conflictResolution(["salience", "factRecency", "activationRecency"]); +var items = data.load(flow).waltzdb4; var session = flow.getSession.apply(flow, items); session.assert(new (flow.getDefined("stage"))({value: "DUPLICATE"})); var start = new Date(); diff --git a/benchmark/waltzDb/waltzDb.nools b/benchmark/waltzDb/waltzDb.nools index e0607fd..f5a2dc4 100644 --- a/benchmark/waltzDb/waltzDb.nools +++ b/benchmark/waltzDb/waltzDb.nools @@ -78,8 +78,7 @@ function getAngle(p1, p2){ return PI/2; else if (deltaY < 0) return -PI/2; - } - else if (deltaY == 0) { + }else if (deltaY == 0) { if (deltaX > 0) return 0.0; else if (deltaX < 0) @@ -721,9 +720,9 @@ rule start_visit_2_junction { junction : Junction junction.type == '2j' && junction.visited == 'no' {basePoint : basePoint, p1 : p1, p2 : p2}; } then { + modify(junction, function(){ this.visited = "now";}); modify(stage, function(){ this.value = 'VISITING_2J';}); console.log( "VISITING_2J" ); - modify(junction, function(){ this.visited = "now";}); } } diff --git a/docs/History.html b/docs/History.html index de60546..b615e93 100644 --- a/docs/History.html +++ b/docs/History.html @@ -178,6 +178,21 @@ +

0.2.1

+

0.2.0 / 2013-10-14

  • Defining Rules