Skip to content

Commit

Permalink
job: xtuml#34 #590 Updated ex2 test model to test a class operation t…
Browse files Browse the repository at this point in the history
…hat returns an integer when given a real (through demotion).
  • Loading branch information
cortlandstarrett committed Jan 21, 2015
1 parent 0b72fd6 commit 9a78c79
Show file tree
Hide file tree
Showing 32 changed files with 1,075 additions and 998 deletions.
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?><launchConfiguration type="org.eclipse.ui.externaltools.ProgramBuilderLaunchConfigurationType">
<stringAttribute key="org.eclipse.debug.core.ATTR_REFRESH_SCOPE" value="${working_set:&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;launchConfigurationWorkingSet editPageId=&quot;org.eclipse.ui.resourceWorkingSetPage&quot; factoryID=&quot;org.eclipse.ui.internal.WorkingSetFactory&quot; id=&quot;1350567911216_3&quot; label=&quot;working set&quot; name=&quot;working set&quot;&gt;&#13;&#10;&lt;item factoryID=&quot;org.eclipse.ui.internal.model.ResourceFactory&quot; path=&quot;/ex2&quot; type=&quot;4&quot;/&gt;&#13;&#10;&lt;/launchConfigurationWorkingSet&gt;}"/>
<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
<mapAttribute key="org.eclipse.debug.core.environmentVariables">
<mapEntry key="MGLS_ATTR_DISPLAY" value="_6588"/>
</mapAttribute>
<stringAttribute key="org.eclipse.debug.ui.ATTR_CAPTURE_IN_FILE" value="${workspace_loc:/ex2}/mc_log.txt"/>
<booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false"/>
<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_BUILDER_ENABLED" value="true"/>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="C:/MentorGraphics/BridgePoint/eclipse_extensions/BridgePoint/eclipse/plugins/com.mentor.nucleus.bp.mc.c.source_3.6.0/mc3020/bin/xtumlmc_build.exe"/>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value="full,incremental,"/>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS" value=" -home &quot;C:/MentorGraphics/BridgePoint/eclipse_extensions/BridgePoint/eclipse/plugins/com.mentor.nucleus.bp.mc.c.source_3.6.0/&quot; -l3s -e -d code_generation -O ../../src/"/>
<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY" value="${build_project}/gen"/>
<?xml version="1.0" encoding="UTF-8" standalone="no"?><launchConfiguration type="org.eclipse.ui.externaltools.ProgramBuilderLaunchConfigurationType">
<stringAttribute key="org.eclipse.debug.core.ATTR_REFRESH_SCOPE" value="${working_set:&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;launchConfigurationWorkingSet editPageId=&quot;org.eclipse.ui.resourceWorkingSetPage&quot; factoryID=&quot;org.eclipse.ui.internal.WorkingSetFactory&quot; id=&quot;1350567911216_3&quot; label=&quot;working set&quot; name=&quot;working set&quot;&gt;&#13;&#10;&lt;item factoryID=&quot;org.eclipse.ui.internal.model.ResourceFactory&quot; path=&quot;/ex2&quot; type=&quot;4&quot;/&gt;&#13;&#10;&lt;/launchConfigurationWorkingSet&gt;}"/>
<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
<mapAttribute key="org.eclipse.debug.core.environmentVariables">
<mapEntry key="MGLS_ATTR_DISPLAY" value="_6588"/>
</mapAttribute>
<stringAttribute key="org.eclipse.debug.ui.ATTR_CAPTURE_IN_FILE" value="${workspace_loc:/ex2}/mc_log.txt"/>
<booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false"/>
<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_BUILDER_ENABLED" value="true"/>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="/media/psf/Home/bpu/bp/eclipse_extensions/BridgePoint/eclipse/plugins/com.mentor.nucleus.bp.mc.c.source_4.2.0/mc3020/bin/xtumlmc_build.exe"/>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value="full,incremental,"/>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS" value=" -home &quot;/media/psf/Home/bpu/bp/eclipse_extensions/BridgePoint/eclipse/plugins/com.mentor.nucleus.bp.mc.c.source_4.2.0/&quot; -l3s -e -d code_generation -O ../../src/"/>
<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY" value="${build_project}/gen"/>
</launchConfiguration>
100 changes: 51 additions & 49 deletions VandMC_testing/mctest/ex2/mc_log.txt
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,54 +1,56 @@
Wed Oct 31 18:29:32 2012
xtumlmc_build -home C:/MentorGraphics/BridgePoint/eclipse_extensions/BridgePoint/eclipse/plugins/com.mentor.nucleus.bp.mc.c.source_3.6.0/ -l3s -e -d code_generation -O ../../src/
Upgrading translation workspace: code_generation
Tue Jan 20 18:28:39 2015
xtumlmc_build -home /media/psf/Home/bpu/bp/eclipse_extensions/BridgePoint/eclipse/plugins/com.mentor.nucleus.bp.mc.c.source_4.2.0/ -l3s -e -d code_generation -O ../../src/
Upgrading translation workspace: code_generation
NOTE: Domain code 0 allocated for this import.
NOTE: The domain code you have entered has already been used/allocated, but will allow this import to proceed normally.
q.mc_metamodel.populate.arc: 362: INFO: Marked configuration package system_build found.
sys.arc: 17: INFO: starting Tue Jan 20 18:28:45 2015
q.sys.populate.arc: 377: INFO: Marked configuration package system_build found.
m.domain.arc: 97: INFO: Function setup marked as initialization function.
m.domain.arc: 97: INFO: Function test marked as initialization function.
m.domain.arc: 173: INFO: Enabling state transition tracing for component(s) *.
m.domain.arc: 213: INFO: Enabling detection of empty handles for component(s) *.
sys.arc: 151: INFO: System level marking complete.
q.domain.analyze.arc: 23: INFO: Analyzing model and making optimizations....
q.domain.analyze.arc: 45: INFO: Self queue is needed.
q.domain.analyze.arc: 48: INFO: Nonself queue is needed.
q.domain.analyze.arc: 51: INFO: Attributes read is 17.
q.domain.analyze.arc: 52: INFO: Attributes written is 17.
q.domain.analyze.arc: 54: INFO: 2 attributes got optimized out.
q.oal.translate.arc: 106: INFO: translating values
q.oal.translate.arc: 110: INFO: translating control statements
q.oal.translate.arc: 112: INFO: translating other statements
q.oal.translate.arc: 114: INFO: done translating statements
q.domain.bridges.arc: 29: INFO: File '_ch/ARCH_bridge.h' CREATED.
q.domain.bridges.arc: 35: INFO: File '_ch/ARCH_bridge.c' CREATED.
q.domain.bridges.arc: 29: INFO: File '_ch/NVS_bridge.h' CREATED.
q.domain.bridges.arc: 35: INFO: File '_ch/NVS_bridge.c' CREATED.
q.domain.bridges.arc: 29: INFO: File '_ch/PERSIST_bridge.h' CREATED.
q.domain.bridges.arc: 35: INFO: File '_ch/PERSIST_bridge.c' CREATED.
q.domain.bridges.arc: 29: INFO: File '_ch/LOG_bridge.h' CREATED.
q.domain.bridges.arc: 35: INFO: File '_ch/LOG_bridge.c' CREATED.
q.domain.bridges.arc: 29: INFO: File '_ch/ex2_BR_bridge.h' CREATED.
q.domain.bridges.arc: 35: INFO: File '_ch/ex2_BR_bridge.c' CREATED.
q.classes.arc: 31: INFO: File '_ch/ex2_TCE_class.h' CREATED.
q.classes.arc: 36: INFO: File '_ch/ex2_TCE_class.c' CREATED.
q.classes.arc: 31: INFO: File '_ch/ex2_A_class.h' CREATED.
q.classes.arc: 36: INFO: File '_ch/ex2_A_class.c' CREATED.
q.classes.arc: 31: INFO: File '_ch/ex2_DR_class.h' CREATED.
q.classes.arc: 36: INFO: File '_ch/ex2_DR_class.c' CREATED.
q.classes.arc: 31: INFO: File '_ch/ex2_TRAN_class.h' CREATED.
q.classes.arc: 36: INFO: File '_ch/ex2_TRAN_class.c' CREATED.
q.classes.arc: 31: INFO: File '_ch/ex2_NOI_class.h' CREATED.
q.classes.arc: 36: INFO: File '_ch/ex2_NOI_class.c' CREATED.
q.components.arc: 31: INFO: File '_ch/ex2.h' CREATED.
q.components.arc: 78: INFO: File '_ch/ex2_classes.h' CREATED.
q.components.arc: 85: INFO: File '_ch/ex2.c' CREATED.
sys.arc: 251: INFO: File '_ch/ex2_sys_main.c' CREATED.
sys.arc: 312: INFO: File '_ch/sys_xtuml.h' CREATED.
sys.arc: 319: INFO: File '_ch/sys_xtuml.c' CREATED.
sys.arc: 352: INFO: File '_ch/ex2_sys_types.h' CREATED.
sys.arc: 358: INFO: File '_ch/sys_user_co.h' CREATED.
sys.arc: 364: INFO: File '_ch/sys_user_co.c' CREATED.
sys.arc: 370: INFO: File '_ch/TIM_bridge.h' CREATED.
sys.arc: 376: INFO: File '_ch/TIM_bridge.c' CREATED.
Code generation complete.
Wed Oct 31 18:30:10 2012
m.domain.arc: 240: INFO: Enabling detection of empty handles for component(s) *.
q.domain.analyze.arc: 25: INFO: Analyzing model and making optimizations....
q.oal.analyze.arc: 232: INFO: Self event queue needed.
q.oal.analyze.arc: 235: INFO: Instance event queue needed.
q.oal.analyze.arc: 287: INFO: 10 attributes read
q.oal.analyze.arc: 289: INFO: 10 attributes written
q.main.arc: 45: INFO: translating values/expressions
q.oal.translate.arc: 79: INFO: translating control statements
q.oal.translate.arc: 81: INFO: translating other statements
q.oal.translate.arc: 83: INFO: rolling up statements into action bodies
q.oal.translate.arc: 85: INFO: done translating statements
sys.arc: 97: INFO: System level marking complete.
q.domain.bridges.arc: 28: INFO: File '_ch/ARCH_bridge.h' CREATED.
q.domain.bridges.arc: 34: INFO: File '_ch/ARCH_bridge.c' CREATED.
q.domain.bridges.arc: 28: INFO: File '_ch/NVS_bridge.h' CREATED.
q.domain.bridges.arc: 34: INFO: File '_ch/NVS_bridge.c' CREATED.
q.domain.bridges.arc: 28: INFO: File '_ch/PERSIST_bridge.h' CREATED.
q.domain.bridges.arc: 34: INFO: File '_ch/PERSIST_bridge.c' CREATED.
q.domain.bridges.arc: 28: INFO: File '_ch/LOG_bridge.h' CREATED.
q.domain.bridges.arc: 34: INFO: File '_ch/LOG_bridge.c' CREATED.
q.domain.bridges.arc: 28: INFO: File '_ch/ex2_BR_bridge.h' CREATED.
q.domain.bridges.arc: 34: INFO: File '_ch/ex2_BR_bridge.c' CREATED.
q.classes.arc: 30: INFO: File '_ch/ex2_DR_class.h' CREATED.
q.classes.arc: 35: INFO: File '_ch/ex2_DR_class.c' CREATED.
q.classes.arc: 30: INFO: File '_ch/ex2_TCE_class.h' CREATED.
q.classes.arc: 35: INFO: File '_ch/ex2_TCE_class.c' CREATED.
q.classes.arc: 30: INFO: File '_ch/ex2_A_class.h' CREATED.
q.classes.arc: 35: INFO: File '_ch/ex2_A_class.c' CREATED.
q.classes.arc: 30: INFO: File '_ch/ex2_TRAN_class.h' CREATED.
q.classes.arc: 35: INFO: File '_ch/ex2_TRAN_class.c' CREATED.
q.classes.arc: 30: INFO: File '_ch/ex2_NOI_class.h' CREATED.
q.classes.arc: 35: INFO: File '_ch/ex2_NOI_class.c' CREATED.
q.components.arc: 38: INFO: File '_ch/ex2.h' CREATED.
q.components.arc: 82: INFO: File '_ch/ex2_classes.h' CREATED.
q.components.arc: 95: INFO: File '_ch/ex2.c' CREATED.
sys.arc: 211: INFO: File '_ch/ex2_sys_main.c' CREATED.
sys.arc: 270: INFO: File '_ch/sys_xtuml.h' CREATED.
sys.arc: 277: INFO: File '_ch/sys_xtuml.c' CREATED.
sys.arc: 311: INFO: File '_ch/ex2_sys_types.h' CREATED.
sys.arc: 317: INFO: File '_ch/sys_user_co.h' CREATED.
sys.arc: 323: INFO: File '_ch/sys_user_co.c' CREATED.
sys.arc: 330: INFO: File '_ch/TIM_bridge.h' CREATED.
sys.arc: 336: INFO: File '_ch/TIM_bridge.c' CREATED.
sys.arc: 354: INFO: ending Tue Jan 20 18:30:16 2015
Code generation complete.
Tue Jan 20 18:30:16 2015
Original file line number Diff line number Diff line change
Expand Up @@ -2223,8 +2223,10 @@ INSERT INTO SM_ACT
'a = TRAN::ret_int(i:5) + 10;
b = TRAN::ret_int(i:8)/4 + TRAN::ret_int(i:3)*2;
c = TRAN::ret_int(i:2) * TRAN::ret_int(i:3)/TRAN::ret_int(i:6);
pi = 3.14;
d = TRAN::ret_int_from_real( r:pi );

if ((a == 15) and (b == 8) and (c == 1))
if ((a == 15) and (b == 8) and (c == 1) and (d == 3))
LOG::LogSuccess (message:"Test Compound Expressions - Transforms within Expressions") ;
else
LOG::LogFailure (message:"Test Compound Expressions - Transforms within Expressions") ;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,26 @@ INSERT INTO O_TPARM
'',
"00000000-0000-0000-0000-000000000000",
'');
INSERT INTO O_TFR
VALUES ("00bdfb3c-0d0c-4ba1-a67d-c529c286afa9",
"567b72eb-7c36-42f8-9ce8-e17aef9ca79c",
'ret_int_from_real',
'',
"ba5eda7a-def5-0000-0000-000000000002",
0,
'return param.r;',
1,
'',
"61e1cf98-450b-45f3-a9b3-421ea781d209");
INSERT INTO O_TPARM
VALUES ("f6841616-9467-4da3-b724-4cceeb9ecabd",
"00bdfb3c-0d0c-4ba1-a67d-c529c286afa9",
'r',
"ba5eda7a-def5-0000-0000-000000000003",
0,
'',
"00000000-0000-0000-0000-000000000000",
'');
INSERT INTO O_NBATTR
VALUES ("0414c2a9-02d2-4a89-aebb-a2fee2063fca",
"567b72eb-7c36-42f8-9ce8-e17aef9ca79c");
Expand Down
4 changes: 2 additions & 2 deletions VandMC_testing/mctest/ex2/src/ARCH_bridge.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
*
* External Entity: Architecture (ARCH)
*
* (C) Copyright 1998-2012 Mentor Graphics Corporation. All rights reserved.
* your copyright statement can go here (from te_copyright.body)
*--------------------------------------------------------------------------*/

#include "ex2_sys_types.h"
#include "ARCH_bridge.h"
#include "LOG_bridge.h"
#include "NVS_bridge.h"
#include "PERSIST_bridge.h"
#include "LOG_bridge.h"
#include "TIM_bridge.h"
#include "ARCH_bridge.h"
#include "ex2_sys_types.h"
Expand Down
2 changes: 1 addition & 1 deletion VandMC_testing/mctest/ex2/src/ARCH_bridge.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*
* External Entity: Architecture (ARCH)
*
* (C) Copyright 1998-2012 Mentor Graphics Corporation. All rights reserved.
* your copyright statement can go here (from te_copyright.body)
*--------------------------------------------------------------------------*/

#ifndef ARCH_BRIDGE_H
Expand Down
6 changes: 3 additions & 3 deletions VandMC_testing/mctest/ex2/src/LOG_bridge.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*
* External Entity: Logging (LOG)
*
* (C) Copyright 1998-2012 Mentor Graphics Corporation. All rights reserved.
* your copyright statement can go here (from te_copyright.body)
*--------------------------------------------------------------------------*/

#ifndef LOG_BRIDGE_H
Expand All @@ -22,8 +22,8 @@ void LOG_LogFailure( c_t[ESCHER_SYS_MAX_STRING_LEN] );
void LOG_LogInfo( c_t[ESCHER_SYS_MAX_STRING_LEN] );
void LOG_LogDate( Escher_Date_t, c_t[ESCHER_SYS_MAX_STRING_LEN] );
void LOG_LogTime( c_t[ESCHER_SYS_MAX_STRING_LEN], Escher_TimeStamp_t );
void LOG_LogReal( c_t[ESCHER_SYS_MAX_STRING_LEN], r_t );
void LOG_LogInteger( i_t );
void LOG_LogReal( c_t[ESCHER_SYS_MAX_STRING_LEN], const r_t );
void LOG_LogInteger( const i_t );

#ifdef __cplusplus
}
Expand Down
16 changes: 8 additions & 8 deletions VandMC_testing/mctest/ex2/src/NVS_bridge.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*
* External Entity: Non-Volatile Storage (NVS)
*
* (C) Copyright 1998-2012 Mentor Graphics Corporation. All rights reserved.
* your copyright statement can go here (from te_copyright.body)
*--------------------------------------------------------------------------*/

#ifndef NVS_BRIDGE_H
Expand All @@ -17,19 +17,19 @@ extern "C" {

#include "ex2_sys_types.h"

i_t NVS_insert( i_t, i_t, c_t[ESCHER_SYS_MAX_STRING_LEN], i_t );
i_t NVS_update( i_t, i_t, c_t[ESCHER_SYS_MAX_STRING_LEN], i_t );
i_t NVS_select( i_t, i_t, c_t[ESCHER_SYS_MAX_STRING_LEN], i_t );
i_t NVS_remove( i_t, i_t, c_t[ESCHER_SYS_MAX_STRING_LEN], i_t );
i_t NVS_insert( const i_t, const i_t, c_t[ESCHER_SYS_MAX_STRING_LEN], const i_t );
i_t NVS_update( const i_t, const i_t, c_t[ESCHER_SYS_MAX_STRING_LEN], const i_t );
i_t NVS_select( const i_t, const i_t, c_t[ESCHER_SYS_MAX_STRING_LEN], const i_t );
i_t NVS_remove( const i_t, const i_t, c_t[ESCHER_SYS_MAX_STRING_LEN], const i_t );
i_t NVS_space_available( void );
i_t NVS_space_used( void );
i_t NVS_space_total( void );
i_t NVS_initialize( void );
i_t NVS_format( void );
i_t NVS_defrag( void );
i_t NVS_next( i_t *, i_t, c_t[ESCHER_SYS_MAX_STRING_LEN], i_t * );
i_t NVS_checksum( i_t, i_t );
i_t NVS_version( i_t, i_t );
i_t NVS_next( i_t *, const i_t, c_t[ESCHER_SYS_MAX_STRING_LEN], i_t * );
i_t NVS_checksum( const i_t, const i_t );
i_t NVS_version( const i_t, const i_t );

#ifdef __cplusplus
}
Expand Down
2 changes: 1 addition & 1 deletion VandMC_testing/mctest/ex2/src/PERSIST_bridge.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*
* External Entity: Persistence Services (PERSIST)
*
* (C) Copyright 1998-2012 Mentor Graphics Corporation. All rights reserved.
* your copyright statement can go here (from te_copyright.body)
*--------------------------------------------------------------------------*/

#ifndef PERSIST_BRIDGE_H
Expand Down
Loading

0 comments on commit 9a78c79

Please sign in to comment.