diff --git a/TODO.md b/TODO.md index e98bcd0a..aebcafe1 100644 --- a/TODO.md +++ b/TODO.md @@ -1,7 +1,5 @@ # net -- graph theory -rename `placeholder/create*` to `placeholder/add*` - `Node` should not `input` and `output` ports [maybe] `ActiveEdge` should not have `rule` -- all edges are the same diff --git a/src/lang/check/checkWords.ts b/src/lang/check/checkWords.ts index 433a6e31..802a4224 100644 --- a/src/lang/check/checkWords.ts +++ b/src/lang/check/checkWords.ts @@ -4,7 +4,7 @@ import { compose } from "../compose/compose" import { createEnv } from "../env/createEnv" import { freshenType } from "../freshen/freshenType" import { Mod } from "../mod" -import { createPlaceholderOutputPortFromType } from "../placeholder/createPlaceholderOutputPortFromType" +import { addPlaceholderOutputPortFromType } from "../placeholder/addPlaceholderOutputPortFromType" import { unifyTypes } from "../unify/unifyTypes" import { formatValue } from "../value/formatValue" import { Word } from "../word" @@ -25,7 +25,7 @@ export function checkWords( const placeholderOutputPorts = inputValues .reverse() - .map((t) => createPlaceholderOutputPortFromType(env.net, mod, t)) + .map((t) => addPlaceholderOutputPortFromType(env.net, mod, t)) env.stack.push(...placeholderOutputPorts) diff --git a/src/lang/placeholder/createPlaceholderInputPortForPort.ts b/src/lang/placeholder/addPlaceholderInputPortForPort.ts similarity index 91% rename from src/lang/placeholder/createPlaceholderInputPortForPort.ts rename to src/lang/placeholder/addPlaceholderInputPortForPort.ts index 81e50633..6723ab0e 100644 --- a/src/lang/placeholder/createPlaceholderInputPortForPort.ts +++ b/src/lang/placeholder/addPlaceholderInputPortForPort.ts @@ -3,7 +3,7 @@ import { Net } from "../net" import { addNode } from "../net/addNode" import { Port } from "../port" -export function createPlaceholderInputPortForPort( +export function addPlaceholderInputPortForPort( net: Net, mod: Mod, port: Port, diff --git a/src/lang/placeholder/createPlaceholderOutputPortForPort.ts b/src/lang/placeholder/addPlaceholderOutputPortForPort.ts similarity index 91% rename from src/lang/placeholder/createPlaceholderOutputPortForPort.ts rename to src/lang/placeholder/addPlaceholderOutputPortForPort.ts index d86dec65..b6929bf9 100644 --- a/src/lang/placeholder/createPlaceholderOutputPortForPort.ts +++ b/src/lang/placeholder/addPlaceholderOutputPortForPort.ts @@ -3,7 +3,7 @@ import { Net } from "../net" import { addNode } from "../net/addNode" import { Port } from "../port" -export function createPlaceholderOutputPortForPort( +export function addPlaceholderOutputPortForPort( net: Net, mod: Mod, port: Port, diff --git a/src/lang/placeholder/createPlaceholderOutputPortFromType.ts b/src/lang/placeholder/addPlaceholderOutputPortFromType.ts similarity index 91% rename from src/lang/placeholder/createPlaceholderOutputPortFromType.ts rename to src/lang/placeholder/addPlaceholderOutputPortFromType.ts index f64f336f..dd503ee7 100644 --- a/src/lang/placeholder/createPlaceholderOutputPortFromType.ts +++ b/src/lang/placeholder/addPlaceholderOutputPortFromType.ts @@ -4,7 +4,7 @@ import { addNode } from "../net/addNode" import { Port } from "../port" import { Value } from "../value" -export function createPlaceholderOutputPortFromType( +export function addPlaceholderOutputPortFromType( net: Net, mod: Mod, t: Value, diff --git a/src/lang/placeholder/connectNodeWithPlaceholderPorts.ts b/src/lang/placeholder/connectNodeWithPlaceholderPorts.ts index 6357f771..ccdc873f 100644 --- a/src/lang/placeholder/connectNodeWithPlaceholderPorts.ts +++ b/src/lang/placeholder/connectNodeWithPlaceholderPorts.ts @@ -2,8 +2,8 @@ import { connect } from "../connect/connect" import { Mod } from "../mod" import { Net } from "../net" import { Node } from "../node" -import { createPlaceholderInputPortForPort } from "./createPlaceholderInputPortForPort" -import { createPlaceholderOutputPortForPort } from "./createPlaceholderOutputPortForPort" +import { addPlaceholderInputPortForPort } from "./addPlaceholderInputPortForPort" +import { addPlaceholderOutputPortForPort } from "./addPlaceholderOutputPortForPort" export function connectNodeWithPlaceholderPorts( mod: Mod, @@ -12,14 +12,14 @@ export function connectNodeWithPlaceholderPorts( ): void { for (const port of node.input) { if (!port.isPrincipal) { - const placeholderPort = createPlaceholderOutputPortForPort(net, mod, port) + const placeholderPort = addPlaceholderOutputPortForPort(net, mod, port) connect(net, port, placeholderPort) } } for (const port of node.output) { if (!port.isPrincipal) { - const placeholderPort = createPlaceholderInputPortForPort(net, mod, port) + const placeholderPort = addPlaceholderInputPortForPort(net, mod, port) connect(net, port, placeholderPort) } }