- Apr 25, 2014
-
-
Matthew Dawson authored
Since variable subtypes can depend upon previously declared variables, emit the variables in the same order as defined. While some languages may not care, it is better to be safe then sorry. Also, since variables are now always emitted in defined order, remove some excess try .. catch blocks, which were attempting to handle the unknown order.
-
Matthew Dawson authored
Add support to SMTLIB and CVC3 to generate enumeration types.
-
Matthew Dawson authored
Add anotations to the class so the Fixed Point tests are run preoprly.
-
Matthew Dawson authored
The App class only still exists for easy of testing. But it definitely doesn't need a test that does nothing useful.
-
Matthew Dawson authored
Enumerations need to have a name so the enumerated type can be defined. Add the name as a property of type, so generators can get it easily. Also update the various users of the type to pass the name in the constructor.
-
- Feb 25, 2014
-
-
Matthew Dawson authored
Rename the class to avoid conflicts with new tests being generated. git-svn-id: https://groke.mcmaster.ca/svn/grad/colin/branches/TableTool_javization@11089 57e6efec-57d4-0310-aeb1-a6c144bb1a8b
-
Matthew Dawson authored
Add support for the generators to deal with enumeration types properly, along with making sure they won't generate output for other types of operations. Currently only addition is checked. git-svn-id: https://groke.mcmaster.ca/svn/grad/colin/branches/TableTool_javization@11088 57e6efec-57d4-0310-aeb1-a6c144bb1a8b
-
Matthew Dawson authored
VariableParser now deals with enumerated types correctly, and VariableCollection exposes the enumerated types as appropriately so that further parsing/generating will work correctly. git-svn-id: https://groke.mcmaster.ca/svn/grad/colin/branches/TableTool_javization@11087 57e6efec-57d4-0310-aeb1-a6c144bb1a8b
-
Matthew Dawson authored
Add support for both custom and unknown custom types. For now, all unknown types are simply treated as reals for generation purposes. Custom types can be registered with a particular VariableParser using any previously existing type. All the generation code ignores the new type name and continues as before. git-svn-id: https://groke.mcmaster.ca/svn/grad/colin/branches/TableTool_javization@11086 57e6efec-57d4-0310-aeb1-a6c144bb1a8b
-
Matthew Dawson authored
If an unknown error is received, treat it as a failure but without sample values. git-svn-id: https://groke.mcmaster.ca/svn/grad/colin/branches/TableTool_javization@11085 57e6efec-57d4-0310-aeb1-a6c144bb1a8b
-
Matthew Dawson authored
If an smtlib checker doesn't generate sample values, use an empty array so the system can handle everything properly. git-svn-id: https://groke.mcmaster.ca/svn/grad/colin/branches/TableTool_javization@11084 57e6efec-57d4-0310-aeb1-a6c144bb1a8b
-
Matthew Dawson authored
In preparation for enumerations, a more complete handling of variable information is required. Thus create a VariableCollection and use it appropriately. As much as possible, the VariableCollection is pushed down the stack as much as possible. git-svn-id: https://groke.mcmaster.ca/svn/grad/colin/branches/TableTool_javization@11083 57e6efec-57d4-0310-aeb1-a6c144bb1a8b
-
Matthew Dawson authored
VariableParser now needs to store information about custom types (specifically enumerations). Thus make parseVariable take an instance now by making it a method of VariableParser again. Also change the TET to use a global singleton (called TET) to store the TET's VariableParser (since the type information is global to Matlab). git-svn-id: https://groke.mcmaster.ca/svn/grad/colin/branches/TableTool_javization@11082 57e6efec-57d4-0310-aeb1-a6c144bb1a8b
-
- Nov 15, 2013
-
-
Matthew Dawson authored
git-svn-id: https://groke.mcmaster.ca/svn/grad/colin/branches/TableTool_javization@10859 57e6efec-57d4-0310-aeb1-a6c144bb1a8b
-
Matthew Dawson authored
Sometimes when starting up, a previous handle would clash with an existing handle, causing the TET to fail to load and locking Matlab into a state where it can no longer exit. Fix by ensuring on load no previous handle is ever used, and instead just regenerate all of them. git-svn-id: https://groke.mcmaster.ca/svn/grad/colin/trunk/TableTool@10858 57e6efec-57d4-0310-aeb1-a6c144bb1a8b
-
Matthew Dawson authored
Add parsing and generating support for the exponent operator. It currently doesn't support generation over fixed point values, since CVC3 doesn't include an easy to use function. git-svn-id: https://groke.mcmaster.ca/svn/grad/colin/branches/TableTool_javization@10857 57e6efec-57d4-0310-aeb1-a6c144bb1a8b
-
Matthew Dawson authored
Adds support for the implication operator in PVS (=>). Matlab's support for it is questionable, and thus ignored for now. The operator is supported in all layers, including generators. Note that due to matlab not supporting all the operators, GenericGeneratorTest now uses PVS to parse in its mega expression. This changed the parsed's expression's content, and thus the expression changed a little dramatically. git-svn-id: https://groke.mcmaster.ca/svn/grad/colin/branches/TableTool_javization@10856 57e6efec-57d4-0310-aeb1-a6c144bb1a8b
-
Matthew Dawson authored
For both SMTLIB and CVC3, variable subtypes conditions are now emitted into the necessary places. This doesn't directly relate to the PVS support added earlier. For now, no proof is done that the subtype has any allowed input, but that doesn't matter as the table would still be "valid" for no input. Determining that the connected Simulink blocks have correct typing is not considered currently. git-svn-id: https://groke.mcmaster.ca/svn/grad/colin/branches/TableTool_javization@10855 57e6efec-57d4-0310-aeb1-a6c144bb1a8b
-
Matthew Dawson authored
The subtype given for variables are now properly parsed into the entire system. Currently they are not actually used when generating the checker statements. The expressions are fully parsed expressions, ready for output however. git-svn-id: https://groke.mcmaster.ca/svn/grad/colin/branches/TableTool_javization@10854 57e6efec-57d4-0310-aeb1-a6c144bb1a8b
-
Matthew Dawson authored
Somehow the NotEquals operator fell through the cracks when implementing all the other operators. Add it in, along with the necessary tests so it will round trip the system properly. git-svn-id: https://groke.mcmaster.ca/svn/grad/colin/branches/TableTool_javization@10853 57e6efec-57d4-0310-aeb1-a6c144bb1a8b
-
Matthew Dawson authored
In order to support PVS style subtype expressions, the system has to be able to parser such expressions. To simplify the variable list parse, it simply extracts the PVS expressions as a single token, unprocessed. While requiring more parsing work for the subtype expression, it avoids the necessity of changing the parser in the future should a new subtype language be used. As part of this change, the variable list parser's lexer became to complicated to be expressed in Antlr's combined grammar format. Thus split it out. Everything works the same as before from an API point of view. git-svn-id: https://groke.mcmaster.ca/svn/grad/colin/branches/TableTool_javization@10852 57e6efec-57d4-0310-aeb1-a6c144bb1a8b
-
Matthew Dawson authored
Since any parser will have to test itself against a variety of operator, make life simple and have one set of tests for all operators. Also remove as much code duplication as possible, by having one generic method that takes an operator (as a String) and a parse function that handles calling the parse function and compares the result as appropriate. git-svn-id: https://groke.mcmaster.ca/svn/grad/colin/branches/TableTool_javization@10851 57e6efec-57d4-0310-aeb1-a6c144bb1a8b
-
Matthew Dawson authored
The subtypes given in tables are given in PVS syntax. To use these in other languages, the TET needs to parse PVS expressions. Note that this parser is very basic, and only handles the bare minimum needed. It only handles basic Math expressions, similar to Matlab. It doesn't do /= yet, due to missing support further down the stack. git-svn-id: https://groke.mcmaster.ca/svn/grad/colin/branches/TableTool_javization@10850 57e6efec-57d4-0310-aeb1-a6c144bb1a8b
-
Matthew Dawson authored
The code to find the operation for a given text string was hidding in the *Operation enumerations. Move this code into MatlabParser, as it isn't reusable as many languages use different symbols. git-svn-id: https://groke.mcmaster.ca/svn/grad/colin/branches/TableTool_javization@10849 57e6efec-57d4-0310-aeb1-a6c144bb1a8b
-
Matthew Dawson authored
Since all expressions are in fact general pupose expression, and not tied to Matlab in the slightest, avoid calling the classes as Matlab*. No actual functional change is required for this. git-svn-id: https://groke.mcmaster.ca/svn/grad/colin/branches/TableTool_javization@10848 57e6efec-57d4-0310-aeb1-a6c144bb1a8b
-
Matthew Dawson authored
Since MatlabParser has no reason to have an instance of it managed by a user, just make it use a single static method to access its functionality. Overall it makes code simpler (avoiding the nasty getRootExpression call). git-svn-id: https://groke.mcmaster.ca/svn/grad/colin/branches/TableTool_javization@10847 57e6efec-57d4-0310-aeb1-a6c144bb1a8b
-
Matthew Dawson authored
Instead of having new instances of VariableParser created, and thus wrapping a Map<String, Variable> in a very inelegant way, simply have a single method that actually does the VariableParser work, and directly returns the Map. Also ensure all tests + Matlab continue to work, and tighten up some extra imports and Matlab output in affected areas. git-svn-id: https://groke.mcmaster.ca/svn/grad/colin/branches/TableTool_javization@10846 57e6efec-57d4-0310-aeb1-a6c144bb1a8b
-
Matthew Dawson authored
The package name matlab2smt is really ugly, and not really representative of what it really does anymore. Thus create an expression package for the pieces representing an expression, and a parsers package for all parsers, including both the variable and the Matlab parsers. Also make MatlabParserOperatorParseTest not rely on (now) private members. Instead use the toString methods to get a generator independent representation, and test that it matches appropriately. git-svn-id: https://groke.mcmaster.ca/svn/grad/colin/branches/TableTool_javization@10845 57e6efec-57d4-0310-aeb1-a6c144bb1a8b
-
Matthew Dawson authored
Since the java code is turning into entire toolbox for dealing with tabular expressions, move the code to an appropriate package. Even if it doesn't become a full toolbox (for java), it is deeply used by the Matlab toolbox. Thus pull the name from there. git-svn-id: https://groke.mcmaster.ca/svn/grad/colin/branches/TableTool_javization@10844 57e6efec-57d4-0310-aeb1-a6c144bb1a8b
-
Matthew Dawson authored
Add some toString methods to aid debugging the operations setup. It isn't committed centrally as I'm not sure it is a good idea. git-svn-id: https://groke.mcmaster.ca/svn/grad/colin/branches/TableTool_javization@10843 57e6efec-57d4-0310-aeb1-a6c144bb1a8b
-
- Sep 30, 2013
-
-
Matthew Dawson authored
Handle the negative and fractional outputs from SMTLIB. This required extending the SMTLIB output grammar to accept negative and division operations. Currently the support is cheated some, so that only the necessary pieces are actually parsed. Further support for more operations will require extending the support further. git-svn-id: https://groke.mcmaster.ca/svn/grad/colin/branches/TableTool_javization@10724 57e6efec-57d4-0310-aeb1-a6c144bb1a8b
-
Matthew Dawson authored
Since periods are usually a wildcard, make sure to quote it so that it is properly handled as a period, and not any random value. git-svn-id: https://groke.mcmaster.ca/svn/grad/colin/branches/TableTool_javization@10723 57e6efec-57d4-0310-aeb1-a6c144bb1a8b
-
Matthew Dawson authored
To handle the case when more complicated output is received from SMTLIB, properly parse SMTLIB output. Due to ANTLR trying to consume the full stream, the SMTLIB response is first put in a string. A simple algorithm, using the brackets, is used to find the beginning and end. git-svn-id: https://groke.mcmaster.ca/svn/grad/colin/branches/TableTool_javization@10722 57e6efec-57d4-0310-aeb1-a6c144bb1a8b
-
Matthew Dawson authored
Update antlr to the latest release. Also adjust the Matlab Grammar to continue working. No functional change necessary. git-svn-id: https://groke.mcmaster.ca/svn/grad/colin/branches/TableTool_javization@10721 57e6efec-57d4-0310-aeb1-a6c144bb1a8b
-
Matthew Dawson authored
Update the assembly plugin, used to generate the jar with dependencies, to the latest released (non-beta) version. No functional change. git-svn-id: https://groke.mcmaster.ca/svn/grad/colin/branches/TableTool_javization@10720 57e6efec-57d4-0310-aeb1-a6c144bb1a8b
-
- Sep 27, 2013
-
-
Matthew Dawson authored
CVC3 doesn't allow decimal points to represent rational numbers. Thus simplify things by putting the literal into fractional form. Currently reduction is not attempted, and the simplest form is used. Ex. 4.56 becomes (456/100) (as tested in the accompanying unit test). git-svn-id: https://groke.mcmaster.ca/svn/grad/colin/branches/TableTool_javization@10714 57e6efec-57d4-0310-aeb1-a6c144bb1a8b
-
Matthew Dawson authored
Since queries is now a Java List, don't use matlab to combine them (it makes an array of Lists). Instead use the Java method addAll to do it. git-svn-id: https://groke.mcmaster.ca/svn/grad/colin/branches/TableTool_javization@10713 57e6efec-57d4-0310-aeb1-a6c144bb1a8b
-
Matthew Dawson authored
The CVC3 generator originally insured that the TCC numbering was always unqie for a table. Re-add this functionality. Specifically, when building the walker, add a parameter to its constructor to set its starting TCC number. git-svn-id: https://groke.mcmaster.ca/svn/grad/colin/branches/TableTool_javization@10712 57e6efec-57d4-0310-aeb1-a6c144bb1a8b
-
Matthew Dawson authored
Fixed point operations are now all tested. Due to literals automatically casting to reals, it is necessary to push the "x" variable further into the expression. To ensure everything works, add one more condition without x to make sure everything stays stable. Everything works, after adjusting search strings. Also, deal with both signed/unsigned fixed point types. git-svn-id: https://groke.mcmaster.ca/svn/grad/colin/branches/TableTool_javization@10711 57e6efec-57d4-0310-aeb1-a6c144bb1a8b
-
Matthew Dawson authored
When generating binary operations, the requested type sent down was the output type, not the input type. However, the generator expects the input type to know how to output the operation. Fix that. git-svn-id: https://groke.mcmaster.ca/svn/grad/colin/branches/TableTool_javization@10710 57e6efec-57d4-0310-aeb1-a6c144bb1a8b
-