diff --git a/su4sml/src/wfcpog/test-data.sml b/su4sml/src/wfcpog/test-data.sml index 8bfbdd9..0d4d0ca 100644 --- a/su4sml/src/wfcpog/test-data.sml +++ b/su4sml/src/wfcpog/test-data.sml @@ -87,12 +87,14 @@ val _ = trace high ("............. refine pog constraint loaded ...\n") val po_rfm_SR = rename_wfpo "po_rfm_SR" (RFM_Data.put ({key=10,rfm_tuple=(["AbstractOverriding"],["ConcreteOverriding"])}) po_rfm) val _ = trace high ("............. refine pog constraint loaded ...\n") -(* ALL CONSTRAINTS: + +(* ALL CONSTRAINTS: *) val wfc = -[wfc_inf_nameclashes,wfc_inf_stereotypes,wfc_inf_all,wfc_vis_class,wfc_vis_inheritance,wfc_vis_runtime,wfc_vis_design_by_contract,wfc_vis,wfc_tax] +[wfc_inf_nameclashes,wfc_inf_stereotypes,wfc_inf_all,wfc_vis_class,wfc_vis_inheritance,wfc_vis_runtime,wfc_vis_design_by_contract,wfc_vis_all,wfc_tax] val pos = -[po_lsk_pre,po_lsk_post,po_lsk_inv,po_cm,po_sm,po_om,po_cstr_post,po_cstr_attribute,po_cstr] -*) +[po_lsk_pre,po_lsk_post,po_lsk_inv,po_cm,po_sm,po_om,po_cstr_post,po_cstr_attribute,po_cstr_all] +(* val wfcs = [] val pos = [po_lsk_inv] +*) diff --git a/su4sml/src/wfcpog/test-suite.sml b/su4sml/src/wfcpog/test-suite.sml index 06ca06e..1cc9ca6 100644 --- a/su4sml/src/wfcpog/test-suite.sml +++ b/su4sml/src/wfcpog/test-suite.sml @@ -71,11 +71,11 @@ val testcases = [ uml = prefix^"simple_rfm/simple_rfm.zargo", ocl = prefix^"simple_rfm/simple_rfm.ocl" }, - { + (*{ name = "company", uml = prefix^"company/company.zargo", ocl = prefix^"company/company.ocl" - }:testcase, + }:testcase,*) { name = "ebank", uml = prefix^"ebank/ebank.zargo", @@ -91,11 +91,11 @@ val testcases = [ uml = prefix^"isp/isp.zargo", ocl = prefix^"isp/isp.ocl" }:testcase,*) - { + (* { name = "royals_and_loyals", uml = prefix^"royals_and_loyals/royals_and_loyals.zargo", ocl = prefix^"royals_and_loyals/royals_and_loyals.ocl" - }:testcase, + }:testcase, *) { name = "simple", uml = prefix^"simple/simple.zargo", @@ -111,11 +111,11 @@ val testcases = [ uml = prefix^"vehicles/vehicles.zargo", ocl = prefix^"vehicles/vehicles.ocl" }:testcase, - { + (* { name = "SimpleChair", uml = prefix^"SimpleChair/SimpleChair.zargo", ocl = prefix^"SimpleChair/ConcreteSimpleChair01.ocl" - }:testcase, + }:testcase, *) { name = "overriding", uml = prefix^"overriding/overriding.zargo", @@ -138,12 +138,11 @@ fun start_tests model [] = [] let val _ = trace wgen ("Testing a wellformed constraint: \n") val res_wfcs = check_wfcs model [h] - handle WFCPOG.WFC_FailedMessage s => + handle WFCPOG.WFC_FailedException (wfc,s) => let - val _ = trace wgen ("WFC_Failed_Exception handler ...\n") - val _ = buffer:=((!buffer)^s) + val _ = buffer:=((!buffer)^"\n\n"^s) in - raise WFCPOG.WFC_FailedException(h,s) + [(h,false)] end val check = List.all (fn (a,b) => b = true) res_wfcs in @@ -174,11 +173,11 @@ fun start_tests model [] = [] let val _ = trace wgen ("Testing a proof obligation constraint: \n") val pos = generate_pos model [h] - handle WFCPOG.WFC_FailedMessage s => + handle WFCPOG.WFC_FailedException (po,s) => let val _ = buffer:=((!buffer)^s) in - raise WFCPOG.WFC_FailedException (h,s) + [(h,[(["Exception"],(Variable("x",OclVoid)))])] end in case pos of @@ -234,12 +233,6 @@ fun runTest name wfs pos = val _ = trace wgen ("Accessing model ...\n") val s1 = (print_tc tc) val _ = (test tc wfs pos) - handle WFCPOG.WFC_FailedException (wfpo,s) => - let - val _ = buffer:=((!buffer)^s) - in - [] - end val _ = buffer:=s1^(!buffer) in (if (String.isSubstring "[Error]" (!buffer)) @@ -258,13 +251,6 @@ fun runTests wfs pos = val s1 = (print_tc a) val _ = buffer:=(!buffer)^s1 val data = (test a wfs pos) - handle WFCPOG.WFC_FailedException (wfpo,s) => - let - val _ = buffer:=((!buffer)^s) - val _ = trace wgen (!buffer) - in - raise WFCPOG_TestSuiteError ("one wfc failed\n") - end in data end) testcases