Commit b11527ae authored by yoogx's avatar yoogx
Browse files

Merge branch 'master' of https://github.com/OpenAADL/ocarina

parents 62eeff57 8d9b777a
...@@ -5,6 +5,74 @@ all.aadl:195:07: warning: layer_topsecret references a component type ...@@ -5,6 +5,74 @@ all.aadl:195:07: warning: layer_topsecret references a component type
all.aadl:196:07: warning: layer_secret references a component type all.aadl:196:07: warning: layer_secret references a component type
all.aadl:197:07: warning: layer_unclassified references a component type all.aadl:197:07: warning: layer_unclassified references a component type
ocarina: Total: 0 error and 6 warnings ocarina: Total: 0 error and 6 warnings
lib.real:15:23 Backends: warning : cardinal of set b is null
lib.real:15:11 Backends: warning : use default boolean value of true for operator '='
lib.real:15:23 Backends: warning : cardinal of set b is null
lib.real:15:11 Backends: warning : use default boolean value of true for operator '='
lib.real:15:23 Backends: warning : cardinal of set b is null
lib.real:15:11 Backends: warning : use default boolean value of true for operator '='
lib.real:15:23 Backends: warning : cardinal of set b is null
lib.real:15:11 Backends: warning : use default boolean value of true for operator '='
lib.real:15:23 Backends: warning : cardinal of set b is null
lib.real:15:11 Backends: warning : use default boolean value of true for operator '='
lib.real:15:23 Backends: warning : cardinal of set b is null
lib.real:15:11 Backends: warning : use default boolean value of true for operator '='
lib.real:15:23 Backends: warning : cardinal of set b is null
lib.real:15:11 Backends: warning : use default boolean value of true for operator '='
lib.real:15:23 Backends: warning : cardinal of set b is null
lib.real:15:11 Backends: warning : use default boolean value of true for operator '='
lib.real:15:23 Backends: warning : cardinal of set b is null
lib.real:15:11 Backends: warning : use default boolean value of true for operator '='
lib.real:15:23 Backends: warning : cardinal of set b is null
lib.real:15:11 Backends: warning : use default boolean value of true for operator '='
lib.real:117:20 Backends: warning : cardinal of set b_dst is null
lib.real:117:15 Backends: warning : unknown value, use default value of 0.0 for operator Min
lib.real:118:20 Backends: warning : cardinal of set b_cnx is null
lib.real:117:62 Backends: warning : unknown value, use default value of 0.0 for operator Min
lib.real:119:20 Backends: warning : cardinal of set b_dst is null
lib.real:119:15 Backends: warning : use default float value of 0.0 for operator Max
lib.real:120:20 Backends: warning : cardinal of set b_cnx is null
lib.real:119:62 Backends: warning : use default float value of 0.0 for operator Max
lib.real:117:20 Backends: warning : cardinal of set b_dst is null
lib.real:117:15 Backends: warning : unknown value, use default value of 0.0 for operator Min
lib.real:118:20 Backends: warning : cardinal of set b_cnx is null
lib.real:117:62 Backends: warning : unknown value, use default value of 0.0 for operator Min
lib.real:119:20 Backends: warning : cardinal of set b_dst is null
lib.real:119:15 Backends: warning : use default float value of 0.0 for operator Max
lib.real:120:20 Backends: warning : cardinal of set b_cnx is null
lib.real:119:62 Backends: warning : use default float value of 0.0 for operator Max
lib.real:117:20 Backends: warning : cardinal of set b_dst is null
lib.real:117:15 Backends: warning : unknown value, use default value of 0.0 for operator Min
lib.real:118:20 Backends: warning : cardinal of set b_cnx is null
lib.real:117:62 Backends: warning : unknown value, use default value of 0.0 for operator Min
lib.real:119:20 Backends: warning : cardinal of set b_dst is null
lib.real:119:15 Backends: warning : use default float value of 0.0 for operator Max
lib.real:120:20 Backends: warning : cardinal of set b_cnx is null
lib.real:119:62 Backends: warning : use default float value of 0.0 for operator Max
lib.real:117:20 Backends: warning : cardinal of set b_dst is null
lib.real:117:15 Backends: warning : unknown value, use default value of 0.0 for operator Min
lib.real:118:20 Backends: warning : cardinal of set b_cnx is null
lib.real:117:62 Backends: warning : unknown value, use default value of 0.0 for operator Min
lib.real:119:20 Backends: warning : cardinal of set b_dst is null
lib.real:119:15 Backends: warning : use default float value of 0.0 for operator Max
lib.real:120:20 Backends: warning : cardinal of set b_cnx is null
lib.real:119:62 Backends: warning : use default float value of 0.0 for operator Max
lib.real:117:20 Backends: warning : cardinal of set b_dst is null
lib.real:117:15 Backends: warning : unknown value, use default value of 0.0 for operator Min
lib.real:118:20 Backends: warning : cardinal of set b_cnx is null
lib.real:117:62 Backends: warning : unknown value, use default value of 0.0 for operator Min
lib.real:119:20 Backends: warning : cardinal of set b_dst is null
lib.real:119:15 Backends: warning : use default float value of 0.0 for operator Max
lib.real:120:20 Backends: warning : cardinal of set b_cnx is null
lib.real:119:62 Backends: warning : use default float value of 0.0 for operator Max
lib.real:117:20 Backends: warning : cardinal of set b_dst is null
lib.real:117:15 Backends: warning : unknown value, use default value of 0.0 for operator Min
lib.real:118:20 Backends: warning : cardinal of set b_cnx is null
lib.real:117:62 Backends: warning : unknown value, use default value of 0.0 for operator Min
lib.real:119:20 Backends: warning : cardinal of set b_dst is null
lib.real:119:15 Backends: warning : use default float value of 0.0 for operator Max
lib.real:120:20 Backends: warning : cardinal of set b_cnx is null
lib.real:119:62 Backends: warning : use default float value of 0.0 for operator Max
pok_security execution pok_security execution
Processing requirement : one_security_level_by_memory Processing requirement : one_security_level_by_memory
------------------------------------- -------------------------------------
...@@ -14,80 +82,60 @@ Evaluating theorem one_security_level_by_memory ...@@ -14,80 +82,60 @@ Evaluating theorem one_security_level_by_memory
Content of set p (lib.real:9:12) is Content of set p (lib.real:9:12) is
Content of set vp (lib.real:11:13) is Content of set vp (lib.real:11:13) is
Content of set b (lib.real:13:12) is Content of set b (lib.real:13:12) is
lib.real:15:23 Backends: warning : cardinal of set b is null
lib.real:15:11 Backends: warning : use default boolean value of true for operator '='
=> Result: TRUE => Result: TRUE
* Iterate for variable: main.i_node1_memory_topsecret * Iterate for variable: main.i_node1_memory_topsecret
Content of set p (lib.real:9:12) is Content of set p (lib.real:9:12) is
Content of set vp (lib.real:11:13) is Content of set vp (lib.real:11:13) is
Content of set b (lib.real:13:12) is Content of set b (lib.real:13:12) is
lib.real:15:23 Backends: warning : cardinal of set b is null
lib.real:15:11 Backends: warning : use default boolean value of true for operator '='
=> Result: TRUE => Result: TRUE
* Iterate for variable: main.i_node1_memory_secret * Iterate for variable: main.i_node1_memory_secret
Content of set p (lib.real:9:12) is Content of set p (lib.real:9:12) is
Content of set vp (lib.real:11:13) is Content of set vp (lib.real:11:13) is
Content of set b (lib.real:13:12) is Content of set b (lib.real:13:12) is
lib.real:15:23 Backends: warning : cardinal of set b is null
lib.real:15:11 Backends: warning : use default boolean value of true for operator '='
=> Result: TRUE => Result: TRUE
* Iterate for variable: main.i_node1_memory_unclassified * Iterate for variable: main.i_node1_memory_unclassified
Content of set p (lib.real:9:12) is Content of set p (lib.real:9:12) is
Content of set vp (lib.real:11:13) is Content of set vp (lib.real:11:13) is
Content of set b (lib.real:13:12) is Content of set b (lib.real:13:12) is
lib.real:15:23 Backends: warning : cardinal of set b is null
lib.real:15:11 Backends: warning : use default boolean value of true for operator '='
=> Result: TRUE => Result: TRUE
* Iterate for variable: main.i_node1_memory_driver * Iterate for variable: main.i_node1_memory_driver
Content of set p (lib.real:9:12) is Content of set p (lib.real:9:12) is
Content of set vp (lib.real:11:13) is Content of set vp (lib.real:11:13) is
Content of set b (lib.real:13:12) is Content of set b (lib.real:13:12) is
lib.real:15:23 Backends: warning : cardinal of set b is null
lib.real:15:11 Backends: warning : use default boolean value of true for operator '='
=> Result: TRUE => Result: TRUE
* Iterate for variable: main.i_node2_memory * Iterate for variable: main.i_node2_memory
Content of set p (lib.real:9:12) is Content of set p (lib.real:9:12) is
Content of set vp (lib.real:11:13) is Content of set vp (lib.real:11:13) is
Content of set b (lib.real:13:12) is Content of set b (lib.real:13:12) is
lib.real:15:23 Backends: warning : cardinal of set b is null
lib.real:15:11 Backends: warning : use default boolean value of true for operator '='
=> Result: TRUE => Result: TRUE
* Iterate for variable: main.i_node2_memory_topsecret * Iterate for variable: main.i_node2_memory_topsecret
Content of set p (lib.real:9:12) is Content of set p (lib.real:9:12) is
Content of set vp (lib.real:11:13) is Content of set vp (lib.real:11:13) is
Content of set b (lib.real:13:12) is Content of set b (lib.real:13:12) is
lib.real:15:23 Backends: warning : cardinal of set b is null
lib.real:15:11 Backends: warning : use default boolean value of true for operator '='
=> Result: TRUE => Result: TRUE
* Iterate for variable: main.i_node2_memory_secret * Iterate for variable: main.i_node2_memory_secret
Content of set p (lib.real:9:12) is Content of set p (lib.real:9:12) is
Content of set vp (lib.real:11:13) is Content of set vp (lib.real:11:13) is
Content of set b (lib.real:13:12) is Content of set b (lib.real:13:12) is
lib.real:15:23 Backends: warning : cardinal of set b is null
lib.real:15:11 Backends: warning : use default boolean value of true for operator '='
=> Result: TRUE => Result: TRUE
* Iterate for variable: main.i_node2_memory_unclassified * Iterate for variable: main.i_node2_memory_unclassified
Content of set p (lib.real:9:12) is Content of set p (lib.real:9:12) is
Content of set vp (lib.real:11:13) is Content of set vp (lib.real:11:13) is
Content of set b (lib.real:13:12) is Content of set b (lib.real:13:12) is
lib.real:15:23 Backends: warning : cardinal of set b is null
lib.real:15:11 Backends: warning : use default boolean value of true for operator '='
=> Result: TRUE => Result: TRUE
* Iterate for variable: main.i_node2_memory_driver * Iterate for variable: main.i_node2_memory_driver
Content of set p (lib.real:9:12) is Content of set p (lib.real:9:12) is
Content of set vp (lib.real:11:13) is Content of set vp (lib.real:11:13) is
Content of set b (lib.real:13:12) is Content of set b (lib.real:13:12) is
lib.real:15:23 Backends: warning : cardinal of set b is null
lib.real:15:11 Backends: warning : use default boolean value of true for operator '='
=> Result: TRUE => Result: TRUE
theorem one_security_level_by_memory is: TRUE theorem one_security_level_by_memory is: TRUE
...@@ -331,14 +379,6 @@ Content of set p_dest (lib.real:104:17) is ...@@ -331,14 +379,6 @@ Content of set p_dest (lib.real:104:17) is
Content of set vp2 (lib.real:106:14) is Content of set vp2 (lib.real:106:14) is
Content of set b_dst (lib.real:108:16) is Content of set b_dst (lib.real:108:16) is
Content of set b_cnx (lib.real:110:16) is Content of set b_cnx (lib.real:110:16) is
lib.real:117:20 Backends: warning : cardinal of set b_dst is null
lib.real:117:15 Backends: warning : unknown value, use default value of 0.0 for operator Min
lib.real:118:20 Backends: warning : cardinal of set b_cnx is null
lib.real:117:62 Backends: warning : unknown value, use default value of 0.0 for operator Min
lib.real:119:20 Backends: warning : cardinal of set b_dst is null
lib.real:119:15 Backends: warning : use default float value of 0.0 for operator Max
lib.real:120:20 Backends: warning : cardinal of set b_cnx is null
lib.real:119:62 Backends: warning : use default float value of 0.0 for operator Max
=> Result: TRUE => Result: TRUE
* Iterate for variable: main.i_node1_partition_secret * Iterate for variable: main.i_node1_partition_secret
...@@ -351,14 +391,6 @@ Content of set p_dest (lib.real:104:17) is ...@@ -351,14 +391,6 @@ Content of set p_dest (lib.real:104:17) is
Content of set vp2 (lib.real:106:14) is Content of set vp2 (lib.real:106:14) is
Content of set b_dst (lib.real:108:16) is Content of set b_dst (lib.real:108:16) is
Content of set b_cnx (lib.real:110:16) is Content of set b_cnx (lib.real:110:16) is
lib.real:117:20 Backends: warning : cardinal of set b_dst is null
lib.real:117:15 Backends: warning : unknown value, use default value of 0.0 for operator Min
lib.real:118:20 Backends: warning : cardinal of set b_cnx is null
lib.real:117:62 Backends: warning : unknown value, use default value of 0.0 for operator Min
lib.real:119:20 Backends: warning : cardinal of set b_dst is null
lib.real:119:15 Backends: warning : use default float value of 0.0 for operator Max
lib.real:120:20 Backends: warning : cardinal of set b_cnx is null
lib.real:119:62 Backends: warning : use default float value of 0.0 for operator Max
=> Result: TRUE => Result: TRUE
* Iterate for variable: main.i_node1_partition_unclassified * Iterate for variable: main.i_node1_partition_unclassified
...@@ -371,14 +403,6 @@ Content of set p_dest (lib.real:104:17) is ...@@ -371,14 +403,6 @@ Content of set p_dest (lib.real:104:17) is
Content of set vp2 (lib.real:106:14) is Content of set vp2 (lib.real:106:14) is
Content of set b_dst (lib.real:108:16) is Content of set b_dst (lib.real:108:16) is
Content of set b_cnx (lib.real:110:16) is Content of set b_cnx (lib.real:110:16) is
lib.real:117:20 Backends: warning : cardinal of set b_dst is null
lib.real:117:15 Backends: warning : unknown value, use default value of 0.0 for operator Min
lib.real:118:20 Backends: warning : cardinal of set b_cnx is null
lib.real:117:62 Backends: warning : unknown value, use default value of 0.0 for operator Min
lib.real:119:20 Backends: warning : cardinal of set b_dst is null
lib.real:119:15 Backends: warning : use default float value of 0.0 for operator Max
lib.real:120:20 Backends: warning : cardinal of set b_cnx is null
lib.real:119:62 Backends: warning : use default float value of 0.0 for operator Max
=> Result: TRUE => Result: TRUE
* Iterate for variable: main.i_node2_partition_topsecret * Iterate for variable: main.i_node2_partition_topsecret
...@@ -391,14 +415,6 @@ Content of set p_dest (lib.real:104:17) is ...@@ -391,14 +415,6 @@ Content of set p_dest (lib.real:104:17) is
Content of set vp2 (lib.real:106:14) is Content of set vp2 (lib.real:106:14) is
Content of set b_dst (lib.real:108:16) is Content of set b_dst (lib.real:108:16) is
Content of set b_cnx (lib.real:110:16) is Content of set b_cnx (lib.real:110:16) is
lib.real:117:20 Backends: warning : cardinal of set b_dst is null
lib.real:117:15 Backends: warning : unknown value, use default value of 0.0 for operator Min
lib.real:118:20 Backends: warning : cardinal of set b_cnx is null
lib.real:117:62 Backends: warning : unknown value, use default value of 0.0 for operator Min
lib.real:119:20 Backends: warning : cardinal of set b_dst is null
lib.real:119:15 Backends: warning : use default float value of 0.0 for operator Max
lib.real:120:20 Backends: warning : cardinal of set b_cnx is null
lib.real:119:62 Backends: warning : use default float value of 0.0 for operator Max
=> Result: TRUE => Result: TRUE
* Iterate for variable: main.i_node2_partition_secret * Iterate for variable: main.i_node2_partition_secret
...@@ -411,14 +427,6 @@ Content of set p_dest (lib.real:104:17) is ...@@ -411,14 +427,6 @@ Content of set p_dest (lib.real:104:17) is
Content of set vp2 (lib.real:106:14) is Content of set vp2 (lib.real:106:14) is
Content of set b_dst (lib.real:108:16) is Content of set b_dst (lib.real:108:16) is
Content of set b_cnx (lib.real:110:16) is Content of set b_cnx (lib.real:110:16) is
lib.real:117:20 Backends: warning : cardinal of set b_dst is null
lib.real:117:15 Backends: warning : unknown value, use default value of 0.0 for operator Min
lib.real:118:20 Backends: warning : cardinal of set b_cnx is null
lib.real:117:62 Backends: warning : unknown value, use default value of 0.0 for operator Min
lib.real:119:20 Backends: warning : cardinal of set b_dst is null
lib.real:119:15 Backends: warning : use default float value of 0.0 for operator Max
lib.real:120:20 Backends: warning : cardinal of set b_cnx is null
lib.real:119:62 Backends: warning : use default float value of 0.0 for operator Max
=> Result: TRUE => Result: TRUE
* Iterate for variable: main.i_node2_partition_unclassified * Iterate for variable: main.i_node2_partition_unclassified
...@@ -431,14 +439,6 @@ Content of set p_dest (lib.real:104:17) is ...@@ -431,14 +439,6 @@ Content of set p_dest (lib.real:104:17) is
Content of set vp2 (lib.real:106:14) is Content of set vp2 (lib.real:106:14) is
Content of set b_dst (lib.real:108:16) is Content of set b_dst (lib.real:108:16) is
Content of set b_cnx (lib.real:110:16) is Content of set b_cnx (lib.real:110:16) is
lib.real:117:20 Backends: warning : cardinal of set b_dst is null
lib.real:117:15 Backends: warning : unknown value, use default value of 0.0 for operator Min
lib.real:118:20 Backends: warning : cardinal of set b_cnx is null
lib.real:117:62 Backends: warning : unknown value, use default value of 0.0 for operator Min
lib.real:119:20 Backends: warning : cardinal of set b_dst is null
lib.real:119:15 Backends: warning : use default float value of 0.0 for operator Max
lib.real:120:20 Backends: warning : cardinal of set b_cnx is null
lib.real:119:62 Backends: warning : use default float value of 0.0 for operator Max
=> Result: TRUE => Result: TRUE
theorem mils_2 is: TRUE theorem mils_2 is: TRUE
......
...@@ -73,6 +73,28 @@ def instantiate (root_system): ...@@ -73,6 +73,28 @@ def instantiate (root_system):
return runOcarinaFunction (libocarina_python.instantiate, root_system) return runOcarinaFunction (libocarina_python.instantiate, root_system)
################################################################################
def set_real_theorem (theorem_name):
'''Set main REAL theorem
:param theorem_name: name of the theorem
:type theorem_name: string
'''
return runOcarinaFunction (libocarina_python.set_real_theorem, theorem_name)
################################################################################
def add_real_library (libraryname):
'''
:param libraryname: name of the theorem
:type libraryname: string
'''
return runOcarinaFunction (libocarina_python.add_real_library, libraryname)
################################################################################ ################################################################################
Backends = Enum ([ "polyorb_hi_ada", "polyorb_hi_c", "real_theorem"]) Backends = Enum ([ "polyorb_hi_ada", "polyorb_hi_c", "real_theorem"])
'''List of supported backends, used by :data:`generate`''' '''List of supported backends, used by :data:`generate`'''
......
...@@ -9,7 +9,7 @@ def printError(source, messages): ...@@ -9,7 +9,7 @@ def printError(source, messages):
for message in messages: for message in messages:
print message print message
def main(argv):ne def main(argv):
'''Test function''' '''Test function'''
import ocarina; import ocarina;
import lmp; import lmp;
......
#! /usr/bin/python #! /usr/bin/python
import OcarinaPython as ocarina; import ocarina
import lmp
def visitor (component,level) :
subcomponents=ocarina.AIN.Subcomponents(component);
if subcomponents is not None :
prefix=''
while ( len(prefix)<level ) :
prefix=prefix+'.'
for child in subcomponents :
print prefix,ocarina.getInstanceName(child)[0]
visitor(str(ocarina.AIN.Corresponding_Instance(child)),level+1)
def main (): def main ():
'''Test function''' '''Test function'''
err=ocarina.load("rma.aadl"); # load a file err=ocarina.load("rma.aadl"); # load a file
print 'load("rma.aadl")' print 'load("rma.aadl")'
if err[1].strip()!='': print err
print 'info message: \n', err[1] if err[1] != None:
print 'info message: ', err[1]
if err[2]!=[]: if err[2]!=[]:
print 'warning message: \n', err[2] print 'warning message: ', err[2]
if err[3]!=[]: if err[3]!=[]:
print 'error message: \n', err[3] print 'error message: ', err[3]
sys.exit(2) sys.exit(2)
err=ocarina.load("deployment.aadl"); # load a file err=ocarina.load("deployment.aadl"); # load a file
print 'load("deployment.aadl")' print 'load("deployment.aadl")'
if err[1].strip()!='': if err[1] != None:
print 'info message: \n', err[1] print 'info message: ', err[1]
if err[2]!=[]: if err[2]!=[]:
print 'warning message: \n', err[2] print 'warning message: ', err[2]
if err[3]!=[]: if err[3]!=[]:
print 'error message: \n', err[3] print 'error message: ', err[3]
sys.exit(2) sys.exit(2)
err=ocarina.analyze(); # analyze models err=ocarina.analyze(); # analyze models
print 'ocarina.analyze()' print 'ocarina.analyze()'
if err[1].strip()!='': if err[1] != None:
print 'info message: \n', err[1] print 'info message: ', err[1]
if err[2]!=[]: if err[2]!=[]:
print 'warning message: \n', err[2] print 'warning message: ', err[2]
if err[3]!=[]: if err[3]!=[]:
print 'error message: \n', err[3] print 'error message: ', err[3]
sys.exit(2) sys.exit(2)
err=ocarina.instantiate("rma.erc32"); # instantiate system err=ocarina.instantiate("rma.impl"); # instantiate system
print 'ocarina.instantiate("rma.erc32")' print 'ocarina.instantiate("rma.impl")'
if err[1].strip()!='': if err[1] != None:
print 'info message: \n', err[1] print 'info message: ', err[1]
if err[2]!=[]: if err[2]!=[]:
print 'warning message: \n', err[2] print 'warning message: ', err[2]
if err[3]!=[]: if err[3]!=[]:
print 'error message: \n', err[3] print 'error message: ', err[3]
sys.exit(2) sys.exit(2)
print '----------------------------------------------------'
print 'Number of Component Instances:'
print '----------------------------------------------------'
root=ocarina.getInstances('all')[0][0]
# root=ocarina.getRoot()
print ocarina.getInstanceName(root)[0]
visitor(root,1)
if __name__ == "__main__": if __name__ == "__main__":
main () main ()
......
...@@ -32,6 +32,9 @@ ...@@ -32,6 +32,9 @@
with Ada.Numerics.Generic_Elementary_Functions; with Ada.Numerics.Generic_Elementary_Functions;
with Ocarina.Namet; with Ocarina.Namet;
with Ocarina.Output; with Ocarina.Output;
with GNAT.OS_Lib; use GNAT.OS_Lib;
with Ocarina.Options; use Ocarina.Options;
with Outfiles; use Outfiles;
with Errors; use Errors; with Errors; use Errors;
with Locations; use Locations; with Locations; use Locations;
...@@ -3199,6 +3202,8 @@ package body Ocarina.Backends.REAL is ...@@ -3199,6 +3202,8 @@ package body Ocarina.Backends.REAL is
It : Natural := First; It : Natural := First;
Node : Node_Id; Node : Node_Id;
Success : Boolean; Success : Boolean;
Fd : File_Descriptor;
begin begin
Root_System := Instantiate_Model (AADL_Root); Root_System := Instantiate_Model (AADL_Root);
Exit_On_Error (No (AADL_Root), "Cannot instantiate AADL models"); Exit_On_Error (No (AADL_Root), "Cannot instantiate AADL models");
...@@ -3206,6 +3211,10 @@ package body Ocarina.Backends.REAL is ...@@ -3206,6 +3211,10 @@ package body Ocarina.Backends.REAL is
Success := Analyze (REAL_Language, Root_System); Success := Analyze (REAL_Language, Root_System);
Exit_On_Error (not Success, "Cannot analyze REAL specifications"); Exit_On_Error (not Success, "Cannot analyze REAL specifications");
if Output_Filename /= No_Name then
Fd := Set_Output (Output_Filename);
end if;
-- Runtime -- Runtime
while It <= Last (To_Run_Theorem_List) loop while It <= Last (To_Run_Theorem_List) loop
...@@ -3243,6 +3252,9 @@ package body Ocarina.Backends.REAL is ...@@ -3243,6 +3252,9 @@ package body Ocarina.Backends.REAL is
It := It + 1; It := It + 1;
end loop; end loop;
Set_Standard_Output;
Release_Output (Fd);
end Generate; end Generate;
---------- ----------
......
...@@ -148,7 +148,6 @@ package body Ocarina.Analyzer.REAL is ...@@ -148,7 +148,6 @@ package body Ocarina.Analyzer.REAL is
procedure Register_Library_Theorems (REAL_Library : Node_Id) is procedure Register_Library_Theorems (REAL_Library : Node_Id) is
pragma Assert (Kind (REAL_Library) = K_Root_Node); pragma Assert (Kind (REAL_Library) = K_Root_Node);
package RNU renames Ocarina.ME_REAL.REAL_Tree.Nutils;
N : Node; N : Node;
T : Node_Id; T : Node_Id;
...@@ -210,6 +209,11 @@ package body Ocarina.Analyzer.REAL is ...@@ -210,6 +209,11 @@ package body Ocarina.Analyzer.REAL is
end loop; end loop;
else else
-- Otherwise, iterate over Library theorems and fetch the
-- corresponding theorem.
RNU.Node_List.Init (To_Run_Theorem_List); -- Reset list of theorems
for J in RNU.Node_List.First .. RNU.Node_List.Last (Library_Theorems) for J in RNU.Node_List.First .. RNU.Node_List.Last (Library_Theorems)
loop loop
A := Library_Theorems.Table (J).Node; A := Library_Theorems.Table (J).Node;
...@@ -292,18 +296,18 @@ package body Ocarina.Analyzer.REAL is ...@@ -292,18 +296,18 @@ package body Ocarina.Analyzer.REAL is
-- For non-used library theorems, we still analyze them, -- For non-used library theorems, we still analyze them,
-- since they can be called directly through the API -- since they can be called directly through the API
-- for J in RNU.Node_List.First .. for J in RNU.Node_List.First ..
-- RNU.Node_List.Last (Library_Theorems) loop RNU.Node_List.Last (Library_Theorems) loop
-- Node := Library_Theorems.Table (J).Node; Node := Library_Theorems.Table (J).Node;
-- RNU.REAL_Root := Node; RNU.REAL_Root := Node;
-- if not Analyze_Sub_Theorem (RNU.REAL_Root) then if not Analyze_Sub_Theorem (RNU.REAL_Root) then
-- Display_Analyzer_Error Display_Analyzer_Error
-- (Root, "could not proceed to theorem analysis"); (Root, "could not proceed to theorem analysis");
-- return False; return False;
-- end if; end if;
-- end loop; end loop;
return True; return True;
end Analyze_Model; end Analyze_Model;
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- B o d y -- -- B o d y --
-- -- -- --
-- Copyright (C) 2005-2009 Telecom ParisTech, 2010-2015 ESA & ISAE. -- -- Copyright (C) 2005-2009 Telecom ParisTech, 2010-2016 ESA & ISAE. --
-- -- -- --
-- Ocarina is free software; you can redistribute it and/or modify under -- -- Ocarina is free software; you can redistribute it and/or modify under --
-- terms of the GNU General Public License as published by the Free Soft- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -29,11 +29,11 @@ ...@@ -29,11 +29,11 @@