我在Ubuntu 15.04计算机上使用Z3版本4.4.0。以下模型似乎会导致分段错误:
driver.quit
问题似乎是由函数; mapping
(declare-sort Any 0 )
(declare-sort ProcBase 0)
(declare-fun Any_of_ProcBase ( ProcBase ) Any )
; Sort Real is default in smtlib 2.0.
(declare-fun Any_of_Real ( Real ) Any )
(declare-fun execTime_of_ProcBase ( ProcBase ) Real )
(define-fun specA_of_ProcBase ( ( S ProcBase) ) Bool true )
(define-fun specG_of_ProcBase ( ( S ProcBase) ) Bool ( not ( specA_of_ProcBase S ) ) )
(define-fun composedG_of_ProcBase ( ( S ProcBase ) ) Bool false )
(define-fun composedA_of_ProcBase ( ( S ProcBase ) ) Bool true )
(declare-sort SwTask 0)
(declare-fun Any_of_SwTask ( SwTask ) Any )
(declare-fun requiredOps_of_SwTask ( SwTask ) Real )
(declare-fun desiredPeriod_of_SwTask ( SwTask ) Real )
(declare-fun complexity_of_SwTask ( SwTask ) Real )
(declare-fun execTime_of_SwTask ( SwTask ) Real )
(define-fun PeriodAssumption_of_SwTask ( (S SwTask) ) Bool ( and ( >= ( desiredPeriod_of_SwTask S ) ( execTime_of_SwTask S ) ) ( >= ( complexity_of_SwTask S ) ( to_real 0 ) ) ) )
(define-fun Ops_of_SwTask ( (S SwTask) ) Bool ( = ( requiredOps_of_SwTask S ) ( complexity_of_SwTask S ) ) )
(define-fun specA_of_SwTask ( ( S SwTask) ) Bool ( PeriodAssumption_of_SwTask S ) )
(define-fun specG_of_SwTask ( ( S SwTask) ) Bool ( or ( Ops_of_SwTask S ) ( not ( specA_of_SwTask S ) ) ) )
(define-fun composedG_of_SwTask ( ( S SwTask ) ) Bool false )
(define-fun composedA_of_SwTask ( ( S SwTask ) ) Bool true )
(declare-sort Processor 0)
(declare-fun Any_of_Processor ( Processor ) Any )
(declare-fun ProcBase_of_Processor ( Processor ) ProcBase )
(declare-fun opsPerSec_of_Processor ( Processor ) Real )
(declare-fun requriedOps_of_Processor ( Processor ) Real )
(define-fun G_of_Processor ( (S Processor) ) Bool ( = ( execTime_of_ProcBase ( ProcBase_of_Processor S ) ) ( / ( requriedOps_of_Processor S ) ( opsPerSec_of_Processor S ) ) ) )
(define-fun specA_of_Processor ( ( S Processor) ) Bool true )
(define-fun specG_of_Processor ( ( S Processor) ) Bool ( or ( G_of_Processor S ) ( not ( specA_of_Processor S ) ) ) )
(define-fun composedG_of_Processor ( ( S Processor ) ) Bool false )
(define-fun composedA_of_Processor ( ( S Processor ) ) Bool true )
(declare-sort Mapping 0)
(declare-fun Any_of_Mapping ( Mapping ) Any )
(declare-sort Array_t_SwTask_t 0)
(declare-fun Any_of_Array_t_SwTask_t ( Array_t_SwTask_t ) Any )
; Sort Int is default in smtlib 2.0.
(declare-fun Any_of_Int ( Int ) Any )
(declare-fun select_of_Array_t_SwTask_t ( Array_t_SwTask_t Int ) SwTask )
(declare-fun size_of_Array_t_SwTask_t ( Array_t_SwTask_t ) Int )
(define-fun specA_of_Array_t_SwTask_t ( ( S Array_t_SwTask_t) ) Bool true )
(define-fun specG_of_Array_t_SwTask_t ( ( S Array_t_SwTask_t) ) Bool ( not ( specA_of_Array_t_SwTask_t S ) ) )
(define-fun composedG_of_Array_t_SwTask_t ( ( S Array_t_SwTask_t ) ) Bool false )
(define-fun composedA_of_Array_t_SwTask_t ( ( S Array_t_SwTask_t ) ) Bool true )
(declare-fun tasks_of_Mapping ( Mapping ) Array_t_SwTask_t )
(declare-sort Array_t_Processor_t 0)
(declare-fun Any_of_Array_t_Processor_t ( Array_t_Processor_t ) Any )
(declare-fun select_of_Array_t_Processor_t ( Array_t_Processor_t Int ) Processor )
(declare-fun size_of_Array_t_Processor_t ( Array_t_Processor_t ) Int )
(define-fun specA_of_Array_t_Processor_t ( ( S Array_t_Processor_t) ) Bool true )
(define-fun specG_of_Array_t_Processor_t ( ( S Array_t_Processor_t) ) Bool ( not ( specA_of_Array_t_Processor_t S ) ) )
(define-fun composedG_of_Array_t_Processor_t ( ( S Array_t_Processor_t ) ) Bool false )
(define-fun composedA_of_Array_t_Processor_t ( ( S Array_t_Processor_t ) ) Bool true )
(declare-fun procs_of_Mapping ( Mapping ) Array_t_Processor_t )
(declare-sort Array_t_Real_t 0)
(declare-fun Any_of_Array_t_Real_t ( Array_t_Real_t ) Any )
(declare-fun select_of_Array_t_Real_t ( Array_t_Real_t Int ) Real )
(declare-fun size_of_Array_t_Real_t ( Array_t_Real_t ) Int )
(define-fun specA_of_Array_t_Real_t ( ( S Array_t_Real_t) ) Bool true )
(define-fun specG_of_Array_t_Real_t ( ( S Array_t_Real_t) ) Bool ( not ( specA_of_Array_t_Real_t S ) ) )
(define-fun composedG_of_Array_t_Real_t ( ( S Array_t_Real_t ) ) Bool false )
(define-fun composedA_of_Array_t_Real_t ( ( S Array_t_Real_t ) ) Bool true )
(declare-sort Array_t_Array_t_Real_t_t 0)
(declare-fun Any_of_Array_t_Array_t_Real_t_t ( Array_t_Array_t_Real_t_t ) Any )
(declare-fun select_of_Array_t_Array_t_Real_t_t ( Array_t_Array_t_Real_t_t Int ) Array_t_Real_t )
(declare-fun size_of_Array_t_Array_t_Real_t_t ( Array_t_Array_t_Real_t_t ) Int )
(define-fun specA_of_Array_t_Array_t_Real_t_t ( ( S Array_t_Array_t_Real_t_t) ) Bool true )
(define-fun specG_of_Array_t_Array_t_Real_t_t ( ( S Array_t_Array_t_Real_t_t) ) Bool ( not ( specA_of_Array_t_Array_t_Real_t_t S ) ) )
(define-fun composedG_of_Array_t_Array_t_Real_t_t ( ( S Array_t_Array_t_Real_t_t ) ) Bool false )
(define-fun composedA_of_Array_t_Array_t_Real_t_t ( ( S Array_t_Array_t_Real_t_t ) ) Bool true )
(declare-fun requiredOps_of_Mapping ( Mapping ) Array_t_Array_t_Real_t_t )
(declare-fun mappedTo_of_Mapping ( SwTask Processor ) Bool )
(define-fun MappingConstraints_of_Mapping ( (S Mapping) ) Bool ( and ( and ( = ( size_of_Array_t_Array_t_Real_t_t ( requiredOps_of_Mapping S ) ) ( size_of_Array_t_Processor_t ( procs_of_Mapping S ) ) ) ( and ( and ( and ( and ( and ( and ( and ( = ( size_of_Array_t_Real_t ( select_of_Array_t_Array_t_Real_t_t ( requiredOps_of_Mapping S ) 0 ) ) ( size_of_Array_t_SwTask_t ( tasks_of_Mapping S ) ) ) ( = ( select_of_Array_t_Real_t ( select_of_Array_t_Array_t_Real_t_t ( requiredOps_of_Mapping S ) 0 ) -1 ) ( to_real 0 ) ) ) ( and ( and ( and ( => ( mappedTo_of_Mapping S ( select_of_Array_t_SwTask_t ( tasks_of_Mapping S ) 0 ) ( select_of_Array_t_Processor_t ( procs_of_Mapping S ) 0 ) ) ( = ( select_of_Array_t_Real_t ( select_of_Array_t_Array_t_Real_t_t ( requiredOps_of_Mapping S ) 0 ) 0 ) ( to_real ( + ( select_of_Array_t_Real_t ( select_of_Array_t_Array_t_Real_t_t ( requiredOps_of_Mapping S ) 0 ) -1 ) ( requiredOps_of_SwTask ( select_of_Array_t_SwTask_t ( tasks_of_Mapping S ) 0 ) ) ) ) ) ) ( => ( not ( mappedTo_of_Mapping S ( select_of_Array_t_SwTask_t ( tasks_of_Mapping S ) 0 ) ( select_of_Array_t_Processor_t ( procs_of_Mapping S ) 0 ) ) ) ( = ( select_of_Array_t_Real_t ( select_of_Array_t_Array_t_Real_t_t ( requiredOps_of_Mapping S ) 0 ) 0 ) ( select_of_Array_t_Real_t ( select_of_Array_t_Array_t_Real_t_t ( requiredOps_of_Mapping S ) 0 ) -1 ) ) ) ) ( and ( => ( mappedTo_of_Mapping S ( select_of_Array_t_SwTask_t ( tasks_of_Mapping S ) 1 ) ( select_of_Array_t_Processor_t ( procs_of_Mapping S ) 0 ) ) ( = ( select_of_Array_t_Real_t ( select_of_Array_t_Array_t_Real_t_t ( requiredOps_of_Mapping S ) 0 ) 1 ) ( to_real ( + ( select_of_Array_t_Real_t ( select_of_Array_t_Array_t_Real_t_t ( requiredOps_of_Mapping S ) 0 ) 0 ) ( requiredOps_of_SwTask ( select_of_Array_t_SwTask_t ( tasks_of_Mapping S ) 1 ) ) ) ) ) ) ( => ( not ( mappedTo_of_Mapping S ( select_of_Array_t_SwTask_t ( tasks_of_Mapping S ) 1 ) ( select_of_Array_t_Processor_t ( procs_of_Mapping S ) 0 ) ) ) ( = ( select_of_Array_t_Real_t ( select_of_Array_t_Array_t_Real_t_t ( requiredOps_of_Mapping S ) 0 ) 1 ) ( select_of_Array_t_Real_t ( select_of_Array_t_Array_t_Real_t_t ( requiredOps_of_Mapping S ) 0 ) 0 ) ) ) ) ) ( and ( => ( mappedTo_of_Mapping S ( select_of_Array_t_SwTask_t ( tasks_of_Mapping S ) 2 ) ( select_of_Array_t_Processor_t ( procs_of_Mapping S ) 0 ) ) ( = ( select_of_Array_t_Real_t ( select_of_Array_t_Array_t_Real_t_t ( requiredOps_of_Mapping S ) 0 ) 2 ) ( to_real ( + ( select_of_Array_t_Real_t ( select_of_Array_t_Array_t_Real_t_t ( requiredOps_of_Mapping S ) 0 ) 1 ) ( requiredOps_of_SwTask ( select_of_Array_t_SwTask_t ( tasks_of_Mapping S ) 2 ) ) ) ) ) ) ( => ( not ( mappedTo_of_Mapping S ( select_of_Array_t_SwTask_t ( tasks_of_Mapping S ) 2 ) ( select_of_Array_t_Processor_t ( procs_of_Mapping S ) 0 ) ) ) ( = ( select_of_Array_t_Real_t ( select_of_Array_t_Array_t_Real_t_t ( requiredOps_of_Mapping S ) 0 ) 2 ) ( select_of_Array_t_Real_t ( select_of_Array_t_Array_t_Real_t_t ( requiredOps_of_Mapping S ) 0 ) 1 ) ) ) ) ) ) ( = ( requriedOps_of_Processor ( select_of_Array_t_Processor_t ( procs_of_Mapping S ) 0 ) ) ( select_of_Array_t_Real_t ( select_of_Array_t_Array_t_Real_t_t ( requiredOps_of_Mapping S ) 0 ) ( - ( size_of_Array_t_SwTask_t ( tasks_of_Mapping S ) ) 1 ) ) ) ) ( = ( size_of_Array_t_Real_t ( select_of_Array_t_Array_t_Real_t_t ( requiredOps_of_Mapping S ) 1 ) ) ( size_of_Array_t_SwTask_t ( tasks_of_Mapping S ) ) ) ) ( = ( select_of_Array_t_Real_t ( select_of_Array_t_Array_t_Real_t_t ( requiredOps_of_Mapping S ) 1 ) -1 ) ( to_real 0 ) ) ) ( and ( and ( and ( => ( mappedTo_of_Mapping S ( select_of_Array_t_SwTask_t ( tasks_of_Mapping S ) 0 ) ( select_of_Array_t_Processor_t ( procs_of_Mapping S ) 1 ) ) ( = ( select_of_Array_t_Real_t ( select_of_Array_t_Array_t_Real_t_t ( requiredOps_of_Mapping S ) 1 ) 0 ) ( to_real ( + ( select_of_Array_t_Real_t ( select_of_Array_t_Array_t_Real_t_t ( requiredOps_of_Mapping S ) 1 ) -1 ) ( requiredOps_of_SwTask ( select_of_Array_t_SwTask_t ( tasks_of_Mapping S ) 0 ) ) ) ) ) ) ( => ( not ( mappedTo_of_Mapping S ( select_of_Array_t_SwTask_t ( tasks_of_Mapping S ) 0 ) ( select_of_Array_t_Processor_t ( procs_of_Mapping S ) 1 ) ) ) ( = ( select_of_Array_t_Real_t ( select_of_Array_t_Array_t_Real_t_t ( requiredOps_of_Mapping S ) 1 ) 0 ) ( select_of_Array_t_Real_t ( select_of_Array_t_Array_t_Real_t_t ( requiredOps_of_Mapping S ) 1 ) -1 ) ) ) ) ( and ( => ( mappedTo_of_Mapping S ( select_of_Array_t_SwTask_t ( tasks_of_Mapping S ) 1 ) ( select_of_Array_t_Processor_t ( procs_of_Mapping S ) 1 ) ) ( = ( select_of_Array_t_Real_t ( select_of_Array_t_Array_t_Real_t_t ( requiredOps_of_Mapping S ) 1 ) 1 ) ( to_real ( + ( select_of_Array_t_Real_t ( select_of_Array_t_Array_t_Real_t_t ( requiredOps_of_Mapping S ) 1 ) 0 ) ( requiredOps_of_SwTask ( select_of_Array_t_SwTask_t ( tasks_of_Mapping S ) 1 ) ) ) ) ) ) ( => ( not ( mappedTo_of_Mapping S ( select_of_Array_t_SwTask_t ( tasks_of_Mapping S ) 1 ) ( select_of_Array_t_Processor_t ( procs_of_Mapping S ) 1 ) ) ) ( = ( select_of_Array_t_Real_t ( select_of_Array_t_Array_t_Real_t_t ( requiredOps_of_Mapping S ) 1 ) 1 ) ( select_of_Array_t_Real_t ( select_of_Array_t_Array_t_Real_t_t ( requiredOps_of_Mapping S ) 1 ) 0 ) ) ) ) ) ( and ( => ( mappedTo_of_Mapping S ( select_of_Array_t_SwTask_t ( tasks_of_Mapping S ) 2 ) ( select_of_Array_t_Processor_t ( procs_of_Mapping S ) 1 ) ) ( = ( select_of_Array_t_Real_t ( select_of_Array_t_Array_t_Real_t_t ( requiredOps_of_Mapping S ) 1 ) 2 ) ( to_real ( + ( select_of_Array_t_Real_t ( select_of_Array_t_Array_t_Real_t_t ( requiredOps_of_Mapping S ) 1 ) 1 ) ( requiredOps_of_SwTask ( select_of_Array_t_SwTask_t ( tasks_of_Mapping S ) 2 ) ) ) ) ) ) ( => ( not ( mappedTo_of_Mapping S ( select_of_Array_t_SwTask_t ( tasks_of_Mapping S ) 2 ) ( select_of_Array_t_Processor_t ( procs_of_Mapping S ) 1 ) ) ) ( = ( select_of_Array_t_Real_t ( select_of_Array_t_Array_t_Real_t_t ( requiredOps_of_Mapping S ) 1 ) 2 ) ( select_of_Array_t_Real_t ( select_of_Array_t_Array_t_Real_t_t ( requiredOps_of_Mapping S ) 1 ) 1 ) ) ) ) ) ) ( = ( requriedOps_of_Processor ( select_of_Array_t_Processor_t ( procs_of_Mapping S ) 1 ) ) ( select_of_Array_t_Real_t ( select_of_Array_t_Array_t_Real_t_t ( requiredOps_of_Mapping S ) 1 ) ( - ( size_of_Array_t_SwTask_t ( tasks_of_Mapping S ) ) 1 ) ) ) ) ) ( forall ( ( sw SwTask ) ) ( exists ( ( p Processor ) ) ( mappedTo_of_Mapping S sw p ) ) ) ) )
(define-fun specA_of_Mapping ( ( S Mapping) ) Bool true )
(define-fun specG_of_Mapping ( ( S Mapping) ) Bool ( or ( MappingConstraints_of_Mapping S ) ( not ( specA_of_Mapping S ) ) ) )
(define-fun composedG_of_Mapping ( ( S Mapping ) ) Bool false )
(define-fun composedA_of_Mapping ( ( S Mapping ) ) Bool true )
(declare-sort System 0)
(declare-fun Any_of_System ( System ) Any )
(declare-fun proc1_of_System ( System ) Processor )
(declare-fun proc2_of_System ( System ) Processor )
(declare-fun task1_of_System ( System ) SwTask )
(declare-fun task2_of_System ( System ) SwTask )
(declare-fun task3_of_System ( System ) SwTask )
(declare-fun mapping_of_System ( System ) Mapping )
(define-fun Conn_of_System ( (S System) ) Bool ( and ( and ( and ( and ( and ( and ( and ( and ( and ( and ( and ( and ( and ( and ( = ( select_of_Array_t_Processor_t ( procs_of_Mapping ( mapping_of_System S ) ) 0 ) ( proc1_of_System S ) ) ( = ( select_of_Array_t_Processor_t ( procs_of_Mapping ( mapping_of_System S ) ) 1 ) ( proc2_of_System S ) ) ) ( = ( select_of_Array_t_SwTask_t ( tasks_of_Mapping ( mapping_of_System S ) ) 0 ) ( task1_of_System S ) ) ) ( = ( select_of_Array_t_SwTask_t ( tasks_of_Mapping ( mapping_of_System S ) ) 1 ) ( task2_of_System S ) ) ) ( = ( select_of_Array_t_SwTask_t ( tasks_of_Mapping ( mapping_of_System S ) ) 2 ) ( task3_of_System S ) ) ) ( = ( size_of_Array_t_Processor_t ( procs_of_Mapping ( mapping_of_System S ) ) ) 2 ) ) ( = ( size_of_Array_t_SwTask_t ( tasks_of_Mapping ( mapping_of_System S ) ) ) 3 ) ) ( = ( complexity_of_SwTask ( task1_of_System S ) ) ( to_real 100 ) ) ) ( = ( complexity_of_SwTask ( task2_of_System S ) ) ( to_real 100 ) ) ) ( = ( complexity_of_SwTask ( task3_of_System S ) ) ( to_real 100 ) ) ) ( = ( opsPerSec_of_Processor ( proc1_of_System S ) ) ( to_real 200 ) ) ) ( = ( opsPerSec_of_Processor ( proc2_of_System S ) ) ( to_real 200 ) ) ) ( = ( desiredPeriod_of_SwTask ( task1_of_System S ) ) ( to_real 1 ) ) ) ( = ( desiredPeriod_of_SwTask ( task2_of_System S ) ) ( to_real 1 ) ) ) ( = ( desiredPeriod_of_SwTask ( task3_of_System S ) ) ( to_real 1 ) ) ) )
(define-fun specA_of_System ( ( S System) ) Bool true )
(define-fun specG_of_System ( ( S System) ) Bool ( not ( specA_of_System S ) ) )
(define-fun composedG_of_System ( ( S System ) ) Bool ( and true ( Conn_of_System S ) ( => ( specA_of_Processor ( proc1_of_System S ) )( specG_of_Processor ( proc1_of_System S ) ) ) ( => ( specA_of_Processor ( proc2_of_System S ) )( specG_of_Processor ( proc2_of_System S ) ) ) ( => ( specA_of_SwTask ( task1_of_System S ) )( specG_of_SwTask ( task1_of_System S ) ) ) ( => ( specA_of_SwTask ( task2_of_System S ) )( specG_of_SwTask ( task2_of_System S ) ) ) ( => ( specA_of_SwTask ( task3_of_System S ) )( specG_of_SwTask ( task3_of_System S ) ) ) ( => ( specA_of_Mapping ( mapping_of_System S ) )( specG_of_Mapping ( mapping_of_System S ) ) ) ) )
(define-fun composedA_of_System ( ( S System ) ) Bool ( or ( and true ( specA_of_Processor ( proc1_of_System S ) )( specA_of_Processor ( proc2_of_System S ) )( specA_of_SwTask ( task1_of_System S ) )( specA_of_SwTask ( task2_of_System S ) )( specA_of_SwTask ( task3_of_System S ) )( specA_of_Mapping ( mapping_of_System S ) ) ) (not ( composedG_of_System S ) ) ) )
; check implementality for System
(declare-const S_System System )
(assert ( composedA_of_System S_System ) )
(assert ( composedG_of_System S_System ) )
(check-sat)
引起的。如果通过删除第二个操作数删除了该函数中的sum运算符,那么Z3解决此实例没有问题。
答案 0 :(得分:1)
我无法使用最新的不稳定版本重现此段错误。相反,我得到了多个错误,第一个就是:
(error "line 74 column 729: Wrong number of arguments (3) passed to function (declare-fun mappedTo_of_Mapping (SwTask Processor) Bool)")
你可以用最新的不稳定版重试吗?如果仍有问题,请在Z3 issue tracker。
中打开一个新问题