Sunday, February 19, 2017

Selected Topics in Design & Verification

Model Checking and Synthesis with SMT

1. Verifying system against LTL spec → checking emptiness for NBW → finding bad lassos in run graph → checking existence of ranking functions → SMT model checking
2. Synthesizing system from LTL spec → using UF to represent transition relation and iterating through the possible numbers of states ($\le ~|B|^{|B|}$) → SMT model checking
3. In 1989, Pnueli and Rosner solved the LTL synthesis problem (2EXPTIME-complete): LTL $\phi$ → NBW (~ $2^{|\phi|}$) → DPW (~ $2^{|\phi|^{|\phi|}}$) → solve the game (~ $2^{|\phi|^{|\phi|}}$)

(DPW: deterministic parity word automata; NBW: nondeterministic Buchi word automata)

Tuesday, November 8, 2016

C# performance notes


  • for v.s foreach
    1. for loops on List are a bit more than 2 times cheaper than foreach loops on List.
    2. Looping on Array is around 2 times cheaper than looping on List.
    3. As a consequence, looping on Array using for is 5 times cheaper than looping on List using foreach.
    4. LinkedList only allows foreach loops, as it would take quadratic time to loop a LinkedList through indices.
    5. Looping overheads: for < foreach; Array ~ List < ArrayList < LinkedList
  • Everything stored in an ArrayList is an object. So be careful of the boxing/unboxing overhead.
  • String concatenation overheads are negligible outside loops.