You can find the online demo at:
http://contraintes.inria.fr/~coquery/tclp/exemples/demo.en.html.
There you can try to type check some programs by writing them into the
``Program to type check'' area, ex:
- append([],L,L).
append([X|L],L2,[X|R]) :- append(L,L2,R).
By clicking on the type inference button, you will get the
following result:
- %% tclp 0.2.99g
- %% starting type checking ...
- :- typeof append(list(A),list(A),list(A)) is pred.
- %% finished
You can also tell TCLP what Prolog/CLP dialect you are using with
CLP dialect box.
Here is a description of the different options you can use in the
online demo:
-
Clear clears the form.
- CLP dialect allows one to choose which Prolog/CLP dialect
the program to type check is made for. You can choose either ISO Prolog, GNU Prolog, SISCtus Prolog or load your
own type library with Other (file) and the Browse ...
button on the right.
- View built-in declarations allows you to view the type
definitions for the selected dialect.
- Program to type check: The source of the program to type
check must be placed on this area. You can also use the Browse
... button to use one of your own file directly instead of
copying it into the area.
- Optionnal type declaration: you can put any type
declaration in this area. You can also load them using the Browse ... button.
- Type inference starts the type check the program. The type
of unknown predicates defined in the program source will be infered
- Type check only starts the type checking of the
program. Does not infer the type of unknown predicates.
- Declared type of prints the type of the given predicate or
functor on the right. The syntax can be of the following forms:
-
append
- append/3
- append/X
- append(X,Y,Z)
- Declarations for module prints the content of the .typ file for the given module. This is useful if you want to
know available predicates and data structures of a peticular module.