summaryrefslogtreecommitdiff
path: root/FreeRTOS-Plus/Test/CBMC/proofs/ProcessDHCPReplies/Makefile.json
blob: c708bac1309d64e5d97e74cef1f2945a654300a7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# The proof depends on one parameter:
#   BUFFER_SIZE is the size of the buffer being parsed
# The buffer size must be bounded because we must bound the number of
# iterations loops iterating over the buffer.

{
  "ENTRY": "ProcessDHCPReplies",

################################################################
# Buffer header: sizeof(DHCPMessage_t) = 241
# Buffer header: sizeof(DHCPMessage_IPv4_t) = 240
  "BUFFER_HEADER": 240,

################################################################
# Buffer size
# Reasonable sizes are  BUFFER_SIZE > BUFFER_HEADER
# Sizes smaller than this causes CBMC to fail in simplify_byte_extract
  "BUFFER_SIZE": 252,

################################################################
# Buffer payload
  "BUFFER_PAYLOAD": "__eval 1 if {BUFFER_SIZE} <= {BUFFER_HEADER} else {BUFFER_SIZE} - {BUFFER_HEADER} + 1",

################################################################

  "CBMCFLAGS": [
      # "--nondet-static",
      "--unwind 1",
      "--unwindset memcmp.0:7,prvProcessDHCPReplies.0:{BUFFER_PAYLOAD}"
  ],

  "OBJS":
  [
    "$(ENTRY)_harness.goto",
    "$(FREERTOS)/../FreeRTOS-Plus/Test/CBMC/stubs/cbmc.goto",
    "$(FREERTOS)/../FreeRTOS-Plus/Test/CBMC/stubs/freertos_api.goto",
    "$(FREERTOS)/../FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/FreeRTOS_DHCP.goto",
    "$(FREERTOS)/../FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/BufferManagement/BufferAllocation_2.goto",
    "$(FREERTOS)/Source/event_groups.goto",
    "$(FREERTOS)/Source/list.goto"
  ],

  "DEF":
  [
    "CBMC_DHCPMESSAGE_HEADER_SIZE={BUFFER_HEADER}",
    "CBMC_FREERTOS_RECVFROM_BUFFER_BOUND={BUFFER_SIZE}"
  ]
}