semvec/pypi-packages huggingface dataset:
tcheckerpy 2026.2.20
A Python Interface for TChecker
Requires Python: >=3.9

# tcheckerpy

**tcheckerpy** is a Python interface to the [TChecker](https://github.com/Echtzeitsysteme/tchecker/) model checker, allowing you to analyze and compare timed automata models directly from Python.  
It provides access to the following TChecker tools:

- tck-compare
- tck-liveness
- tck-reach
- tck-simulate
- tck-syntax

For detailed documentation, refer to the [TChecker Wiki](https://github.com/ticktac-project/tchecker/wiki/Using-TChecker).

## Installation

You can install `tcheckerpy` via PyPI:

```bash
pip install tcheckerpy
```

## Usage Example

```python

# import required tools
from tcheckerpy.tools import tck_reach, tck_syntax

# read declaration of timed automata network from .txt or .tck file into string
with open(system_declaration_path) as file:
        system = file.read()

# raise error if syntax is incorrect
tck_syntax.check(system)

# perform reachability analysis
result, stats, certificate = tck_reach.reach(system, tck_reach.Algorithm.REACH, certificate = tck_reach.Certificate.GRAPH)
print(result)
print(stats)
print(certificate)

```

Example output (based on [ad94.txt](https://github.com/Echtzeitsysteme/tchecker/blob/master/examples/ad94.txt)):

```
False
MEMORY_MAX_RSS 41116
REACHABLE false
RUNNING_TIME_SECONDS 6.1474e-05
VISITED_STATES 7
VISITED_TRANSITIONS 8

digraph ad94_fig10 {
  0 [initial="true", intval="", labels="", vloc="<l0>", zone="(0<=x && 0<=y)"]
  1 [intval="", labels="", vloc="<l1>", zone="(1<x && 0<=y && 1<x-y)"]
  2 [intval="", labels="", vloc="<l1>", zone="(0<=x && 0<=y && 0<=x-y)"]
  3 [intval="", labels="", vloc="<l2>", zone="(1<x && 1<=y)"]
  4 [intval="", labels="", vloc="<l2>", zone="(1<=x && 1<=y)"]
  5 [intval="", labels="green", vloc="<l3>", zone="(1<x && 0<y && x-y<1)"]
  6 [intval="", labels="green", vloc="<l3>", zone="(0<=x && 0<=y && x-y<1)"]
  0 -> 2 [vedge="<P@a>"]
  1 -> 3 [vedge="<P@b>"]
  2 -> 4 [vedge="<P@b>"]
  2 -> 6 [vedge="<P@c>"]
  5 -> 1 [vedge="<P@a>"]
  5 -> 5 [vedge="<P@d>"]
  6 -> 2 [vedge="<P@a>"]
  6 -> 5 [vedge="<P@d>"]
}

```
lhab 0.3
Library Hallucinations Adversarial Benchmark — evaluate LLM code generation for hallucinated libraries.
Requires Python: >=3.11

# LHAB - ***L***ibrary ***H***allucinations ***A***dversarial ***B***enchmark

Evaluate LLM code generation for hallucinated (non-existent) libraries.

Part of the research paper *Library Hallucinations in LLMs: Risk Analysis Grounded in Developer Queries*.

Full dataset and leaderboard available on [HuggingFace](https://huggingface.co/datasets/itsluketwist/LHAB).
Source code on [GitHub](https://github.com/itsluketwist/realistic-library-hallucinations).

## *install*

```shell
pip install lhab
```

## *usage*

The package exposes three functions:

- **`lhab.load_dataset()`** — load the bundled benchmark dataset, returns a dictionary of splits (`control`, `describe`, `specify`), each containing a list of task records.

- **`lhab.evaluate_responses(responses_file)`** — evaluate LLM responses against the benchmark, detecting hallucinated libraries.
Saves results to a JSON file and returns a dictionary with statistics per split and type, plus all hallucinated library names.

- **`lhab.download_pypi_data()`** — download the latest PyPI package list for ground truth validation.
Called automatically on first evaluation if the data is not already present.

```python
import lhab

dataset = lhab.load_dataset()
# {"control": [...], "describe": [...], "specify": [...]}

results = lhab.evaluate_responses("your_responses.jsonl")
# {"control": {...}, "describe": {...}, "specify": {...}, "hallucinations": {...}}
```

A CLI command is also available:

```shell
lhab-eval your_responses.jsonl
```