Auto Documenter Output for the Example Module

Author(s): Anonymous Author 1, Anonymous Author 2.

This is where general comments on the file go. In this case the file is a library which contains some assertion examples for testing the automatic documentation system.

Usage and interface

Documentation on exports

REGTYPE

(True) Usage:bar(X)

X is an acceptable kind of bar.

    REGTYPE
    A regular type, defined as follows:
    baz(a).
    baz(b).
    

    REGTYPE
    A regular type, defined as follows:
    aorb(a).
    aorb(b).
    

    REGTYPE
    A regular type, defined as follows:
    tree_of(_1,void).
    tree_of(T,tree(_1,_2,_3)) :-
            call(T,_1),
            tree_of(T,_2),
            tree_of(T,_3).
    

    REGTYPE
    A regular type, defined as follows:
    list_or_aorb(T,_1) :-
            list(T,_1).
    list_or_aorb(_T,_1) :-
            aorb(_1).
    

    PREDICATE

    Usage 1:

    • The following properties should hold at call time:
      (var/1)Arg1 is a free variable.
      (gnd/1)Arg2 is ground.
      (int/1)Arg2 is an integer.
    • The following properties should hold upon exit:
      (gnd/1)Arg1 is ground.
      (int/1)Arg1 is an integer.
      (int/1)Arg2 is an integer.

    Usage 2:

    Non-moded types are best used this way.

    • Call and exit should be compatible with:
      (int/1)Arg1 is an integer.
      (list/1)Arg2 is a list.
    The predicate is of type dynamic.

    PREDICATE

    Usage:r(A)

    This uses parametric types

    • The following properties should hold at call time:
      (list/1)A is a list.
    • The following properties should hold upon exit:
      (list/2)A is a list of ints.
      (gnd/1)A is ground.
    • The following properties should hold globally:
      (not_fails/1)All the calls of the form r(A) do not fail.
    The predicate is of type data.

    PREDICATE

    Usage:

    • The following properties should hold at call time:
      (var/1)Arg1 is a free variable.
    • The following properties should hold upon exit:
      (list/1)Arg1 is a list.

    PREDICATE

    Usage:p(Arg1,Arg2,Arg3,Arg4,A)

    • Call and exit should be compatible with:
      (int/1)Arg1 is an integer.
      (list/2)Arg3 is a list of ints.
    • The following properties should hold at call time:
      (ground/1)Arg2 is currently ground (it contains no variables).
      (var/1)Arg4 is a free variable.
      (nonvar/1)A is currently a term which is not a free variable.
    • The following properties should hold upon exit:
      (gnd/1)Arg1 is ground.
      (ground/1)Arg2 is currently ground (it contains no variables).
    • The following properties should hold globally:
      (not_further_inst/2)Arg3 is not further instantiated.
      (steps_lb/2)1+length(A) is a lower bound on the cost of any call of the form p(Arg1,Arg2,Arg3,Arg4,A).

    PREDICATE

    Usage 1:

    • The following properties should hold at call time:
      (nonvar/1)Arg1 is currently a term which is not a free variable.
      (var/1)Arg2 is a free variable.
    • The following properties should hold upon exit:
      (gnd/1)Arg3 is ground.

    PROPERTY
    This is a property, describing a list that is longish. The definition is:

    long(L) :-
            length(L,N),
            N>100.
    

    Usage:long(L)

    L is rather long.

      PREDICATE

      (True) Usage:

      • Calls should, and exit will be compatible with:
        (list/2)Arg1 is a list of mytypes.
      • The following properties should hold at call time:
        (nonvar/1)Arg1 is currently a term which is not a free variable.

      PREDICATE
      No further documentation available for this predicate.

      PREDICATE

      Usage:t(A,B,C,D,E)

      This predicate uses modes extensively.

      • Call and exit should be compatible with:
        (list/1)A is a list.
        (list/1)B is a list.
        (int/1)C is an integer.
        (int/1)D is an integer.
        (list/1)E is a list.
      • The following properties should hold at call time:
        (nonvar/1)A is currently a term which is not a free variable.
        (var/1)B is a free variable.
        (long/1)B is rather long.
      • The following properties should hold upon exit:
        (gnd/1)E is ground.
        (gnd/1)C is ground.
        (gnd/1)A is ground.
      • The following properties should hold globally:
        (not_further_inst/2)D is not further instantiated.
        (not_fails/1)All the calls of the form t(A,B,C,D,E) do not fail.

      PREDICATE

      Usage:s(A)

      • The following properties should hold at call time:
        (list/1)A is a list.
      • The following properties should hold upon exit:
        (list/1)A is a list.
        (gnd/1)A is ground.
      • The following properties should hold globally:
        (not_fails/1)All the calls of the form s(A) do not fail.

      PREDICATE

      Usage 1:q(A)

      Foo

      • The following properties should hold at call time:
        (list/1)A is a list.
      • The following properties should hold upon exit:
        (list/1)A is a list.
        (gnd/1)A is ground.
      • The following properties should hold globally:
        (not_fails/1)All the calls of the form q(A) do not fail.

      Usage 2:q(A)

      Not a bad use at all.

        REGTYPE

        (True) Usage:list(L)

        L is a list.

          General properties:

          True:list(L)

          • The following properties hold globally:
            (sideff/2)list(L) is side-effect free.

          True:list(L)

          • If the following properties hold at call time:
            (ground/1)L is currently ground (it contains no variables).
            then the following properties hold globally:
            (eval/1)list(L) is evaluable at compile-time.
            (is_det/1)All calls of the form list(L) are deterministic.

          Trust:list(T)

          • The following properties hold upon exit:
            (list/1)T is a list.

          REGTYPE

          (True) Usage:list(L)

          L is a list.

            General properties:

            True:list(L)

            • The following properties hold globally:
              (sideff/2)list(L) is side-effect free.

            True:list(L)

            • If the following properties hold at call time:
              (ground/1)L is currently ground (it contains no variables).
              then the following properties hold globally:
              (eval/1)list(L) is evaluable at compile-time.
              (is_det/1)All calls of the form list(L) are deterministic.

            Trust:list(T)

            • The following properties hold upon exit:
              (list/1)T is a list.

            Documentation on multifiles

            PREDICATE
            A general comment on the predicate.

            Usage 1:ISO

            This mode is nice.

            • The following properties should hold at call time:
              (int/1)Arg1 is an integer.
              (int/1)Arg2 is an integer.
              (var/1)Arg3 is a free variable.
            • The following properties should hold upon exit:
              (int/1)Arg1 is an integer.
              (int/1)Arg2 is an integer.
              (list/1)Arg3 is a list.
            • The following properties should hold globally:
              (iso/1)Complies with the ISO-Prolog standard.
              (not_fails/1)All the calls of the form p(Arg1,Arg2,Arg3) do not fail.

            Usage 2:p(Preds,Value,Assoc)

            This mode is also nice.

            • The following properties should hold at call time:
              (var/1)Preds is a free variable.
              (var/1)Value is a free variable.
              (list/1)Assoc is a list.
            • The following properties should hold upon exit:
              (int/1)Preds is an integer.
              (int/1)Value is an integer.
              (list/1)Assoc is a list.
            • The following properties should hold globally:
              (not_fails/1)All the calls of the form p(Preds,Value,Assoc) do not fail.

            Usage 3:

            Just playing around.

            • The following properties should hold upon exit:
              (list/1)Arg1 is a list.
              (int/1)Arg2 is an integer.
              (list/1)Arg3 is a list.
            • The following properties should hold globally:
              (not_fails/1)All the calls of the form p(Arg1,Arg2,Arg3) do not fail.
              (not_fails/1)All the calls of the form p(Arg1,Arg2,Arg3) do not fail.
            The predicate is multifile.
            The predicate is of type dynamic.
            General properties:

            Module entry condition:

            • The following properties hold at call time:
              (gnd/1)Arg1 is ground.
              (var/1)Arg2 is a free variable.
              (var/1)Arg3 is a free variable.

            Check:

            • The following properties should hold at call time:
              (undefined property)foo(Arg1)
              (bar/1)Arg2 is an acceptable kind of bar.
              (baz/1)baz(Arg3)

            Check:

            • If the following properties hold at call time:
              (int/1)Arg1 is an integer.
              (int/1)Arg2 is an integer.
              (var/1)Arg3 is a free variable.
              then the following properties should hold upon exit:
              (int/1)Arg1 is an integer.
              (int/1)Arg2 is an integer.
              (gnd/1)Arg3 is ground.

            Check:

            • If the following properties hold at call time:
              (int/1)Arg1 is an integer.
              (int/1)Arg2 is an integer.
              (var/1)Arg3 is a free variable.
              then the following properties should hold globally:
              (not_fails/1)All the calls of the form p(Arg1,Arg2,Arg3) do not fail.

            Documentation on internals

            REGTYPE

            (True) Usage:list(L,T)

            L is a list of Ts.

              General properties:

              True:list(L,T)

              • The following properties hold globally:
                (sideff/2)list(L,T) is side-effect free.

              True:list(L,T)

              • If the following properties hold at call time:
                (ground/1)L is currently ground (it contains no variables).
                (ground/1)T is currently ground (it contains no variables).
                then the following properties hold globally:
                (eval/1)list(L,T) is evaluable at compile-time.

              Trust:list(X,T)

              • The following properties hold upon exit:
                (list/1)X is a list.

              MODE

              (True) Usage:og(A,T)

              This is a parametric mode definition.

              • Call and exit are compatible with:
                (undefined property)call(T,A)
              • The following properties are added upon exit:
                (gnd/1)A is ground.

              PREDICATE

              (Trust) Usage:Num is Expr

              Typical way to describe/document an external predicate (e.g., written in C).

              • The following properties should hold at call time:
                (arithexpression/1)Expr is an arithmetic expression.
              • The following properties hold upon exit:
                (num/1)Num is a number.