Skip to content

Instantly share code, notes, and snippets.

@koehlma
koehlma / modelsim.py
Last active July 30, 2024 07:19
Python interface to the ModelSim simulator.
# -*- coding: utf-8 -*-
# Copyright (C) 2016, Maximilian Köhl <[email protected]>
"""
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 <[email protected]>
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.