npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@stevenvo780/st-lang

v3.0.0

Published

ST — Lenguaje ejecutable con nucleo logico y capa textual. Motor multi-perfil (11 lógicas), derivaciones, tablas de verdad, contramodelos, aliases modales, Belnap 4-valores y capa textual para formalización de documentos.

Readme

ST — Symbolic Theory Language

ST es un lenguaje ejecutable para lógica, argumentación y formalización documental. Combina verificación formal, scripting declarativo, control de flujo, funciones, perfiles lógicos múltiples y una Text Layer para conectar fórmulas con texto humano real.

Version License Build Status


¿Qué hace diferente a ST?

  • Lógica ejecutable: no solo declaras axiomas; también ejecutas verificaciones, derivaciones, análisis y explicaciones.
  • Mini-lenguaje pedagógico: let, set, print, if, for, while, fn, return, theory, import.
  • Múltiples perfiles: proposicional clásica, primer orden, modal, deóntica, epistémica, intuicionista, temporal, probabilística, aristotélica, paraconsistente y aritmética.
  • Text Layer: vincula pasajes de documentos con formalizaciones y claims verificables.
  • CLI + API + protocolo: usable desde terminal, REPL, TypeScript/JavaScript y editores.
  • Alias en español: el lenguaje acepta tanto sintaxis en inglés como en español.

Instalación

Descarga directa en Linux

| Distribución | Paquete | Comando | |--------------|---------|---------| | Debian / Ubuntu | ⬇️ .deb | sudo dpkg -i st-lang_*.deb | | Fedora / RHEL | ⬇️ .rpm | sudo rpm -i st-lang-*.rpm | | Linux genérico | ⬇️ binario | chmod +x st && sudo mv st /usr/local/bin/ |

Con npm

npm install -g @stevenvo780/st-lang

Desde el código fuente

git clone https://github.com/stevenvo780/ST.git
cd ST
npm install
npm run build
npm link

Inicio rápido

1) Tu primer archivo theory.st

logic classical.propositional

let regla = P -> Q
let hecho = P

derive Q from {regla, hecho}
check valid (P | !P)
countermodel (P -> Q)

2) Ejecútalo

st theory.st

3) Revisa perfiles disponibles

st profiles

4) Entra al REPL

st repl

Ejemplo paso a paso: variables, if, funciones y análisis

logic classical.propositional

print "=== demo guiada ==="

let regla = "Si estudio, apruebo" : (E -> A)
let hecho = "Estudio hoy" : E

derive A from {regla, hecho}
analyze {E, E -> A} -> A
explain (E -> A)

if valid (P | !P) {
  print "tautología detectada"
} else {
  print "esto no debería ocurrir en clásica"
}

for Caso in { P, Q, (R -> R) } {
  print Caso
}

set estado = P
while satisfiable estado {
  print "iteración del while"
  set estado = P & !P
}

fn revisar(X) {
  print "revisando"
  print X
  check satisfiable X
  return X
}

revisar((P -> Q))

Qué muestra este ejemplo

  1. let define aliases lógicos y además los deja disponibles para derivaciones.
  2. analyze evalúa si una inferencia es válida y detecta falacias conocidas.
  3. explain devuelve una explicación del perfil activo sobre la fórmula.
  4. if valid|invalid|satisfiable|unsatisfiable permite ramificar lógica del script.
  5. for recorre una lista de fórmulas.
  6. while reevalúa una condición lógica en cada iteración.
  7. fn agrupa pasos reutilizables; return corta la ejecución del cuerpo.

Nota: hoy return sirve para cortar la función y preservar un valor interno para futuras extensiones, pero las llamadas a función todavía se usan como sentencia, no como expresión anidable.


Sintaxis principal de ST

Núcleo lógico

logic classical.propositional
axiom a1 : P -> Q
theorem t1 : (P -> P)
derive Q from {a1, a2}
prove (P -> P)
check valid (P | !P)
check satisfiable (P & Q)
check equivalent (!(P & Q)), (!P | !Q)
truth_table (P -> Q)
countermodel (P -> Q)

Variables y scripting

let phi = (P -> Q)
set phi = (Q -> R)
print phi

if satisfiable phi {
  print "hay modelo"
}

for X in {P, Q, R} {
  print X
}

while invalid phi {
  set phi = (P -> P)
}

fn verificar(X) {
  check valid X
}

verificar((P -> P))

Text Layer

let p = passage([[contrato.md#clausula-1]])
let f = formalize p as (P -> Q)
claim c1 = f
support c1 <- p
confidence c1 = 0.92
context c1 = "Interpretación jurídica conservadora"
render claims

Pruebas estructuradas y teorías

assume h1 : P -> Q
assume h2 : P
show Q
derive Q from {h1, h2}
qed

theory Base {
  let alias = P -> Q
  private let secreto = R & S
  axiom regla : P -> Q
}

print Base.alias

Alias en español

ST acepta las dos familias de keywords. Ejemplos:

| Inglés | Español | |--------|---------| | logic | logica | | axiom | axioma | | derive | derivar | | from | desde | | check valid | verificar valido | | check satisfiable | verificar satisfacible | | countermodel | contramodelo | | truth_table | tabla_verdad | | analyze | analizar | | explain | explicar | | import | importar | | theory | teoria | | if | si | | else | sino | | for | para | | while | mientras | | fn | funcion | | return | retornar |


Perfiles incorporados

ST registra automáticamente estos perfiles:

  • classical.propositional
  • classical.first_order
  • modal.k
  • paraconsistent.belnap
  • deontic.standard
  • epistemic.s5
  • aristotelian.syllogistic
  • intuitionistic.propositional
  • temporal.ltl
  • probabilistic.basic
  • arithmetic

Operadores destacados por perfil

  • Proposicional clásica: !, &, |, ->, <->
  • Primer orden: forall, exists, P(x), igualdad x = y
  • Modal / deóntica / epistémica: [], <>
  • Temporal: next, until
  • Aritmética: +, -, *, /, %, <, >, <=, >=

Herramientas explicativas nuevas y reforzadas

explain

Explica una fórmula dentro del perfil activo:

logic modal.k
explain [](P -> P)

analyze

Evalúa inferencias completas y detecta falacias como:

  • afirmación del consecuente
  • negación del antecedente
  • medio no distribuido
logic classical.propositional
analyze {P, P -> Q} -> Q
analyze {P} -> Q

render

Permite inspeccionar el estado acumulado:

render theory
render claims
render c1

CLI

Ejecutar archivo

st run archivo.st

Ejecutar modo legacy

st archivo.st

Validar sintaxis y resultados

st check archivo.st

Guardar diagnósticos JSON

st run archivo.st --diagnostics

Evaluar una expresión directa

st eval "check valid (P -> P)"

Protocolo para editores

st protocol

API programática

import { evaluate, createInterpreter } from '@stevenvo780/st-lang/api';

const result = evaluate(`
  logic classical.propositional
  let regla = P -> Q
  let hecho = P
  derive Q from {regla, hecho}
`);

console.log(result.results[0].status);

const st = createInterpreter();
st.exec('logic arithmetic');
st.exec('explain 2 + 3 * 4');

Carpeta examples/

El repositorio incluye ejemplos listos para ejecutar:

  • demo.st: núcleo lógico básico
  • programming-control-flow.st: let, if, for, while, fn
  • guided-language-tour.st: recorrido guiado y pedagógico
  • text-layer.st: formalización de documentos
  • theory-showcase.st: encapsulación, herencia y acceso con punto
  • arithmetic-programming.st: scripting con logic arithmetic
  • stress-all-profiles.st: smoke test amplio

Para ejecutarlos todos:

npm run examples:run

Extensión de VS Code

La extensión oficial en editors/vscode-st aporta:

  • resaltado sintáctico
  • snippets
  • símbolos del documento
  • hover
  • diagnósticos
  • autocompletado orientado al lenguaje

Arquitectura

  1. Lexer/Parser: transforma el script .st en AST.
  2. Interpreter: ejecuta statements, mantiene teoría, bindings, funciones y Text Layer.
  3. Profiles: cada perfil implementa derivación, validez, satisfacibilidad, explicación y más.
  4. ProtocolHandler: expone capacidades para integraciones de editor.

Documentación ampliada


Licencia

MIT © Steven Velez | Developed by Humanizar