Skip to main content

udsdoc

AUTOSAR DCM/CanTp/DEM ARXML → UDS (ISO 14229) specification documents (LaTeX → PDF) and ASAM ODX 2.2 / PDX (ISO 22901-1).

PyPI version Python License: MIT

udsdoc turns AUTOSAR diagnostic ARXML into a complete UDS specification and into ODX/PDX for diagnostic tooling. It offers two front-ends over the same pipeline: a GUI (local browser app) and a CLI (headless, CI/HPC-friendly).

Install

pip install udsdoc          # CLI core (LaTeX / Markdown / RST / ODX / PDX)
pip install udsdoc[web]     # GUI  (udsdoc --serve)
pip install udsdoc[all]     # everything (GUI + LLM verify + ECU testing)

PDF output needs a LaTeX distribution with xelatex (TeX Live / MiKTeX). No pip on the target machine? Grab the self-contained udsdoc.pyz from Releases — it runs with just a Python interpreter (python3 udsdoc.pyz input.arxml -o spec.tex).

GUI version

udsdoc --serve            # opens http://127.0.0.1:8765

The no-install static browser edition also generates LaTeX/PDX and performs local compliance analysis entirely in the tab. Its Pyodide runtime, Python wheels, WebLLM runtime, and odx-rs WASM are self-hosted and available offline after the first successful load.

For matrix-only SRA/SWA work, the CpM CSV files remain the primary input. The browser edition can optionally take the summary workbook as an answer/reference for the supported SID, DID, RID and DTC surface. It reconciles the CpM-derived surface before generating TeX/PDX; it does not render the workbook itself as a specification.

With an SRA reference, this produces two peer ECU variants (System1 and System2) because SRA is a dual-uC system. IDs whose answer-sheet row has no per-uC allocation are explicitly treated as shared; no routing or gateway is invented. With an SWA reference, output remains a single-uC specification.

  • Inputs — on the Generate tab, pick a BSW repository folder (or a built-in sample). It auto-discovers the ARXML (Dcm / CanTp / Dem) and the C sources; attach an optional Compliance Matrix CSV (+ a sources YAML) for a requirements-compliance chapter.
  • OutputsGenerate & Download a LaTeX ZIP that includes a compiled spec.pdf (Tex → PDF), or Export ODX / PDX for CANalyzer / CANoe.
  • LLM — the LLM tab connects the provider used by Verify Conditionally-Accepted comments: Claude (browser sign-in), ChatGPT / Gemini (paste an API key — the button opens the key page for you), or local Ollama (pick or install an open-source model). Credentials are stored locally under ~/.udsdoc/.

CLI version

# ARXML in → LaTeX + compiled PDF out
udsdoc dcm.arxml cantp.arxml --dem dem.arxml --pdf -o spec.tex

# auto-discover a whole BSW repo (ARXML + C sources)
udsdoc --repo /path/to/bsw-project --pdf -o spec.tex

# DID / RID C sources for variable cross-referencing
udsdoc dcm.arxml --c-source did.c --c-source rid.c -o spec.tex

# Compliance Matrix + verify the concluded OEM↔supplier dialogue vs. the
# implementation, emit ISO 22901-1 PDX
udsdoc dcm.arxml --dem dem.arxml \
  --compliance-matrix matrix.csv --verify --verify-mini \
  --format pdx -o out/spec
  • Inputs — ARXML as positional arguments (+ --dem), or a whole repository via --repo; C sources via --c-source; requirements via --compliance-matrix (+ --compliance-matrix-sources). The matrix loader accepts the classic req_id/description/source_ref/traces_to contract and real-world OEM/DOORS exports (ID / ObjectType_<proj> / … / CONTENT / AcceptanceState_<proj> / CommentToCustomer_<proj> / Comment_Customer_<proj> / Final_Agreement_Status) — the per-project header tag (_ZFLSRM, …) is stripped automatically, heading/information rows are skipped, and Final_Agreement_Status is honored as the negotiation state (see the compliance_matrix module docstring for the full mapping).
  • Outputs--format pdf / --pdf (Tex → PDF), --format pdx (ISO 22901-1 PDX; also tex, tex-zip — the structured multi-file LaTeX project as a ZIP — html, md, rst, odx). Exit codes: 0 ok / 1 runtime error / 2 usage error / 3 quality gate (--verify-strict, --validate, --odx-strict).

Python API:

from udsdoc import ArxmlParser, TexGenerator

spec = ArxmlParser().parse_multi(["dcm.arxml", "cantp.arxml"])
TexGenerator().generate(spec, "spec.tex")

Compliance verification

Verification is a local-first evidence pipeline:

  1. --verify runs deterministic status, trace, numeric, access, and lexical checks with no network access.
  2. --verify-mini adds the opt-in, dependency-free udsdoc-mini-semantic-v1 tier. It uses issue-scoped dialogue chronology, exact parsed-spec evidence, and mandatory abstention.
  3. --verify-llm sends only the unresolved residue to the configured model.

Missing SID/DID/RID/DTC/session/security traces can be inferred from explicitly anchored English or Japanese text. Bare hexadecimal values are ignored, and every inferred trace retains confidence and source evidence. The frozen 90-row compact-model benchmark measures 64.4% coverage, 91.4% accuracy on covered rows, 80.0% deviation precision, and 40.0% deviation recall. The low recall is why uncertain remains a first-class review outcome.

The Verify feature (does the concluded OEM↔supplier dialogue match the implementation?) works with Anthropic (Claude), any OpenAI-compatible endpoint (OpenAI, Gemini's OpenAI-compatible API, OpenRouter, …) or local Ollama. Configure it once, whichever way suits you:

  • GUI — the LLM tab: sign in with Claude, paste a ChatGPT / Gemini key, or pick an Ollama model.
  • Env varsUDSDOC_LLM_PROVIDER, UDSDOC_LLM_MODEL, UDSDOC_LLM_BASE_URL, UDSDOC_LLM_API_KEY (or a provider-native key such as ANTHROPIC_API_KEY / OPENAI_API_KEY / GEMINI_API_KEY).
  • CLI flags--llm-provider, --llm-model, --llm-base-url, --llm-api-key, or --llm-config <file>.
  • Config file~/.udsdoc/llm.json ({"provider", "model", "base_url", "api_key", "timeout"}).

The static browser edition does not expose remote API-key providers. It can send uncertain rows to Ollama at the fixed loopback endpoint 127.0.0.1:11434, or run a consent-loaded WebLLM model in the browser. Model weights are not bundled. See the local-AI architecture and privacy contract for data-flow, offline, grounding, and reproducible benchmark details.

License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

udsdoc-0.186.0.tar.gz (2.4 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

udsdoc-0.186.0-py3-none-any.whl (2.2 MB view details)

Uploaded Python 3

File details

Details for the file udsdoc-0.186.0.tar.gz.

File metadata

  • Download URL: udsdoc-0.186.0.tar.gz
  • Upload date:
  • Size: 2.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for udsdoc-0.186.0.tar.gz
Algorithm Hash digest
SHA256 e1ab497d66d23bda85423db3ff2fe022afcda21593d838a97c21f8b58d720f46
MD5 a310356a87ed9902d17c9bb904ea3f13
BLAKE2b-256 40565fab55daa42b2c5acf11b6eff51f4d64d4d729e8ead7a49a8e11df806f57

See more details on using hashes here.

Provenance

The following attestation bundles were made for udsdoc-0.186.0.tar.gz:

Publisher: udsdoc-ci.yml on YutaroNakagama/udsdoc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file udsdoc-0.186.0-py3-none-any.whl.

File metadata

  • Download URL: udsdoc-0.186.0-py3-none-any.whl
  • Upload date:
  • Size: 2.2 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for udsdoc-0.186.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6b5d5dbe10fc8e7d3413f4372760d6b5cd7ec3d7be60fdf49596a226774d8b8d
MD5 1c09eb0f92dd74f1e311c96732d88091
BLAKE2b-256 1061a0e8f9d91e6af493025df054c498362b8005e86eda575a52b4597ad15314

See more details on using hashes here.

Provenance

The following attestation bundles were made for udsdoc-0.186.0-py3-none-any.whl:

Publisher: udsdoc-ci.yml on YutaroNakagama/udsdoc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.187.0

2 files

This release

0.186.0 This release

2 files

0.185.0

2 files

0.184.0

2 files

0.183.0

2 files

0.182.0

2 files

0.181.0

2 files

0.180.2

2 files

0.180.1

2 files

0.179.0

2 files

0.178.0

2 files

0.177.0

2 files

0.176.0

2 files

0.175.0

2 files

0.174.0

2 files

0.173.1

2 files

0.173.0

2 files

0.172.1

2 files

0.172.0

2 files

0.171.0

2 files

0.170.9

2 files

0.170.8

2 files

0.170.7

2 files

0.170.3

2 files

0.170.2

2 files

0.170.1

2 files

0.170.0

2 files

0.169.0

2 files

0.168.0

2 files

0.167.0

2 files

0.166.0

2 files

0.165.0

2 files

0.164.0

2 files

0.163.0

2 files

0.162.3

2 files

0.162.2

2 files

0.162.1

2 files

0.162.0

2 files

0.161.0

2 files

0.160.0

2 files

0.159.0

2 files

0.158.0

2 files

0.157.0

2 files

0.156.0

2 files

0.155.0

2 files

0.154.0

2 files

0.153.0

2 files

0.152.0

2 files

0.151.0

2 files

0.150.2

2 files

0.150.1

2 files

0.150.0

2 files

0.149.0

2 files

0.148.0

2 files

0.147.0

2 files

0.146.0

2 files

0.145.1

2 files

0.145.0

2 files

0.144.0

2 files

0.143.0

2 files

0.142.0

2 files

0.141.0

2 files

0.140.0

2 files

0.139.0

2 files

0.138.0

2 files

0.137.0

2 files

0.136.0

2 files

0.135.0

2 files

0.134.0

2 files

0.133.0

2 files

0.132.0

2 files

0.131.0

2 files

0.130.0

2 files

0.129.0

2 files

0.128.0

2 files

0.127.0

2 files

0.126.0

2 files

0.125.0

2 files

0.124.0

2 files

0.123.0

2 files

0.122.0

2 files

0.121.0

2 files

0.120.0

2 files

0.119.0

2 files

0.118.0

2 files

0.117.0

2 files

0.116.0

2 files

0.115.0

2 files

0.114.0

2 files

0.113.0

2 files

0.112.0

2 files

0.111.0

2 files

0.110.0

2 files

0.109.0

2 files

0.108.1

2 files

0.108.0

2 files

0.107.0

2 files

0.106.1

2 files

0.106.0

2 files

0.105.0

2 files

0.104.0

2 files

0.103.0

2 files

0.102.0

2 files

0.101.0

2 files

0.100.0

2 files

0.99.0

2 files

0.98.0

2 files

0.97.0

2 files

0.96.0

2 files

0.95.0

2 files

0.94.0

2 files

0.93.0

2 files

0.92.0

2 files

0.91.0

2 files

0.90.0

2 files

0.89.0

2 files

0.88.0

2 files

0.87.0

2 files

0.86.0

2 files

0.85.0

2 files

0.84.0

2 files

0.83.5

2 files

0.83.4

2 files

0.83.3

2 files

0.83.2

2 files

0.83.1

2 files

0.83.0

2 files

0.82.0

2 files

0.81.7

2 files

0.81.6

2 files

0.81.5

2 files

0.81.4

2 files

0.81.3

2 files

0.81.2

2 files

0.81.1

2 files

0.81.0

2 files

0.80.0

2 files

0.79.0

2 files

0.78.1

2 files

0.78.0

2 files

0.77.2

2 files

0.77.1

2 files

0.77.0

2 files

0.76.0

2 files

0.75.0

2 files

0.74.0

2 files

0.73.0

2 files

0.72.0

2 files

0.71.0

2 files

0.70.1

2 files

0.70.0

2 files

0.69.0

2 files

0.68.0

2 files

0.67.0

2 files

0.66.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page