From 4a7b48eab8fe03ab061acaf2555eebdc9d7e76e9 Mon Sep 17 00:00:00 2001 From: Jan Travnicek <Jan.Travnicek@fit.cvut.cz> Date: Tue, 4 Sep 2018 08:37:18 +0200 Subject: [PATCH] wip documentation --- docs/userGuide/userGuide.tex | 40 +++++++++++++++++++++++------------- 1 file changed, 26 insertions(+), 14 deletions(-) diff --git a/docs/userGuide/userGuide.tex b/docs/userGuide/userGuide.tex index caef98acbe..9a4dbb4ca7 100644 --- a/docs/userGuide/userGuide.tex +++ b/docs/userGuide/userGuide.tex @@ -611,6 +611,32 @@ parse ; \end{lstlisting} +\subsection{Introspection} + +The query language supports listing of registered algorithms, their overloads, datatypes, and casts. The introspection command is executed by introspect keyword followed by the introspected entity, i.e. algorithms, overloads, datatypes, and casts. + +Algorithms introspection may use namespace names to narrow the query. The namespace name must end with fourdot. The result of the introspection is list of all algorithms (filtered by namespace if specified) one per line. + +Overloads introspection requires exact algorithm name. The result is a list of signatures of available overloads, one per line. Each signature consists of the return type followed by parameter types. + +Datatypes introspection allows to print datatypes that can be exported or imported as xml file. + +Casts introspection prints all available casts. Each cast is represented by to type and from type. The query may be limited to casts from or to specific type + +Some examples of introspection commands follow. + +\begin{lstlisting}[language=bash] +introspect algorithms +introspect algorithms automaton:: +introspect overloads automaton::determinize::Determinize +introspect datatypes +introspect casts +introspect casts :from int +introspect casts :to int +\end{lstlisting} + +\subsection{Execute} + In\_redirect\_file is parametrized by some clauses, the argument inside the brackets is a specification of the file type, the argument after the colon is the specification of the conteint of the file, and arguments after at sign give template paramters is needed. The file type specification are xml, string, raw, and file. The xml file type contains xml representation of some datatype. The string file type represent string representation of an automaton, grammar, regexp, or some other type (available to be listed via introspection. The raw file type is representation of unranked tree i.e. xml or linear string i.e. sequence of chars. The file file type reads the content of the file as standard string. @@ -623,26 +649,12 @@ Out\_redirect\_file knows the type of the value printed, hence only the file typ Use of out\_redirect symbol is overloaded and allows to set a variable. - - \section{Builtin commands} \chapter{Summary on registered commands} -\chapter{Introspection} - -\begin{lstlisting}[language=bash] -introspect algorithms -introspect algorithms automaton:: -introspect overloads automaton::determinize::Determinize -introspect datatypes -introspect casts -introspect casts :from int -introspect casts :to int -\end{lstlisting} - \appendix \chapter{Examples} -- GitLab