Documentation
¶
Overview ¶
Package codetranspiler exposes the stable many-to-many Code Transpiler API.
Import path: github.com/tarekwasfy01/Code-Transpiler
Index ¶
- func CapabilityMatrixJSON(features []string) ([]byte, error)
- func ImplementationMatrixJSON() ([]byte, error)
- func LanguagesJSON() ([]byte, error)
- func NativeAnalysisJSON(source, filename, code string) ([]byte, error)
- func NativeSemanticJSON(source, filename, code string) ([]byte, error)
- func SemanticJSON(source, code string) ([]byte, error)
- func Transpile(source, target, code string) (string, error)
- func TranspileSemanticJSON(target string, data []byte) (string, error)
- type Capability
- type CompileInputKind
- type CompileOptions
- type CompileOutputKind
- type CompileResult
- type Language
- type TranspileRequest
- type TranspileTrace
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CapabilityMatrixJSON ¶ added in v1.0.5
CapabilityMatrixJSON returns status matrices for semantic requirements across all registered targets. Unknown requested features are unsupported.
func ImplementationMatrixJSON ¶ added in v1.0.5
ImplementationMatrixJSON returns typed operations by frontend, JSON, runtime and target implementation stages. Declarations are not execution test results.
func LanguagesJSON ¶
func NativeAnalysisJSON ¶ added in v1.0.5
NativeAnalysisJSON extracts native types, source spans and symbol relations. Currently supports import-free Go files. This is an analysis artifact, not an executable SemanticProgram; TranspileSemanticJSON intentionally rejects it.
func NativeSemanticJSON ¶ added in v1.0.5
NativeSemanticJSON converts a supported native source subset directly to an executable SemanticProgram. It never retries the legacy textual frontend. Accepts a bounded Go scalar/function subset, including fixed-width integers.
func SemanticJSON ¶
Types ¶
type Capability ¶
type Capability struct {
Feature string `json:"feature"`
Backend string `json:"backend"`
Status string `json:"status"`
Reason string `json:"reason,omitempty"`
}
func BackendCapability ¶
func BackendCapability(feature, target string) Capability
type CompileInputKind ¶ added in v1.2.1
type CompileInputKind = backend.CompileInputKind
const ( InputSource CompileInputKind = backend.CompileInputSource InputAssembly CompileInputKind = backend.CompileInputAssembly InputMachine CompileInputKind = backend.CompileInputMachine InputObject CompileInputKind = backend.CompileInputObject InputExecutable CompileInputKind = backend.CompileInputExecutable )
type CompileOptions ¶ added in v1.2.1
type CompileOptions = backend.CompileOptions
type CompileOutputKind ¶ added in v1.2.1
type CompileOutputKind = backend.CompileOutputKind
const ( Source CompileOutputKind = backend.CompileSource Assembly CompileOutputKind = backend.CompileAssembly MachineCode CompileOutputKind = backend.CompileMachineCode Object CompileOutputKind = backend.CompileObject Executable CompileOutputKind = backend.CompileExecutable )
type CompileResult ¶ added in v1.2.1
type CompileResult = backend.CompileResult
func Compile ¶ added in v1.2.1
func Compile(source string, options CompileOptions) (CompileResult, error)
Compile uses the same ModernFrontend and canonical UAST as Transpile. Native outputs are encoded in-process; Assembly is an optional rendering.
type Language ¶
type TranspileRequest ¶ added in v1.0.6
type TranspileRequest = manytomany.TranspileRequest
TranspileRequest and TranspileTrace expose the same immutable diagnostic boundary used by the bundled GUI and CLI.
type TranspileTrace ¶ added in v1.0.6
type TranspileTrace = manytomany.TranspileTrace
func TranspileWithTrace ¶ added in v1.0.6
func TranspileWithTrace(request TranspileRequest) (string, TranspileTrace, error)
TranspileWithTrace is useful for differential diagnostics: it returns the exact hashes and native/runtime decision made by the common TranspileCore.
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
automatic-repair-synthesizer
command
automatic-repair-synthesizer turns the frozen V6 residuals into a small, deterministic repair basis.
|
automatic-repair-synthesizer turns the frozen V6 residuals into a small, deterministic repair basis. |
|
canonical-witness-matrix
command
canonical-witness-matrix executes the backend matrix from generated Canonical UAST witnesses.
|
canonical-witness-matrix executes the backend matrix from generated Canonical UAST witnesses. |
|
decompiler-evidence-join
command
decompiler-evidence-join joins the prepared external binary/decompiler evidence with the existing Primitive Compiler authority.
|
decompiler-evidence-join joins the prepared external binary/decompiler evidence with the existing Primitive Compiler authority. |
|
direct-validation
command
|
|
|
external-primitive-crosswalk
command
|
|
|
external-primitive-proof
command
|
|
|
final-target-closure
command
|
|
|
frontend-closure-report
command
frontend-closure-report prints the computed frontend closure axes from the productive parser/UAST implementation.
|
frontend-closure-report prints the computed frontend closure axes from the productive parser/UAST implementation. |
|
generic-corpus-fixpoint
command
|
|
|
machine-differential
command
Command machine-differential persists comparable Tree-sitter and generic machine traces.
|
Command machine-differential persists comparable Tree-sitter and generic machine traces. |
|
matrix-lowering-engine
command
|
|
|
matrix-workbench
command
matrix-workbench computes current implementation gaps without modifying source.
|
matrix-workbench computes current implementation gaps without modifying source. |
|
miner-cross-transpile
command
|
|
|
normalize-real-ts
command
|
|
|
observed-witness-replay
command
observed-witness-replay executes only source operations that have already been observed in a Canonical-UAST sidecar.
|
observed-witness-replay executes only source operations that have already been observed in a Canonical-UAST sidecar. |
|
primitive-compiler
command
|
|
|
primitive-complete-closure
command
primitive-complete-closure runs the existing primitive compiler against structured UAST demand evidence.
|
primitive-complete-closure runs the existing primitive compiler against structured UAST demand evidence. |
|
primitive-discovery
command
primitive-discovery computes an evidence-backed semantic demand and primitive reduction view.
|
primitive-discovery computes an evidence-backed semantic demand and primitive reduction view. |
|
primitive-mega-join
command
primitive-mega-join joins the universal primitive evidence pack with the existing semantic authority.
|
primitive-mega-join joins the universal primitive evidence pack with the existing semantic authority. |
|
primitive-source-discovery
command
primitive-source-discovery analyzes an existing source corpus exactly once per file.
|
primitive-source-discovery analyzes an existing source corpus exactly once per file. |
|
r2many
command
|
|
|
real-source-root-cause
command
real-source-root-cause derives replay-safe root-cause families from a frozen real-source validation run.
|
real-source-root-cause derives replay-safe root-cause families from a frozen real-source validation run. |
|
real-source-validation
command
real-source-validation runs the existing compiler API over the checked-in real-source corpus.
|
real-source-validation runs the existing compiler API over the checked-in real-source corpus. |
|
repair-frozen
command
repair-frozen consumes the immutable raw miner output and creates the separate repair quotient.
|
repair-frozen consumes the immutable raw miner output and creates the separate repair quotient. |
|
repository-primitive-closure
command
repository-primitive-closure resolves the repository-wide primitive handoff through one shared, data-driven implementation table.
|
repository-primitive-closure resolves the repository-wide primitive handoff through one shared, data-driven implementation table. |
|
signature-bind
command
signature-bind exposes the shared binder for differential matrix verification.
|
signature-bind exposes the shared binder for differential matrix verification. |
|
structured-matrix-repair
command
|
|
|
target-replay-one
command
|
|
|
tree-sitter-frontend-closure
command
tree-sitter-frontend-closure derives the conservative, reproducible Tree-sitter CST -> current frontend coverage matrices.
|
tree-sitter-frontend-closure derives the conservative, reproducible Tree-sitter CST -> current frontend coverage matrices. |
|
uast-corpus-matrix
command
|
|
|
uast-corpus-transpile
command
uast-corpus-transpile streams a source corpus through the productive source->UAST->target path.
|
uast-corpus-transpile streams a source corpus through the productive source->UAST->target path. |
|
uast-direct-lowering
command
|
|
|
uast-directory-transpile
command
uast-directory-transpile walks a local source tree and builds a source-free transpilation matrix.
|
uast-directory-transpile walks a local source tree and builds a source-free transpilation matrix. |
|
uast-emission-recipes
command
|
|
|
uast-execution-matrix
command
|
|
|
uast-extsem-matrix
command
|
|
|
uast-failure-matrix
command
uast-failure-matrix consolidates source-free corpus results into one normalized failure quotient.
|
uast-failure-matrix consolidates source-free corpus results into one normalized failure quotient. |
|
uast-matrix-adapter
command
uast-matrix-adapter writes the canonical input contract for the external uast-matrix-engine.
|
uast-matrix-adapter writes the canonical input contract for the external uast-matrix-engine. |
|
uast-runtime-promotion
command
|
|
|
uast-source-verify
command
|
|
|
uast-universal-lowering
command
Command uast-universal-lowering emits the matrix/report plane for the universal UAST lowering stage.
|
Command uast-universal-lowering emits the matrix/report plane for the universal UAST lowering stage. |
|
universal-truth-miner
command
universal-truth-miner derives a small, evidence-backed implication basis from structured PASS/UAST data.
|
universal-truth-miner derives a small, evidence-backed implication basis from structured PASS/UAST data. |
|
v6-authoritative-integration
command
v6-authoritative-integration compiles the structured v6 evidence into the existing matrix reports.
|
v6-authoritative-integration compiles the structured v6 evidence into the existing matrix reports. |
|
internal
|
|
|
backend
Code generated by cmd/uast-emission-recipes; DO NOT EDIT.
|
Code generated by cmd/uast-emission-recipes; DO NOT EDIT. |
|
corpusfixture
Package corpusfixture decodes Tree-sitter corpus fixture containers.
|
Package corpusfixture decodes Tree-sitter corpus fixture containers. |
|
extsemmatrix
Package extsemmatrix imports the proof-safe 13-language external semantic matrix and projects it onto the canonical UASF capability space.
|
Package extsemmatrix imports the proof-safe 13-language external semantic matrix and projects it onto the canonical UASF capability space. |
|
runtimeassets
Package runtimeassets exposes the runtime source already compiled into the executable.
|
Package runtimeassets exposes the runtime source already compiled into the executable. |
|
matrix-audit
command
matrix-audit exposes the existing transpilers without the GUI/runtimeassets dependency.
|
matrix-audit exposes the existing transpilers without the GUI/runtimeassets dependency. |