summaryrefslogtreecommitdiff
path: root/FreeRTOS-Plus/Test/CBMC/proofs/ReadNameField/Makefile.json
blob: 05f3d42084315ee64e13df97fd489bc56e2a6569 (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
49
50
51
52
53
54
{
  "ENTRY": "ReadNameField",

################################################################
#Enable DNS callbacks or else ReadNameField is not defined
  "callbacks": "1",

################################################################
# This is the network buffer size.  Set to any positive value.
  "NETWORK_BUFFER_SIZE" :  "10",

################################################################
# This is the size of the buffer into which the name is copied.
# Set to any positive value.
# In the source, NAME_SIZE=254 and NETWORK_BUFFER_SIZE >> NAME_SIZE
# In the proof, NAME_SIZE >= 4 required for good coverage.
  "NAME_SIZE":  "6",

################################################################
# Loop prvReadNameField.0:
# should be min of buffer size and name size
# but loop must be unwound at least once, so max of this and 1+1
  "READLOOP0": "prvReadNameField.0",
  "READLOOP0_UNWIND": "__eval max(2, min({NETWORK_BUFFER_SIZE}, {NAME_SIZE}+1))",

################################################################
# Loop prvReadNameField.1:
# should be min of buffer size and name size
# but loop must be unwound at least twice, so max of this and 2+1
  "READLOOP1": "prvReadNameField.1",
  "READLOOP1_UNWIND": "__eval max(3, min({NETWORK_BUFFER_SIZE}, {NAME_SIZE}))",

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

  "CBMCFLAGS":
  [
    "--unwind 1",
    "--unwindset {READLOOP0}:{READLOOP0_UNWIND},{READLOOP1}:{READLOOP1_UNWIND}"
  ],

  "OBJS":
  [
    "$(ENTRY)_harness.goto",
    "$(FREERTOS)/../FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/FreeRTOS_DNS.goto"
  ],

  "DEF":
  [
    "NETWORK_BUFFER_SIZE={NETWORK_BUFFER_SIZE}",
    "NAME_SIZE={NAME_SIZE}",
    "ipconfigDNS_USE_CALLBACKS={callbacks}",
    "ipconfigDNS_CACHE_NAME_LENGTH=254"
  ]
}