The main function, analysis of command line parameters and calling appropriate logic.
More...
Go to the source code of this file.
|
void | yyerror (char *s) |
| The procedure prints the information about the syntax error in the TPTP format. More...
|
|
void | printUsage (char *pname) |
| The procedure prints out information on how to invoke the program. More...
|
|
int | formulas (char *filename) |
| The procedure handles the option of syntax checking for input formulas. More...
|
|
int | proofs (char *filename) |
| The procedure handles the option of typechecking of proofs for given formulas. More...
|
|
int | main (int argc, char *argv[]) |
| The main procedure of the program. More...
|
|
int | typecheckFormula (Term *term, Type *type) |
| Typechecks the given term as the proof for the given type. More...
|
|
int | updateTypeVariables (Type *type, envmap *env, int arity) |
| The procedure is used to add to environment types of free predicates that occur in the formula. More...
|
|
int | updateTypeVariablesCas (McasIn cas, envmap *env) |
| The procedure is used to add to environment types of free predicates that occur in the given case subexpression of a term. More...
|
|
int | updateTypeVariablesTerm (Term *term, envmap *env) |
| The procedure is used to add to environment types of free predicates that occur in the given term. More...
|
|
Kind * | createArity (int arity) |
| The procedure creates the Kind that represents the given arity of a predicate. More...
|
|
|
int | waserror |
| The variable is used to communicate errors to functions that do not have appropriate arguments. More...
|
|
int | proof_parsing |
| The global variable that contains the proof parsing status. More...
|
|
The main function, analysis of command line parameters and calling appropriate logic.
- Author
- Aleksy Schubert
Kind* createArity |
( |
int |
arity | ) |
|
The procedure creates the Kind that represents the given arity of a predicate.
- Parameters
-
arity | the number of arguments of the standard carrier type |
- Returns
- the pointer to the freshly created Kind that represents the arity or
NULL
on error
int formulas |
( |
char * |
filename | ) |
|
The procedure handles the option of syntax checking for input formulas.
- Parameters
-
filename | the name of the file to parse formulas from |
- Returns
- 0 in case all is correctly parsed, other values on error
int main |
( |
int |
argc, |
|
|
char * |
argv[] |
|
) |
| |
The main procedure of the program.
The procedure parses the command line options with getopt and directs control to appropriate functions resulting from command line options. In case options are improper usage of the program is printed out.
- Parameters
-
argc | the number of command line chunks |
argv | the array of strings that contain command line chunks |
- Returns
- it returns the exit status of the program
void printUsage |
( |
char * |
pname | ) |
|
The procedure prints out information on how to invoke the program.
- Parameters
-
pname | the name of the executable the program is started from |
int proofs |
( |
char * |
filename | ) |
|
The procedure handles the option of typechecking of proofs for given formulas.
- Parameters
-
filename | the name of the file to parse a proof from |
- Returns
- 0 in case all is correctly parsed and typeckecked, other values on error
int typecheckFormula |
( |
Term * |
term, |
|
|
Type * |
type |
|
) |
| |
Typechecks the given term as the proof for the given type.
The procedure takes the given term, creates appropriate environment with the carrier type and types for the free predicates used in the formula.
- Parameters
-
term | the term to typecheck |
type | the type i.e. formula to check if the term is its proof |
- Returns
- true when typechecking is successful, false on error or when the proof is not for the given formula
int updateTypeVariables |
( |
Type * |
type, |
|
|
envmap * |
env, |
|
|
int |
arity |
|
) |
| |
The procedure is used to add to environment types of free predicates that occur in the formula.
- Parameters
-
type | the type to search for free predicates |
env | the environment to insert types for free predicates to |
arity | the computed so far arity of the next free predicate to insert |
- Returns
- 0 on error, other values when update is successful
The procedure is used to add to environment types of free predicates that occur in the given case subexpression of a term.
- Parameters
-
cas | the cas subexpression to search for free predicates |
env | the environment to insert types for free predicates to |
- Returns
- 0 on error, other values when update is successful
int updateTypeVariablesTerm |
( |
Term * |
term, |
|
|
envmap * |
env |
|
) |
| |
The procedure is used to add to environment types of free predicates that occur in the given term.
- Parameters
-
term | the term to search for free predicates |
env | the environment to insert types for free predicates to |
- Returns
- 0 on error, other values when update is successful
The procedure prints the information about the syntax error in the TPTP format.
- Parameters
-
s | the string passed from the yacc parser with information on the reason of error |
The global variable that contains the proof parsing status.
It serves to communicate this status to the yacc parser code. It has value 1 when the proof should be parsed from the input file and it has value 0 otherwise. Initially it is equal to 0.
The variable is used to communicate errors to functions that do not have appropriate arguments.
Initially it is equal to 0.