Appendix C: Code

Smodels Code:

§         Simple Modules

o        First encoding of integrity constraints (answer sets)

o        Second encoding of integrity constraints (answer sets)

o        Encoding classical disjunction (answer sets)

o        Satisfiability of existential universal formulas (answer sets)

o        Linear ordering of objects (answer sets)

o        Ordering of objects based on their id (answer sets)

o        Backward reasoning in the Yale shooting domain (answer sets without) (answer sets with)

§         Aggregates and its applications

o        The program to compute aggregation (answer sets)

o        Implementing cardinality constraints (answer sets)

o        Implementing weight constraints (answer sets)

§         Programs from Chapter 3

o        Yale shooting with incomplete initial state (answer sets)

o        Yale shooting with incomplete initial state and backward reasoning rules (answer sets)

o        Adding observations to yale0-3.sm (1) (2) (answer sets 1) (answer sets 2)

o        Adding observations to yale0-4.sm (1) (2) (answer sets 1) (answer sets 2)

§         Planning in STRIPS: blocks world

o        A blocks world planning problem (answer sets)

o        Blocks world planning with separate domain constraints

o        Blocks world planning with integrated domain constraints (answer sets)

§         Planning in richer languages

o        Blocks world with defined fluents, qualification and ramification (answer sets)

o        Blocks world in ADL (answer sets)

o        Approximate planning in presence of incompleteness (answer sets)

§         Planning : navigation in a downtown area with one way streets.

o        Planning from the initial state (answer sets)

o        Planning from the current state in presence of observations (answer sets)

§         Planning with procedural constraints

o        A simple plan execution module (answer sets)

o        A more sophisticated plan execution module

1.    unfolding test1

2.    unfolding test with $p(f)$ as rest2

3.    unfolding test with rest3 as rest2

4.    unfolding test with rest4 as rest2

5.    unfolding test with rest5 as rest2

§         Other programs from Chapter 4

o        An encoding of the NQueens problem (answer sets)

o        Another encoding of the NQueens problem (answer sets)

o        The Schur problem (answer sets)

o        An encoding of K-colorability (answer sets)

o        An encoding of Hamiltonian cycle (answer sets)

o        Minimal weight vertex cover (answer sets)

§         Smodels code with weight constraints and cardinaility constraints

o        Graph problems

o        Tournament scheduling

o        Knapsack

o        Combinatorial auctions

 

DLV code:

 

Smodels code at other sites:

 

DLV code at other sites: