Skip to content

Instantly share code, notes, and snippets.

@koehlma
koehlma / modelsim.py
Last active November 17, 2025 09:21
Python interface to the ModelSim simulator.
# -*- coding: utf-8 -*-
# Copyright (C) 2016, Maximilian Köhl <mail@koehlma.de>
"""
Python interface to the ModelSim simulator. The simulator is instrumented using FIFO pipes
such that it becomes fully controllable from within Python using TCL commands.
"""
import contextlib
@koehlma
koehlma / aig.py
Created January 20, 2017 19:20
Verification Project – Python Libraries
# -*- coding: utf-8 -*-
# Copyright (C) 2017, Maximilian Köhl <mail@koehlma.de>
def _literal(string):
literal = int(string)
return -(literal // 2) if literal & 1 else literal // 2
Require Import Relations.
Set Implicit Arguments.
Section LTL.
Variable State : Type.
(* Traces *)
CoInductive Trace : Type :=
| Cons : State -> Trace -> Trace.