New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

abstract-algorithm

Package Overview
Dependencies
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

abstract-algorithm - npm Package Compare versions

Comparing version 0.1.11 to 0.1.12

{

6

package.json
{
"name": "abstract-algorithm",
"version": "0.1.11",
"version": "0.1.12",
"description": "Abstract-algorithm for optional reduction of stratifiable lambda terms",
"main": "src/abstract-algorithm.js",
"bin": {
"absal": "src/main.js"
},
"scripts": {

@@ -26,4 +29,5 @@ "test": "node test.js"

"dependencies": {
"factor": "0.0.1",
"lambda-calculus": "^1.0.6"
}
}

11

src/interaction-combinators.js

@@ -48,3 +48,3 @@ // Implements symmetric interaction combinators with infinite node colors.

var prev, next, back;
net.stats = {loops: 0, rewrites: 0};
net.stats = {loops: 0, rewrites: 0, betas: 0, dupls: 0, annis: 0};
while (visit.length > 0) {

@@ -61,4 +61,7 @@ ++net.stats.loops;

++net.stats.rewrites;
if (kind(net.mem, node(next)) === 1 && kind(net.mem, node(prev)) === 1) {
++net.stats.betas;
}
back = flip(net.mem, Wire(node(next), meta(net.mem, node(next))));
rewrite(net.mem, node(next), node(prev));
rewrite(net.mem, node(next), node(prev), net.stats);
visit.push(flip(net.mem, back));

@@ -86,3 +89,3 @@ } else {

// you inevitably reduce redexes which do not influence on the normal form.
function rewrite(mem, x, y) {
function rewrite(mem, x, y, stats) {
if (kind(mem,x) === kind(mem,y)){

@@ -96,2 +99,3 @@ // a b a b

link(mem, flip(mem, Wire(x, 2)), flip(mem, Wire(y, 2)));
++stats.annis;
} else {

@@ -113,2 +117,3 @@ // a d a - B --- A - d

link(mem, flip(mem, Wire(x2, 2)), flip(mem, Wire(y2, 2)));
++stats.dupls;
}

@@ -115,0 +120,0 @@ }

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc