Commit 34997f8d authored by jhugues's avatar jhugues

* New command line parameter -real_theorem to force the name

           of one theorem to be analysed 

       * Minor reformatting and bugfixes when manipulating trees            



git-svn-id: https://tecsw.estec.esa.int/svn/taste/trunk/ocarina@2656 129961e7-ef38-4bb5-a8f7-c9a525a55882
parent 1b683e20
......@@ -315,6 +315,7 @@ package body Ocarina.Backends.REAL is
if Success then
Success := Manage_Check_Expression (R);
end if;
exit when not Success;
end loop;
......
This diff is collapsed.
......@@ -57,4 +57,8 @@ package Ocarina.Analyzer.REAL is
-- the library theorem list (ie. REAL theorems that must *not*
-- be called directly).
Main_Theorem : Name_Id := No_Name;
-- Name of the main theorem to be evaluated, by default evaluate
-- all theorems.
end Ocarina.Analyzer.REAL;
......@@ -47,10 +47,12 @@ with Ocarina.Analyzer.REAL;
with Namet;
package body Ocarina.FE_REAL.Parser is
use Ocarina.ME_REAL.REAL_Tree.Nodes;
use Ocarina.ME_REAL.REAL_Tree.Utils;
use Ocarina.ME_REAL.REAL_Tree.Nutils;
use Ocarina.ME_REAL.Tokens;
use Ocarina.Analyzer.Real;
use Ocarina.Builder.REAL;
use Ocarina.FE_REAL.Lexer;
use Ocarina.FE_REAL.Parser_Errors;
......@@ -1934,7 +1936,7 @@ package body Ocarina.FE_REAL.Parser is
Initialize_Option_Scan;
loop
C := Getopt ("* real_lib:");
C := Getopt ("* real_lib: real_theorem:");
case C is
when ASCII.NUL =>
exit;
......@@ -1944,6 +1946,10 @@ package body Ocarina.FE_REAL.Parser is
REAL_Libs.Append (Get_String_Name (Parameter));
end if;
if Full_Switch = "real_theorem" then
Main_Theorem := Get_String_Name (Parameter);
end if;
when others =>
null;
end case;
......@@ -1957,7 +1963,6 @@ package body Ocarina.FE_REAL.Parser is
for J in REAL_Libs.First .. REAL_Libs.Last loop
declare
use Ocarina.Analyzer.REAL;
use Ocarina.Files;
Buffer : Location;
......
......@@ -68,7 +68,8 @@ package body Ocarina.FE_REAL is
procedure Usage is
begin
Write_Line (" -real_lib Add a REAL file to be used as a theorem "&
"libraries by REAL annexes");
"library by REAL annexes");
Write_Line (" -real_theorem <theorem> Evaluate only theorem");
end Usage;
end Ocarina.FE_REAL;
......@@ -1038,8 +1038,9 @@ procedure Ocarina_Cmd is
Initialize_Option_Scan;
loop
case Getopt ("* aadlv1 aadlv2 help o: c d g: "
& "r: real_lib: boundt_process: disable-annexes=: "
& "i p q v V s x t?") is
& "r: real_lib: real_theorem: boundt_process: "
& "disable-annexes=: "
& "i p q v V s x t?") is
when 'a' =>
if Full_Switch = "aadlv2" then
AADL_Version := AADL_V2;
......
lib.real:12:17: warning: Unable to determine actualy returned type.
lib.real:19:24: warning: Unable to determine actualy returned type.
lib.real:33:03: warning: Returned boolean value will be casted to a float at runtime
lib.real:33:03: warning: Returned integer value will be cast to a float at runtime
test_env_subtheorem_call_no_parameter execution
Evaluating x
value for x after evaluating sub_theorem_1 is 2.00000E+00
......
......@@ -33,7 +33,8 @@ Usage:
-I Specify the inclusion paths
-aadlv1 Use AADL v1 standard (default)
-aadlv2 Use AADL v2 standard
-real_lib Add a REAL file to be used as a theorem libraries by REAL annexes
-real_lib Add a REAL file to be used as a theorem library by REAL annexes
-real_theorem <theorem> Evaluate only theorem
-g Generate code from the AADL instance tree
Registered backends:
petri_nets
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment