coding UTF-8;

// License: CC0

// **************************************************************************************************************
// * This file is to specify values of various setting parameters of the RINPn.
// * This code in this file is written in the C-like simple scripting language "Vnano".
// * ( If you want, you can change the extension of this file to ".vnano" from ".txt". )
// * Please note following points when you modify the content in this file:
// * 
// *    * Right side of "//" will be ignored (used for or disabling a setting line, or for writing a comment).
// *    * Content of each setting line (excluding a comment part) must be end with ";".
// * 
// * For more details about the syntax of the Vnano, see the following page:
// * 
// *    https://www.vcssl.org/en-us/vnano/doc/tutorial/language
// *
// **************************************************************************************************************


// **************************************************************************************************************
//         - User Settings -
// **************************************************************************************************************


// --------------------------------------------------------------------------------------------------------------
// Specify the locale-code. You can switch the language used for displaying messages by this setting.
// (Type: string)
// --------------------------------------------------------------------------------------------------------------

// localeCode = "AUTO";      // Set automatically based on your environment
localeCode = "en-US";        // US English
// localeCode = "ja-JP";     // Japanese





// **************************************************************************************************************
//         - User Interface Settings -
// **************************************************************************************************************


// --------------------------------------------------------------------------------------------------------------
// Specify the size of the window.
// (Type: int)
// --------------------------------------------------------------------------------------------------------------

windowWidth = 540;            // Width (px)
windowHeight = 340;           // Height(px)
retractedWindowHeight = 160;  // Height when the key panel is retracted(px)


// --------------------------------------------------------------------------------------------------------------
// Specity the font sizes.
// (Type: int)
// --------------------------------------------------------------------------------------------------------------

textFieldFontSize = 18;    // Font size of INPUT/OUTPUT text fields
numberKeyFontSize = 18;    // Font size of number keys
behaviorKeyFontSize = 18;  // Font size of behavior keys ("=", "C", ...)
functionKeyFontSize = 14;  // Font size of function keys ("sin", "cos", ...)


// --------------------------------------------------------------------------------------------------------------
// Specify whether display the window of the RINPn on the top of all other windows or not.
// (Type: bool)
// --------------------------------------------------------------------------------------------------------------

stayOnTopOfAllWindows = false;        // No, not necessary
// stayOnTopOfAllWindows = true;      // Yes, display on the top


// --------------------------------------------------------------------------------------------------------------
// Specify the opacity of the window.
// (Type: float)
// --------------------------------------------------------------------------------------------------------------

windowOpacity = 0.9;     // 0.0 ~ 1.0


// --------------------------------------------------------------------------------------------------------------
// Specify the background color of the window.
// (Type: int)
// --------------------------------------------------------------------------------------------------------------

windowBackgroundColorR = 180;        // Red   (0 ~ 255)
windowBackgroundColorG = 220;        // Green (0 ~ 255)
windowBackgroundColorB = 255;        // Blue  (0 ~ 255)


// --------------------------------------------------------------------------------------------------------------
// Specify the background color of INPUT/OUTPUT text fields.
// (Type: int)
// --------------------------------------------------------------------------------------------------------------

textFieldBackgroundColorR = 100;     // Red   (0 ~ 255)
textFieldBackgroundColorG = 100;     // Green (0 ~ 255)
textFieldBackgroundColorB = 100;     // Blue  (0 ~ 255)


// --------------------------------------------------------------------------------------------------------------
// Specify the foreground color (the color of characters) of INPUT/OUTPUT text fields.
// (Type: int)
// --------------------------------------------------------------------------------------------------------------

textFieldForegroundColorR = 140;     // Red   (0 ~ 255)
textFieldForegroundColorG = 255;     // Green (0 ~ 255)
textFieldForegroundColorB = 180;     // Blue  (0 ~ 255)


// --------------------------------------------------------------------------------------------------------------
// Specify the foreground color (the color of characters) of labels of INPUT/OUTPUT text fields.
// (Type: int)
// --------------------------------------------------------------------------------------------------------------

textLabelForgroundColorR = 100;     // Red   (0 ~ 255)
textLabelForgroundColorG = 120;     // Green (0 ~ 255)
textLabelForgroundColorB = 140;     // Blue  (0 ~ 255)


// --------------------------------------------------------------------------------------------------------------
// Specify the foreground color (the color of characters) of key the panel retractor label.
// (Type: int)
// --------------------------------------------------------------------------------------------------------------

keyRetractorForegroundColorR = 100;     // Red   (0 ~ 255)
keyRetractorForegroundColorG = 120;     // Green (0 ~ 255)
keyRetractorForegroundColorB = 200;     // Blue  (0 ~ 255)





// **************************************************************************************************************
//         - Calculation Settings -
// **************************************************************************************************************


// --------------------------------------------------------------------------------------------------------------
// Specify whether round the calculated value or not.
// Note that, even when this option is disabled, a kind of rounding will be performed implicitly, for converting 
// internal binary data to finite decimal value (see: description of "performImplicitRoundingBeforeRounding").
// (Type: bool)
// --------------------------------------------------------------------------------------------------------------

outputRounderEnabled = true;        // Round
// outputRounderEnabled = false;    // Don't round


// --------------------------------------------------------------------------------------------------------------
// Specify how round the calculated value.
// (Type: string)
// --------------------------------------------------------------------------------------------------------------

roundingMode = "HALF_UP";
// roundingMode = "HALF_DOWN";
// roundingMode = "HALF_TO_EVEN";
// roundingMode = "UP";
// roundingMode = "DOWN";


// --------------------------------------------------------------------------------------------------------------
// Specify what part of the calculated value you want to round.
// (Type: string)
// --------------------------------------------------------------------------------------------------------------

roundingTarget = "SIGNIFICAND";           // Significand of the floating point number
// roundingTarget = "AFTER_FIXED_POINT";  // After the decimal point of the fixed point number


// --------------------------------------------------------------------------------------------------------------
// Specify what the length (digits) do you want to round the part of "roundingTarget" in.
// (Type: int)
// --------------------------------------------------------------------------------------------------------------

roundingLength = 10;


// --------------------------------------------------------------------------------------------------------------
// Specify whether perform the "implicit rounding" before round the calculated value or not. 
// The "implicit rounding" is the rounding for converting a binary internal data (64bit float) to a decimal value 
// within the finite digits (the theoritical converted result might have infinite digits).
// The implicit rounding are always performed when "outputRounderEnabled" option is disabled. In addition, 
// when the following option is enabled (set true), the implicit rounding will be performed even when the 
// "outputRounderEnabled" option is enabled, before the "explicit" rounding specified above is performed.
// For example, if you input 1.005, the internal unrounded output value will be 1.00499..., so when you round it
// into 3 digit on HALF_UP mode, you get 1 without the implicit rounding, and get 1.01 with the implicit rounding.
// (Type: bool)
// --------------------------------------------------------------------------------------------------------------

performImplicitRoundingBeforeRounding = true;        // With implicit rounding
// performImplicitRoundingBeforeRounding = false;    // Without implicit rounding


// --------------------------------------------------------------------------------------------------------------
// The option to handle integers written in inputted expressions as floating-point numbers (64bit).
// IF YOU DISABLE THIS OPTION, PLEASE BE AWARE THAT THE RESULT OF DIVISION BETWEEN INTEGERS WILL BE AN INTEGER.
// This option does not affect to the interpretation of the code in script files.
// (Type: bool)
// --------------------------------------------------------------------------------------------------------------

evalIntLiteralAsFloat = true;          // Enable
// evalIntLiteralAsFloat = false;      // Disable


// --------------------------------------------------------------------------------------------------------------
// The option to forbid using non-float type values/variables/functions(return value) in inputted expressions.
// This option is strongly recommended to be enabled when "evalIntLiteralAsFloat" option is enabled, to prevent 
// overlooking "contermination" of integer values, which can cause of unexpected integer divisions.
// This option does not affect to the interpretation of the code in script files.
// (Type: bool)
// --------------------------------------------------------------------------------------------------------------

evalOnlyFloat = evalIntLiteralAsFloat;


// --------------------------------------------------------------------------------------------------------------
// The option to allows only expressions as the input
// (so, variable declaration, loop, and other statements will be denied).
// This option does not affect to the interpretation of the code in script files.
// (Type: bool)
// --------------------------------------------------------------------------------------------------------------

evalOnlyExpression = true;          // Enable
// evalOnlyExpression = false;      // Disable


// --------------------------------------------------------------------------------------------------------------
// Specify whether take Unicode-normalization to the inputted content or not.
// (Type: bool)
// --------------------------------------------------------------------------------------------------------------

inputNormalizerEnabled = true;        // Normalize
// inputNormalizerEnabled = false;    // Don't normalize





// **************************************************************************************************************
//         - Library/Plug-in Settings -
// **************************************************************************************************************

// Note: When you want to add new library scripts or plug-ins, modify following files:
//   * lib/VnanoLibraryList.txt
//   * plugin/VnanoPluginList.txt

// --------------------------------------------------------------------------------------------------------------
// Specify whether reload plug-ins for each calculation (or execution of a script) or not.
// When you are developing a new plug-in and testing/debugguing it on the GUI mode, this option might be helpful.
// Please note that, if you enable (set "true") this option, behaviour of plug-ins having internal states change, 
// because internal states will be re-initialized for each calculation. 
// Therefore, we recommend to set this option to "false" after when you have finished to develop new plug-ins.
// (Type: bool)
// --------------------------------------------------------------------------------------------------------------

reloadPlugin = false;     // Don't reload
// reloadPlugin = true;   // Reload


// --------------------------------------------------------------------------------------------------------------
// Specify whether reload contents of library scripts for each calculation (or execution of a script) or not.
// If you disable (set "false") this option, responses of calculations may going to be little quick.
// However, on the current version, disabling this option have very little effect for responses.
// (Type: bool)
// --------------------------------------------------------------------------------------------------------------

reloadLibrary = true;       // Reload
// reloadLibrary = false;   // Don't reload





// **************************************************************************************************************
//         - Script Process Settings -
// **************************************************************************************************************

// --------------------------------------------------------------------------------------------------------------
// Specify whether always print error message to the standard error output, even in GUI mode.
// If this option is set to false, in GUI mode, an error message will displayed only as a pop-up window.
// (Type: bool)
// --------------------------------------------------------------------------------------------------------------

alwaysPrintError = true;       // Always print errors to the standard error output
// alwaysPrintError = false;   // Print only in CUI mode


// --------------------------------------------------------------------------------------------------------------
// Specify whether print stack traces to the standard error output, when errors/exceptions occurred.
// (Type: bool)
// --------------------------------------------------------------------------------------------------------------

exceptionStackTracerEnabled = true;        // Print
// exceptionStackTracerEnabled = false;    // Don't print


// --------------------------------------------------------------------------------------------------------------
// Specify whether dump intermediate code, Abstract Syntax Tree (AST), etc.  (for debugging)
// (Type: bool)
// --------------------------------------------------------------------------------------------------------------

dumperEnabled = false;      // Don't dump
// dumperEnabled = true;    // Dump


// --------------------------------------------------------------------------------------------------------------
// Specify the content to dump. (for debugging)
// (Type: string)
// --------------------------------------------------------------------------------------------------------------

dumperTarget = "ALL";                  // All of the following contents
// dumperTarget = "INPUTTED_CODE";     // Content of the inputted inputted code
// dumperTarget = "PREPROCESSED_CODE"; // Result code of the preprocessor
// dumperTarget = "TOKEN";             // Tokens generated by the lexical analyzer
// dumperTarget = "PARSED_AST";        // AST generated by the parser
// dumperTarget = "ANALYZED_AST";      // AST generated by the semantic analyzer
// dumperTarget = "ASSEMBLY_CODE";     // Virtual assembly code generated by the compiler
// dumperTarget = "OBJECT_CODE";       // Virtual object code running on the VM, generated by the assembler
// dumperTarget = "ACCELERATOR_CODE";  // Optimized instruction code running on the high-speed VM 
// dumperTarget = "ACCELERATOR_STATE"; // Internal state of the initialized accelerator


// --------------------------------------------------------------------------------------------------------------
// Specify whether enable the high-speed VM or not. If the behaviour seems to be strange, disable it.
// (Type: bool)
// --------------------------------------------------------------------------------------------------------------

acceleratorEnabled = true;         // Enable   (Max performance: About 700 MFLOPS ~ 10 GFLOPS)
// acceleratorEnabled = false;     // Disable  (Max performance: About 20 MFLOPS)


// --------------------------------------------------------------------------------------------------------------
// Specify the optimization level of the high-speed VM.
// The larger level make the processing speed faster, but chance of encountering unknown bugs might increase.
// (Type: int)
// --------------------------------------------------------------------------------------------------------------

acceleratorOptimizationLevel = 0;
// acceleratorOptimizationLevel = 1; // Optimize data access for reducing overhead costs
// acceleratorOptimizationLevel = 2; // Optimize instructions with keeping code structures
// acceleratorOptimizationLevel = 3; // Optimize with modifying code structures (inline expansion, etc.)

