Skip to content

Glossary

Generates a glossary with detailed information of all predicates using their predicate documentation. See the predicate documentation section for more details.

Each predicate generates a section in the TOC.

Each predicate section includes the references for each file where the predicate was used.

Example


Glossary

sudoku(X,Y,V)

Describes a sudoku board. The value of cell (X,Y) is V.

Parameter Description
X

the row of the cell

Y

the column of the cell

V

the value of the cell

References
48
  1 { sudoku(X,Y,V) : val(V) } 1 :- pos(X,Y).
51
  :- sudoku(X,Y,V), sudoku(X',Y,V), X != X'.
51
  :- sudoku(X,Y,V), sudoku(X',Y,V), X != X'.
52
  :- sudoku(X,Y,V), sudoku(X,Y',V), Y != Y'.
52
  :- sudoku(X,Y,V), sudoku(X,Y',V), Y != Y'.
53
  :- sudoku(X,Y,V), sudoku(X',Y',V), subgrid(X,Y,S), subgrid(X',Y',S), (X,Y)!=(X',Y').
53
  :- sudoku(X,Y,V), sudoku(X',Y',V), subgrid(X,Y,S), subgrid(X',Y',S), (X,Y)!=(X',Y').
55
  sudoku(X,Y,V) :- initial(X,Y,V).
60
  #show sudoku/3.


initial(X,Y,V)

Initial values of the sudoku board. The value of cell (X,Y) is V.

Parameter Description
X

the row of the cell

Y

the column of the cell

V

the value of the cell

References
55
  sudoku(X,Y,V) :- initial(X,Y,V).


pos(X,Y)

The cell (X,Y) is in the sudoku board.

Parameter Description
X

the row of the cell

Y

the column of the cell

References
7
  pos(X,Y) :- val(X), val(Y).
45
  subgrid(X,Y,(((X-1)/dim)*dim+((Y-1)/dim))) :- pos(X,Y).
48
  1 { sudoku(X,Y,V) : val(V) } 1 :- pos(X,Y).


subgrid(A, B, C)
References
45
  subgrid(X,Y,(((X-1)/dim)*dim+((Y-1)/dim))) :- pos(X,Y).
53
  :- sudoku(X,Y,V), sudoku(X',Y',V), subgrid(X,Y,S), subgrid(X',Y',S), (X,Y)!=(X',Y').
53
  :- sudoku(X,Y,V), sudoku(X',Y',V), subgrid(X,Y,S), subgrid(X',Y',S), (X,Y)!=(X',Y').


val(V)

The value V is a possible value for a cell.

Parameter Description
V

the value

References
6
  val(1..dim*dim).
7
  pos(X,Y) :- val(X), val(Y).
7
  pos(X,Y) :- val(X), val(Y).
48
  1 { sudoku(X,Y,V) : val(V) } 1 :- pos(X,Y).


::: examples/sudoku/encoding.lp
    handler: asp
    options:
        glossary: true
        start_level: 3

Configuration options

The option glossary can be further customized with the following options:

  • include_undocumented Boolean indicating if predicates that have no docstring should be included. Defaults to True.
  • include_hidden Boolean indicating if predicates that are not shown nor input should be included. Defaults to True.
  • include_references Boolean indicating if each predicate documentations should include a section with the references. Defaults to True.

Example


Glossary

sudoku(X,Y,V)

Describes a sudoku board. The value of cell (X,Y) is V.

Parameter Description
X

the row of the cell

Y

the column of the cell

V

the value of the cell


initial(X,Y,V)

Initial values of the sudoku board. The value of cell (X,Y) is V.

Parameter Description
X

the row of the cell

Y

the column of the cell

V

the value of the cell


pos(X,Y)

The cell (X,Y) is in the sudoku board.

Parameter Description
X

the row of the cell

Y

the column of the cell


subgrid(A, B, C)


val(V)

The value V is a possible value for a cell.

Parameter Description
V

the value


::: examples/sudoku/encoding.lp
    handler: asp
    options:
        glossary:
            include_references: false
        start_level: 3